I am trying to control if a midlet has been download correctly using the parameter MIDlet-Install-Notify but I do no know how to get the status code in my asp.
Can somoeone help me?
I am trying to control if a midlet has been download correctly using the parameter MIDlet-Install-Notify but I do no know how to get the status code in my asp.
Can somoeone help me?
Hello
Here Java servlet page for you, I hope you can find it usefull:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class InstallNotifyLoggerServlet
extends HttpServlet
{
public void init(ServletConfig config)
throws ServletException
{
super.init(config);
}
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
log("GET! (Should be POST); pathInfo=\"" + request.getPathInfo() + "\""
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
}
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
log("POST; pathInfo=\"" + request.getPathInfo() + "\""
BufferedReader reader = request.getReader();
String line;
while ((line = reader.readLine()) != null)
{
log("> " + line);
}
reader.close();
}
public String getServletInfo()
{
return "Install-Notify Logger Servlet.";
}
}
This test servlet just writes Tomcat 'log messages' to the Tomcat server log file.
(The name of the Tomcat 'log file' differs in different versions of Tomcat.)
Normally an operator (or MIDlet provider) would have a servlet that logs such info into a database, e.g. phone number or customer such-and-such has installed MIDlet X