On 17/11/2010 20:35, Thangalin wrote:
> Hi,
> 
> Judging by its name alone, I would have thought that "setclasspath" (.bat or
> .sh) would be a place to put custom code that sets the classpath before
> Tomcat starts, or stops.
> 
> I find it odd that nowhere in that file is the classpath environment
> variable actually set. The script appears to ensure other environment
> variables, such as JAVA_HOME are set.
>
> It was only by reading some of the other batch files that I was able to
> determine that the non-existent "setenv" script is called (when it exists)
> prior to Tomcat.
> 
> I recommend the following:
> 
>    1. If a file is named "setclasspath", then the only responsibility for
>    that script is to set the classpath.
>    2. Create a file named "setenv" and document (using REM statements) its
>    purpose.
> 
> It appears as though "setclasspath" and "setenv" have had their names
> swapped.
> 
> --
> 
> I am writing a book that includes instructions on how to configure Tomcat
> and JasperReports. It feels very strange to tell people edit a new file
> called "setenv.bat" and put classpath changes there, while avoiding
> "setclasspath.bat" (which was my first, yet incorrect, guess).

What class path changes are you planning?

Servlet applications (and Tomcat itself) have well defined processes for
loading classes, which means that setting the classpath for the java
process itself may not have the effect you'd expect.


p

Attachment: 0x62590808.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to