You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alex Muc <al...@utoronto.ca> on 2000/12/12 00:11:25 UTC

Tomcat is creating compiled JSP filenames of lenght > 250 characters

Hi,

Looking through the archives I've only foudn a little discussion about 
this problem, so hopefully this message isn't something that has been 
discussed to death already.

I'm running with Tomcat 3.1 on Windows 98 for some development work that 
I'm doing.  I am running in cases where the compilation of JSP pages 
(handled by the "jasper sub-component) is creating file names which are 
longer than 250 characters which is the limit of the entire file name 
(path + filename) on windows.

Every time this occurs Tomcat then throws an exception like the following:

Included servlet error: 500
Location: /cc/module1design/SLElSet.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for JSPerror: 
Can't write: 
D:\java\jakarta-tomcat\work\localhost_8080%2Fcc\module_00031design\_0005f_0005f\query\ClauseChain\_0005f_0005f\ClauseStart\_0002fmodule_00031design_0002f_0002e_0002e_0002fquery_0002fClauseChain_0002f_0002e_0002e_0002fClauseStart_0002fCreate_0002ejspCreate_jsp_0.class
1 error

   at org.apache.jasper.compiler.Compiler.compile(Compiler.java, 
Compiled Code)
   at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java, 
Compiled Code)
   at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java, 
Compiled Code)
   at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java, 
Compiled Code)
   at 
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java, 
Compiled Code)
   at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, 
Compiled Code)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled 
Code)
  
<snip>

I've looked through the source code for Tomcat and the relevant class 
seems to be org.apache.jasper.compiler.JSPCompiler.  This class 
implements the org.apache.jasper.compiler.Mangler interface which is 
what does the translations between classes mentioned in a JSP pae and 
what is generated by the JSP compiler.  It seems relatively straightforward.

The questions I have are the following:
1) Is it possible to specify (in a configuration file somewhere) the 
name of the class to use as the JSP compiler?  Or if I make changes to 
the class org.apache.japser.compiler.JSPCompiler will I have to 
recompile/recreate the tomcat.jar file?
2) Can anyone shed some light on the reasons behind the current Mangler 
implementation (ideally the guy who wrote it).  If I am to try and 
improve the implementation then it'd be nice to know what the pitfalls are.
3) Is there any way to shorten down the lenght of the names of the 
compiled classes that I'm not aware of?  The compiler seems to throw in 
a lot of strings like "_0002f" and "_0002e" for no apparent reason
4) Anyone know what the file name limits on Unix/Linux are?
5) Is this a problem which has been fixed in Tomcat 3.2 or the early 4.0 
releases?

Thanks for you help
Alex.