Results 1 to 4 of 4
  1. #1
    rng
    rng is offline Member
    Join Date
    Jan 2012
    Posts
    25
    Rep Power
    0

    Default Tomcat not finding class file needed on a jsp page

    I installed tomcat on Linux and tried to load a jsp file (localhost:8080/myfile.jsp) which needs to use a local java class. I tried keeping the local class file at many places but tomcat is not finding it. I adjusted the catalina.properties file (shared.loader=myfolder) but still it does not work. The commands startup.sh and shutdown.sh work without any error. What is the best way to solve this classpath problem in tomcat? Thanks for your help.
    Last edited by rng; 06-22-2016 at 07:01 PM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Tomcat not finding class file needed on a jsp page

    I played around with Tomcat years ago. I recently installed Tomcat 8 and used the files I had setup in 2001 and changed in 2008.
    I don't remember what was needed for the setup

    I just executed Tomcat and the HelloWorld servlet worked. Its class file was here:
    D:\apache-tomcat-8.0.32\webapps\Norms\WEB-INF\classes\HelloWorldExample.class
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    rng
    rng is offline Member
    Join Date
    Jan 2012
    Posts
    25
    Rep Power
    0

    Default Re: Tomcat not finding class file needed on a jsp page

    Yes, it worked! The class file needed to be in WEB-INF/classes folder. Thanks very much.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: Tomcat not finding class file needed on a jsp page

    You ought to look up what the standard folder structure for a Java web app is.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 0
    Last Post: 08-15-2013, 11:56 AM
  2. Java is not finding the Main Class in my jar file...
    By allan.clapp in forum New To Java
    Replies: 2
    Last Post: 04-16-2012, 06:49 PM
  3. Finding Errors in JSP page with PMD
    By srinivasmallabathula in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 12-21-2011, 02:29 PM
  4. Finding Jar files in a class file
    By bnrkcdc in forum Jobs Discussion
    Replies: 4
    Last Post: 09-08-2010, 01:46 PM
  5. Truncated class file [HELP NEEDED]
    By Tylers Pur3 in forum New To Java
    Replies: 8
    Last Post: 08-03-2010, 06:48 PM

Tags for this Thread

Posting Permissions

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