You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paresh Deshpande <pa...@india.triviumsys.com> on 2002/06/10 14:30:48 UTC

retrieving complete classpath for tomcat instance

Hi, I am using tomcat 4.0 servlet container with apache 1.3.24 as web
server. 
I have a situation where I need to compile a java file at runtime within 
my web-application.
 
I am using org.apache.jasper.compiler.SunJavaCompiler to generate the
necessary
class files. While compilation, I need complete classpath as an argument to
method setClasspath.
Once I set classpath correctly, I should be able to use compile method to
generate appropriate
class files.
 
Problem is that, I am not able to set classpath information for compiler
class correctly. How can 
I include all the jar files to classpath available in servlet container
context? If I use  
System.getProperty("java.class.path"), I get only
$CATALINA_HOME$\bin\bootstrap.jar. 
None of the jar files in $CATALINA_HOME$\server\lib\ or common\lib folder
are returned 
by accessing this property. Is their any system property to get the complete
classpath for 
the current Apache-Tomcat service?

regards
Paresh