tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Cheesman <jch...@msl.es>
Subject ServletException that I don't understand...
Date Fri, 27 Jul 2001 15:32:22 GMT
I'm getting the following exception when trying to load a jsp:

ServletException yadda yadda wrapping:

java.lang.NumberFormatException: E at 
java.lang.Integer.parseInt(Integer.java:414) at 
java.lang.Integer.parseInt(Integer.java:463) at 
org.apache.jasper.compiler.Compiler.getJspLineErrors(Compiler.java:321) at 
org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) at 
org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:526) at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:175)

at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:187) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:456)


This seems to be an error in my jsp, and where the jasper Compiler is 
parsing the line number from the javac output it's failing somehow...

<code>
       int beginColon = line.indexOf(':', 2);// Drive letter on Windows !!
       int endColon = line.indexOf(':', beginColon + 1);

       if (beginColon < 0 || endColon < 0) {
         errorMsg.append(line);
         errorMsg.append('\n');
         continue;
       }

       String nr = line.substring(beginColon + 1, endColon);
       int lineNr = Integer.parseInt(nr);
</code>

I'm not sure that the indexOf, beginColon construction is the stablest I've 
seen...


Has anyone else run up against this? Any solution?


Jim



--

                           *   Jim Cheesman   *
             Trabajo: 
jchees@msl.es - (34)(91) 724 9200 x 2360
   The shortest distance between 
two points is how far apart they are.



Mime
View raw message