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

web.xml

Ram Pathan
Greenhorn

Joined: Dec 08, 2003
Posts: 24
hi
i have the following package structure in the webapps directory of my tomcat.
arithmetic
arithmetic/WEB-INF
arithmetic/META-INF
arithmetic/WEB-INF/web.xml
arithmetic/WEB-INF/classes/arithmetic
arithmetic/WEB-INF/classes/arithmetic/Arithmetic.java
arithmetic/WEB-INF/classes/arithmetic/ArithmeticClient.java
arithmetic/WEB-INF/classes/arithmetic/ArithmeticWebService.java
arithmetic/WEB-INF/classes/arithmetic/ArithmeticGateway.java
i have a context path set in the server.xml to /arithmetic/WEB-INF/classes/
My web.xml looks something like ->
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>
ArithmeticGateway
</servlet-name>
<servlet-class>
arithmetic.ArithmeticGateway
</servlet-class>
<load-on-startup>
3
</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>
ArithmeticGateway
</servlet-name>
<url-pattern>
/gateway
</url-pattern>
</servlet-mapping>
</web-app>
when i start my tomcat and try to go to this link ->
http://localhost:8080/arithmetic/gateway i expect to go to ArithmeticGateway.class but i am taken to a error page.
can some one let me know what the problem could be ?
thx in adv
tc
[ March 10, 2004: Message edited by: Kituz Greenluv ]
[ March 10, 2004: Message edited by: Kituz Greenluv ]

-Kituz
[SCJP, SCWCD, SCBCD, SCDJWS, SCEA 1/3]
Puneet Agarwal
Ranch Hand

Joined: Jul 15, 2003
Posts: 49
My guess is that the problem is with the value of Context path. Set the context path to /arithmetic and try.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web.xml