This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes Tomcat server/lib location when running inside Eclipse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Tomcat server/lib location when running inside Eclipse?" Watch "Tomcat server/lib location when running inside Eclipse?" New topic
Author

Tomcat server/lib location when running inside Eclipse?

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
I'm trying to get this example working.

http://www.christianschenk.org/blog/setup-your-own-tomcat-security-realm/

He mentions putting a jar in Tomcat's server/lib directory. But I'm not sure how to handle that since I have Tomcat integrated into Eclipse.

What is the best way to handle this for just one project? Also, is there an easy way to make sure that the jar gets integrated into the war?

TIA.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

When you configured Tomcat within Eclipse you had to tell Eclipse where Tomcat was installed. Please the JAR file into the lib directory at that location.

If you don't remember where you told it, look in Preferences at Server | Runtime Environments.


JBoss In Action
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
Alternatively you can put lib folder of your web application so that it will be part of your war.
Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
Peter Johnson wrote:When you configured Tomcat within Eclipse you had to tell Eclipse where Tomcat was installed. Please the JAR file into the lib directory at that location.

If you don't remember where you told it, look in Preferences at Server | Runtime Environments.


-nods- I ended up figuring that out. Thanks.
Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
Kj Reddy wrote:Alternatively you can put lib folder of your web application so that it will be part of your war.


Realms are bootstrap loaded, so they have to be in the tomcat lib directory. They get processed before tomcat ever makes it to the war.
 
Don't get me started about those stupid light bulbs.
 
subject: Tomcat server/lib location when running inside Eclipse?