Big Moose Saloon
 Search | Java FAQ | Recent Topics Register / Login

# 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: 5698

1

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.

I agree. Here's the link: http://aspose.com/file-tools

subject: Tomcat server/lib location when running inside Eclipse?