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


shiva rao
Ranch Hand

Joined: May 26, 2005
Posts: 31
Hi All,

I created sample servlet and placed at WEB-INF\classes. And I created the web.xml kept under web-inf folder and created a war file using the following commonad.
jar cvf sam.war -C build .
Which intern created the mani-fest file.

And deploy this war on tomcat server. Now I am not able to access this servlet. Then I went to manager to manage application. It show me that this application started (status). But all other sample applications running on this server is working fine.

Did I missed anything while packing the war file.
I am using Tomcat 5.5.

Thanks in advance.
Shiva Rao
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42608
Now I am not able to access this servlet.

What does this mean? Which URL are you hitting, and what response are you getting? What does your mapping in web.xml look like?

Ping & DNS - my free Android networking tools app
shiva rao
Ranch Hand

Joined: May 26, 2005
Posts: 31
Here is my web.xml is...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

I created the war as sam and context is same. I am using following url to access my sample
It show the error 404.

description :The requested resource (/sam/sample) is not available.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I created sample servlet and placed at WEB-INF\classes

You mean WEB-INF\classes\com\sample\SampleServlet.class, right?'

Did the war file get unpacked?
If so, is there a WEB-INF directory in the root of the application?

You said you deployed it. How did you do it, the manager app, by dropping it in the webapps directory?
[ November 10, 2005: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
shiva rao
Ranch Hand

Joined: May 26, 2005
Posts: 31
Thanks all,

I figured out the problem. I made a mistake initially while specifying the url-patteren. After fixing it, my ant script is not picking up right version which caused this problem.

Now I need to fix the ant program.

Thanks again

shiva rao
I agree. Here's the link:
subject: deployment