Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Deploying WAR file on Tomcat  RSS feed

 
Ranch Hand
Posts: 102
  • 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
 
Sheriff
Posts: 67261
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
  • 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
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 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
  • 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
 
machines help you to do more, but experience less. Experience this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!