www.webdeveloper.com
Results 1 to 6 of 6

Thread: Installing and configuring Tomcat

  1. #1
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298

    Installing and configuring Tomcat

    I have been trying to setup and configure Jakarta Tomcat so I can get down and dirty with some JSP at home.

    I have installed Tomcat 5, told it where my JDK is, and copied tools.jar into the /lib/ directory.

    Everytime I try to view a page which has to create or referance any type of Object, I get a series of errors.
    - package Main.main cannot be found.
    - Class "Action" cannot be found.
    It seems that JSP cannot find any of my classes or any class which is pre-bundled in Java.

    Does anybody have a ny answers or similar experiences? This is really getting to me!

    Regards.

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,123
    2 things come to mind first.

    1. Did you set the environment variable for JDK?
    on a typical windows machine, presuming you installed j2sdk on C: drive, it should look like this
    C:\j2sdk1.4.1
    Set the env variable entry for this item
    on windows go to control panel
    click on system
    then click on advance
    click on Environment Variable
    There are 2 sections in here top one is for the user you are logged in as
    click on New and then add the following
    JAVA_HOME
    the line below requires the path to path to your jdk, enter the following or the actual path
    C:\j2sdk1.4.1

    click ok and thats about it..this should take care of it.

    Now the error you posted it points to a missing Action class, to best of my knowledge, Action class is part of struts.
    And you will have to put struts.jar file in your lib directory in the apache install as well(or in the application package)
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Do you have imports on the page for the referenced packages? As Khalid said, Action sounds like part of Struts but Action should never appear on a JSP.

  4. #4
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Thanks.

    I have already set the JAVA_HOME env variable. But it didnt change anything.

    I was just using Action as an example. Im not actually using struts and Action was just a class which has been pre-made for me to work with.

    I actually played around with a few basic hello world type programs last night and they worked fine. It seems only classes from packages other than java.lang are not working!

    I will play around with it some more tonight.

    Thanks fo the help.

  5. #5
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    I actually played around with a few basic hello world type programs last night and they worked fine. It seems only classes from packages other than java.lang are not working!
    That's definitely missing imports.

    <%@ page language="java" import="java.util.*" %>

  6. #6
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    No, Im already familiar with importing. I have all the required import statements.

    That problem turned out to because of a problem with the tools.jar in the /lib directory.

    Thanks for the help, guys. Much appreciated.

    Regards.
    Last edited by buntine; 11-10-2004 at 08:02 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles