# web.xml

Ram Pathan

Greenhorn

Posts: 24

posted 12 years ago

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 ]

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]

Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |