As a user of Tomcat on NetWare, I've been trying to make Tomcat 5.0.19 work on NetWare6. With a proper startup script, Tomcat 5.0.19 works "out of the box" on NetWare, except for one (major) JSP issue. Tomcat fails to rename newly recompiled JSP's from *.classtmp to *.class. I've tracked the problem to SmapUtil.java, on line 230, a call to renameTo() fails with an IO exception. I expect that this is a NetWare specific issue, relating to the NetWare JVM. If anyone else has experienced this issue on another platform than NetWare, please give some feedback.
I have both a quick hack to fix this issue, and a more proper solution.
The hack:
Edit conf/web.xml, search for "<servlet-name>jsp</servlet-name>".
put in the path to the "work" dir (eg. /tomcat/5019/work or sys:/tomcat/5019/work )
<init-param> <param-name>scratchdir</param-name> <param-value>/tomcat/5019/work</param-value> </init-param>
This makes the first problem go avay, but creates a new one, as miltiple JSP's might end up being compiled to the same class filename and path.
-And the proper solution:
In SmapUtil.jave, swap the "static void install(File classFile, byte[] smap)" method with this:
static void install(File classFile, byte[] smap) throws IOException { File tmpFile = new File(classFile.getPath() + "tmp"); new SDEInstaller(classFile, smap, tmpFile);
if (!classFile.delete()) { throw new IOException("classFile.delete() failed"); }
FileInputStream fis = new FileInputStream(tmpFile); FileOutputStream fos = new FileOutputStream(classFile); byte[] buf = new byte[1024]; int i = 0; while((i=fis.read(buf))!=-1) { fos.write(buf, 0, i); } fis.close(); fos.close();
if (!tmpFile.delete()) { throw new IOException("classFile.delete() failed"); } }
Whit this fix, Tomcat 5 runs like a charm on NetWare 6. It would be nice to see this fix (or somthing like it) being includet in the official tomcat code, but I can see that the will to do so might not be there, if this is a NetWare only issue. Anyways just wanted to share my experiences with Tomcat 5 on NetWare.
cheers! /Stig
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]