Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deployment

 
shiva rao
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
shiva rao
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>SampleServlet</servlet-name>
<servlet-class>com.sample.SampleServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SampleServlet</servlet-name>
<url-pattern>/sample</url-pattern>
</servlet-mapping>
</web-app>

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

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

Thanks
shiva
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created sample servlet and placed at WEB-INF\classes


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


Also:
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 ]
 
shiva rao
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic