--- Jon Wingfield <[EMAIL PROTECTED]> wrote:
> I just looked at the code you posted.
thank's for the t ime Jon
> NullPointerException within line 33 of your
> LoginServlet
>
> int kode =
> Integer.parseInt(request.getParameter("kode"));
>
> This will throw an NPE if the "kode" parameter is
> not set..
I don't know how to set it in MIDlet (actually the
listing that I attach is what I've seen in Paul
Tremblett's book),I thought it will be set
automatically like what happened in html form
> Is your MIDLet TextField empty when you get this
> error?
no
> If not, check that your MIDLet code is properly
> generating an HTTP POST
> request (you're not setting the content-length
> header, there needs to be
> a blank line between http headers and the body etc).
well, that's my problem,I'm still new also in J2ME
especially in it's Http method, do you mind to show
me a kind of example how to correctly generating an
HTTP POST in MIDlet ?
> Turn on the
> RequestDumperValve in your tomcat's server.xml to
> check what tomcat
> receives...
I've set the content-length properties but the
message error still the same. What item is actually
have to be set for the header?, in the catalina_log
it prompts like this (I copy-paste from catalina_log
in Tomcat's logs folder):
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
REQUEST URI =//bismillah/LoginServlet
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
authType=null
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
characterEncoding=null
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
contentLength=7
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
contentType=application/x-www form urlencoded
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
contextPath=
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
header=user-agent=Profile/MIDP-1.0
Configuration/CLDC
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
header=content-type=application/x-www form
urlencoded
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
header=content-length=7
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
header=transfer-encoding=chunked
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
header=host=localhost:8080
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
locale=en_US
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
method=POST
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
pathInfo=null
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
protocol=HTTP/1.1
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
queryString=null
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
remoteAddr=127.0.0.1
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
remoteHost=localhost
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
remoteUser=null
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
requestedSessionId=null
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
scheme=http
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
serverName=localhost
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
serverPort=8080
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
servletPath=null
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
isSecure=false
2004-03-26 07:59:47 RequestDumperValve[Standalone]:
---------------------------------------------------------------
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
---------------------------------------------------------------
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
authType=null
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
contentLength=-1
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
contentType=text/html;charset=ISO-8859-1
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
header=Content-Type=text/html;charset=ISO-8859-1
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
header=Content-Language=en-US
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
header=Transfer-Encoding=chunked
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
header=Date=Fri, 26 Mar 2004 00:59:48 GMT
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
header=Server=Apache-Coyote/1.1
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
header=Connection=close
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
message=null
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
remoteUser=null
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
status=500
2004-03-26 07:59:48 RequestDumperValve[Standalone]:
is it something to do with my URL path in MIDlet or
the way to define context description for the
application that isn't correct ?
thank you very much
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]