You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by yuni indrasary <wi...@yahoo.com> on 2004/03/24 09:10:46 UTC

Re: tomcat4.1 for windows,pl

--- Parsons Technical Services
<pa...@earthlink.net> wrote:
> Try this....
> And give it another try.

Thank you very much for the help Doug, but it still
give an error message that was start with:
Apache Tomcat/4.1.29-Error report
HTTP Status 500-Exception report
message description
The Server encountered an internal error that
prevented it from fulfilling this request 
exception javax.servlet.ServletException:
null at LoginServlet.doPost(LoginServlet.java:59)
and continued with what I enclosed in my previous
message
> 
> Put some checks in your code for the return of a
> null connection.
do you mean the connection between the J2ME emulator
and tomcat or between tomcat and the database
management system?

When I checked the web descryptor of the example
application in tomcat, I found it also contained
filter directive while mine doesn't,could it possibly
be a problem?

The more I read this lists, the more I convinced, that
this lists is filled with person with a strong will to
help others to grow their knowledge. Thank you for
advance everybody :)  

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: tomcat4.1 for windows,please

Posted by yuni indrasary <wi...@yahoo.com>.
--- Jon Wingfield <jo...@mkodo.com> 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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: tomcat4.1 for windows,pl

Posted by Jon Wingfield <jo...@mkodo.com>.
I just looked at the code you posted. I think it's a 
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...
Is your MIDLet TextField empty when you get this error?
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). Turn on the 
RequestDumperValve in your tomcat's server.xml to check what tomcat 
receives...

HTH,

Jon

yuni indrasary wrote:
> --- Parsons Technical Services
> <pa...@earthlink.net> wrote:
> 
>>Try this....
>>And give it another try.
> 
> 
> Thank you very much for the help Doug, but it still
> give an error message that was start with:
> Apache Tomcat/4.1.29-Error report
> HTTP Status 500-Exception report
> message description
> The Server encountered an internal error that
> prevented it from fulfilling this request 
> exception javax.servlet.ServletException:
> null at LoginServlet.doPost(LoginServlet.java:59)
> and continued with what I enclosed in my previous
> message
> 
>>Put some checks in your code for the return of a
>>null connection.
> 
> do you mean the connection between the J2ME emulator
> and tomcat or between tomcat and the database
> management system?
> 
> When I checked the web descryptor of the example
> application in tomcat, I found it also contained
> filter directive while mine doesn't,could it possibly
> be a problem?
> 
> The more I read this lists, the more I convinced, that
> this lists is filled with person with a strong will to
> help others to grow their knowledge. Thank you for
> advance everybody :)  
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>