• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query about configuration of Tomcat4.0??

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, if it's to be shared, stick the jar in common/lib.
 
Andy Bowes
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ooops. You are quite correct. That will teach me to read my posts before hitting the button
 
expectation is the root of all heartache - shakespeare. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic