Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: Problem to configure servelet on Tomcat6

reno

2007-07-31

Replies:

catch the NumberFormatException

check the given parameter:
if your parameter is empty or is different that a number, set it to a
default value
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NumberFormatException.html

it is more a servlet problem than a tomcat problem

F.

> Hi,
> I've configured Tomacat 6 for Servlet but I've this error:
>
> *message*
>
> *description* _The server encountered an internal error () that
> prevented it from fulfilling this request._
>
> *exception*
>
> javax.servlet.ServletException: Servlet.init() for servlet default threw
> exception
>  
> org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:104)
>
>  
> org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:261)
>  
> org.apache.coyote.http11.Http11AprProcessor.process (Http11AprProcessor.java:852)
>
>  
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584)
>
>   org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
>   java.lang.Thread.run(Unknown Source)
>
> *root cause*
>
> java.lang.NumberFormatException: For input string: ""
>   java.lang.NumberFormatException.forInputString(Unknown Source)
>   java.lang.Integer.parseInt(Unknown Source)
>   java.lang.Integer.parseInt(Unknown Source)
>  
> org.apache.catalina.servlets.DefaultServlet.init (DefaultServlet.java:221)
>   javax.servlet.GenericServlet.init (GenericServlet.java:212)
>  
> org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:104)
>
>  
> org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:261)
>  
> org.apache.coyote.http11.Http11AprProcessor.process (Http11AprProcessor.java:852)
>
>  
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584)
>
>   org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
>   java.lang.Thread.run(Unknown Source)
>
> *note* _The full stack trace of the root cause is available in the
> Apache Tomcat/6.0.13 logs._
>
> ------------------------------------------------------------------------
>
>
>   Apache Tomcat/6.0.13
>
> How can resolve this problem?
> Hoping a reply.
> Sincerally yours,
> Fabbris Pierluigi
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@(protected)
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>
©2008 junlu.com - Jax Systems, LLC, U.S.A.