File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploying WAR file on Tomcat

 
Simon Joseph Aquilina
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Simon Joseph Aquilina
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Simon Joseph Aquilina
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben

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

Thanks and Regrds,
Sim085
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic