Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query about configuration of Tomcat4.0??

 
Bikash Paul
Ranch Hand
Posts: 342
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all friends,
Iam using third party class in my servlet for that I have import that class in my servlet.I want to add that class in my Tomcat server for that I have tried in server.xml file in "conf" directory but couldn't find the way, how i can add that class in server.xml file.My Problem is I can compile my servlet by keeping that class in my classpath but during runtime Tomcat server giving me error(java.lang.NoClassDefFoundError)for that I have to keep that class file in server.xml file or Is there any other way to keeep that class file so that during runtime Tomcat server can find that class.
Regards
Bikash
 
Andy Bowes
Ranch Hand
Posts: 171
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to define it in the configuration file it just needs to be placed in the correct library directory.
If this class is used by multiple applications you could create a JAR file that includes it and place it in the server/lib directory of Tomcat. If it is ounly used by a single application then just place the class in the WEB-INF/classes directory of your application in the web-apps directory.
 
Andy Deighton
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, if it's to be shared, stick the jar in common/lib.
 
Andy Bowes
Ranch Hand
Posts: 171
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ooops. You are quite correct. That will teach me to read my posts before hitting the button
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic