tomcat's classpaths

Discussion in 'Java' started by Daniel, Aug 21, 2003.

  1. Daniel

    Daniel Guest

    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.
     
    Daniel, Aug 21, 2003
    #1
    1. Advertising

  2. "Daniel" <> 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
     
    William Brogden, Aug 21, 2003
    #2
    1. Advertising

  3. Daniel

    Jim Guest

    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" <> 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.
    >
    >
     
    Jim, Aug 23, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wayne Berke
    Replies:
    0
    Views:
    402
    Wayne Berke
    Sep 19, 2003
  2. deegoogle
    Replies:
    3
    Views:
    364
    Dave Glasser
    Nov 18, 2003
  3. Elisa

    Ant and classpaths

    Elisa, Feb 22, 2004, in forum: Java
    Replies:
    2
    Views:
    438
    Elisa
    Feb 23, 2004
  4. Abbasi Dhilawala

    ant, packages, and classpaths.

    Abbasi Dhilawala, Jun 29, 2004, in forum: Java
    Replies:
    0
    Views:
    460
    Abbasi Dhilawala
    Jun 29, 2004
  5. El Durango

    setting classpaths with Ant

    El Durango, Sep 12, 2004, in forum: Java
    Replies:
    1
    Views:
    467
Loading...

Share This Page