You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vinay Singh <vi...@sapient.com> on 2001/12/10 19:48:14 UTC

Urgent - class loading issue

Folks,
 
Did somebody get a chance to look at this problem !!
Vinay
-----Original Message-----
From: Vinay Singh [mailto:vinays@sapient.com]
Sent: Monday, December 10, 2001 9:32 PM
To: 'Tomcat Users List'
Subject: RE: Newbie - class loading issue



It's a normal .class file. If I put the same file in Catalina_home\calsses,
it works. 
Yeah ! You are right. Examples prove that classes are loaded from
WEB-INF\classes. 

>>Do I need to do something special with the example context that I am
creating for my application. I am  using a very simple web.xml lying in
<myapplication>\WEB-INF\. Attached here for your reference.

>>Another related question I have is : Can I set class path in some .bat
file (such as startup.bat or catalina.bat), which can act as my classpath
for Tomcat.

Vinay 

-----Original Message----- 
From: Ikke List [ mailto:list@ikke.net <ma...@ikke.net> ] 
Sent: Monday, December 10, 2001 8:53 PM 
To: Tomcat Users List 
Subject: RE: Newbie - class loading issue 


Newbie - class loading issueHi, 

Maybe to obvious, but Tomcat is *not* a EJB server, just a servlet/jsp 
container. Let us know which classes it cannot find if you want to get more 
repsonse. Putting classes in the WEB-INF/classes are found, the examples 
prove that. 

Wouter 
  -----Original Message----- 
  From: Vinay Singh [ mailto:vinays@sapient.com <ma...@sapient.com>
] 
  Sent: Monday, 10 December, 2001 15:25 
  To: 'tomcat-user@jakarta.apache.org' 
  Subject: FW: Newbie - class loading issue 


  Folks, 

  I am facing the same issue. Could not get my classes loaded from 
WEB-INF/classes folder. 
  >>Do I have to do anything other than just putting my classes in this 
folder and restarting tomcat 4.0.1 

  Can anybody answer this !! 

  Thanks in advance 

  Vinay 


  -----Original Message----- 
  From: Bill Halpin [ mailto:bill@schwoo.com <ma...@schwoo.com> ] 
  Sent: Tuesday, December 04, 2001 9:51 PM 
  To: 'tomcat-user@jakarta.apache.org' 
  Subject: Newbie - class loading issue 


  Hello Folks! I was recently assigned a POC project that includes some web 
development which I am using Tomcat 4.0.1 to do.  I've only been using 
Tomcat for about 1.5 weeks so I'm extremely wet behind the ears. 

  I've consulted the documentation and searched the list archives looking 
for an answer to my problem but cant seem to find one.  Right now, I am 
simply trying to use a bean to gather data from a form and return the data 
to the screen.  When I run the jsp to do this, I get one of two different 
"class not found" errors.  I am not deploying the app using a WAR file, 
right now I just have the jsp file in the root directory and the class files

in WEB-INF/classes.  The bean class is in the package login.  So the full 
path for the class is WEB-INF/classes/login/UserBean.class. 

  I've also tried the following: 

  1.  Recompiled the class without the package and placed the class in 
WEB-INF/classes. 

  2.  Created jar file with package.  Placed the jar file in WEB-INF/lib. 
This also did not work, so I tried /lib and /common/lib which also didnt 
work.  I tried all of these locations with and without the package 
designation. 

  3.  I've added the individual class and the jar file to the classpath. 

  I am sure I am making a simple mistake but cant seem to figure out what 
that mistake is.  According to (my understanding of) the documentation, 
placing the class files in WEB-INF/classes should be all I need to make them

accessible to the jsp, am I mistaken? The text from the errors was rather 
lengthy, so I have not included it, if necessary I would gladly forward it 
on. 

  If anyone has a possible solution, or perhaps advice on other sources to 
peruse to solve the problem, I would greatly appreciate it. 

  Thanks 

  -b 

  Bill Halpin 
  Schwoo, Inc 
  412-481-3301 
  bill@schwoo.com 



  


RE: Urgent - class loading issue

Posted by Suzanne Reiner 8423 <sr...@fnac-usa.com>.
Have you added a servlet context (referencing your application) to the
server.xml file?

Suzanne