Solved

Deploying a .war on Tomcat

Posted on 2003-11-21
6
2,656 Views
Last Modified: 2012-08-14
I have .war (downloaded from net) and i want to deploy that to my Tomcat4.1. I put the .war in webapps and on startup of tomcat it opens up and gets deployed. but the thing is it has multiple directories and the top most directory "samples" doesn't contain the WEB-INF but a directory inside this "samples" , which is "tsamples", contains the JSPs and WEB-INF directory. in WEB-INF/classes it has got some servlets (in packages) and the also has the required .xml file( i.e. mapping for servlets to /servlet/*) . But when i invoke the servlets (in web-inf/classes/client/servlets) through the html (in /samples/tsamples/html/abc.html) it gives http status 404. the address i am using for servlet calling is http://localhost/samples/tsamples/servlet/name_of_servlet.
 
In the tomcat logs i have
2003-11-21 23:23:45 ContextConfig[/samples]: Missing application web.xml, using defaults only

Do i need to have an .xml in the "samples" ... ? Can anyone suggest something on this.

thanx.

0
Comment
Question by:asip
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 9

Expert Comment

by:vzilka
ID: 9802924
Copy the tsamples directory to the webapps directory. You must have a WEB-INF directory that contains a web.xml file in each web application you deploy.
0
 

Author Comment

by:asip
ID: 9806453
But the url for all html and servlets are with respect to samples. I'll have to change everything in the code in that case.

thanks
0
 
LVL 9

Expert Comment

by:vzilka
ID: 9808731
Another alternative is to move the WEB-INF directory to the samples root (instead of tsamples).
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:asip
ID: 9818200
I tried that, but it gives error.
It throws some load exception in the servlets. I am trying to look into this and will get back to you soon.


thanks
asip
0
 
LVL 9

Accepted Solution

by:
vzilka earned 500 total points
ID: 9818211
Can you give the URL from where you downloaded the WAR? this sounds very weird.
0
 

Author Comment

by:asip
ID: 9820046
I am sending the information on ur mail id liran@2train4.com
0

Featured Post

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question