DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2005
    Posts
    2

    Angry Tomcat configuration

    Hi There,

    Tomcat 4.1 - Why can't Tomcat 'see' my class files(without package structure) under installed_dir\webapps\ROOT\WEB-INF\classes folder? I believe 'startup.bat' script includes this directory while setting the classpath for Tomcat.

    I switched to Tomcat 5.5 and the same problem persists. Am I missing any thing in the classpath?

    Thank you all.

    Thank you.

  2. #2
    Join Date
    Jun 2004
    Posts
    199
    are you saying the classes are in the default package or that you stuck all the .class files in the that directory or ?

  3. #3
    Join Date
    Jul 2005
    Posts
    2

    Wink Tomcat's classpath settings?

    Hi,

    I really thank you for replying. I am a newbie to Tomcat(Servlet & JSP as well!).
    ***Tomcat 4.1***
    From browser, I could access simple html and jsp files when these files reside in 'install_dir\webapps\ROOT' folder.

    If I put HelloServlet.class(packageless) in 'install_dir\webapps\ROOT\WEB-INF\classes' folder, I cannot see it if typing http://localhost/servlet/HelloServlet at browser(using port 80). I got HTTP 404 error. Likewise, if I put HelloServlet2.class(using 'moreservlets' package) in 'install_dir\webapps\ROOT\WEB-INF\classes\moreservlets' folder, I cannot see it either.

    I will appreciate any help or pointers from you all. I have already been at this stopping point for almost a week (well, just study after work!)

  4. #4
    Join Date
    Dec 2003
    Location
    tx/us
    Posts
    131
    There are two ways for servlet classes to be loaded. You either have to configure the server to load them with a defined web mapping (e.g. /HelloServlet) or you have to have an "invoker" servlet configured that loads the servlets by classname. I don't know if Tomcat loads the invoker by default. I use WebSphere and I know it doesn't because it's a security risk.

  5. #5
    Join Date
    Jun 2004
    Posts
    199
    Hmmm.

    What do you get when you go to http://localhost ?

    Did you look in the logs?

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links