tomcat's classpaths  
Author Message
Daniel





PostPosted: 2003-8-21 12:39:00 Top

java-programmer, tomcat's classpaths Hi all.

I have downloaded Tomcat 4.1.27 and I would like to create some JSPs. I took
an earlier JSP app and put it on Tomcat, and I got a class not found
exception. How do I set the classpaths for Tomcat?

One more question, how do I change the web document root? For example, I
want to change it to c:\testing.


Thanks in advance.


 
William Brogden





PostPosted: 2003-8-21 23:59:00 Top

java-programmer >> tomcat's classpaths
"Daniel" <email***@***.com> wrote in message
news:Y1Y0b.9038$Go4.5714@lakeread01...
> Hi all.
>
> I have downloaded Tomcat 4.1.27 and I would like to create some JSPs. I
took
> an earlier JSP app and put it on Tomcat, and I got a class not found
> exception. How do I set the classpaths for Tomcat?
>
> One more question, how do I change the web document root? For example, I
> want to change it to c:\testing.

Tomcat 4 pays no attention to the CLASSPATH environment variable.
Read the Class Loader HOW-TO in your Tomcat on-line documentation
its under Administrators on tomcat-docs/index.html page



 
Jim





PostPosted: 2003-8-23 20:31:00 Top

java-programmer >> tomcat's classpaths in server.xml, point Tomcat to your application area thusly:

<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="HSP"
unpackWARs="true" autoDeploy="true">

<!-- HSP Context -->
<Context path="/HSP" docBase="C:\cant\HSP\WebApp"
debug="0"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="HSP_log." suffix=".txt"
timestamp="true"/>
</Context>


in web.xml, tell Tomcat where your servlets are:


<servlet>
<servlet-name>Login</servlet-name>
<servlet-class>hsp.Login</servlet-class>
</servlet>


<!-- NOTE: put all servle_ tags before servle_-mappin_ tags -->

<servlet-mapping>
<servlet-name>Login</servlet-name>
<url-pattern>/servlet/hsp/Login</url-pattern>
</servlet-mapping>


jim cant

"Daniel" <email***@***.com> wrote in message
news:Y1Y0b.9038$Go4.5714@lakeread01...
> Hi all.
>
> I have downloaded Tomcat 4.1.27 and I would like to create some JSPs. I
took
> an earlier JSP app and put it on Tomcat, and I got a class not found
> exception. How do I set the classpaths for Tomcat?
>
> One more question, how do I change the web document root? For example, I
> want to change it to c:\testing.
>
>
> Thanks in advance.
>
>