aspose file tools*
The moose likes Tomcat and the fly likes Deploying WAR file on Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Deploying WAR file on Tomcat" Watch "Deploying WAR file on Tomcat" New topic
Author

Deploying WAR file on Tomcat

Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Hello,

I have an application developed with Struts and Hibernate and I wish to deploy the application on Tomcat.

I installed the latest version of Tomcat and placed my WAR file in the /webapp folder.

I also moved all the libreries used by this system in the /common/lib folder.

However this does not work and when I try to access the website (http://localhost:8080/myapp) I recieve an error that the Action Servlet could not be found. I checked the log files an found out that the system can not find the Struts Action class.

I tried placing the libreriries I need in the /server/lib/ folder as well, but I still recieve an error.

Does anyone has any idea on how to deploy a WAR file using Struts on Tomcat?

I do not know what I am doing wrong!

regards,
Sim085
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

Why did you not place the jars in the app's WEB-INF/lib?

P.S. Restore the server/lib folder to its original condition or you will become unhappy at some point.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
To do that (put all the required libs in my WEB-INF folder should I change some of my configurations in the web.xml file?

regards,
Sim085
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

No Tomcat automatically looks in you WEB-INF/lib folder for libraries.

Your server/lib folder is for libraries needed by the Tomcat.
common/lib is for libraries that are shared between Tomcat itself and your applications (most commonly JDBC drivers to be used by the container managed connection pool).
Libraries needed only by your application should go in your webapps /WEB-INF/lib directory.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Thanks Ben

I successfully managed to deploy my application. I had some Jar files missing.

Thanks and Regrds,
Sim085
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploying WAR file on Tomcat