Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web.xml

 
Ram Pathan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Puneet Agarwal
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that the problem is with the value of Context path. Set the context path to /arithmetic and try.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic