Good morning All.
Below are two methods recently noted in NetWare forums to get recent
Tomcat-5 to properly compile JSP's.
I have tried method 1. and was able to successfully get a jsp to work that
had previously failed with a java IOerror.
I haven't tried the second approach but its author seemed satisfied.
For information and consideration.
Norm

-------------------------------------------------
Method 1.

Try editing conf/web.xml, search for "<servlet-name>jsp</servlet-name>".

put in:

<init-param>
    <param-name>scratchdir</param-name>
    <param-value>/tomcat/5019/work</param-value>
</init-param>

(your tomcat path may not be the same as mine)

This *is* a workaround, but it appears to work with the few jsp test
pages I have tried...

cheers
/Stig

-------------------------------------------------
Method 2.

OK, forget this... I've recompiled Tomcat5 with a rewrite of the faulty
renameTo() function on line 230 of SmapUtil.java, something like 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");
             }
         }

Works like a charm :-)

cheers
/Stig

------------------------------------------------------------


----- Original Message ----- 
From: "Mladen Turk" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 24, 2004 6:27 AM
Subject: TC5 startup.bat shutdown.bat catalina.bat


>
> Hi,
>
> I have some problems with the applications that rely on java.io.tmpdir.
> The reason is that the startup set the java.io.tmpdir to CATALINA_TMPDIR,
> and
> that is "..\temp".
> So each application looses the system temp dir, and it's quite random.
>
> I propose to use the absolute paths for startup, even have a solution, but
> would
> like to here if there is any particular reasons not to use the absolute
> paths, befor any commits.
>
> Here is the snapshot for startup.bat that I propose:
>
> rem Guess CATALINA_HOME if not defined
> set CURRENT_DIR=%cd%
> if not "%CATALINA_HOME%" == "" goto gotHome
> set CATALINA_HOME=%CURRENT_DIR%
> if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
> cd ..
> set CATALINA_HOME=%cd%
> cd CURRENT_DIR
> :gotHome
> ...
>
> So instead setting to "." or ".." I'm using %cd% to obtain current
> directory.
> This is basically the same code that I've used for service.bat
>
> Didn't test on DOS machines, just NT (but did using command.com).
>
> MT.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to