tomcat's classpaths

D

Daniel

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.
 
W

William Brogden

Daniel said:
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
 
J

Jim

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top