0

I have two servlets s1.class, s2.class in com package. deployed them under

\Tomcat 5.5\webapps\STEST\WEB-INF\classes\com\classes\s1.class

\Tomcat 5.5\webapps\STEST\WEB-INF\classes\com\classes\s2.class

in web.xml did entries as follows :

<servlet>
<servlet-name>s1</servlet-name>
<servlet-class>com.s1</servlet-class>
</servlet>

<servlet>
<servlet-name>s2</servlet-name>
<servlet-class>com.s2</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>s1</servlet-name>
<url-pattern>/s1</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>s2</servlet-name>
<url-pattern>/s2</url-pattern>
</servlet-mapping>

after running tomcat localhost:8080/manager/html/list I could see only STEST folder and after clicking it it says :

description The requested resource (/STEST/) is not available.

What is wrong I am doing?

user1145280
  • 371
  • 1
  • 2
  • 10

2 Answers2

1

The manager/html/list, just lists the deployed contexts, it doesn't list the servlets.

There is no servlet configured to respond requests to the '/' on STEST context. This is why you are receiving the error.

I am not aware of a default servlet that lists the context mappings but you can add another servlet that lists the available servlets; and map it to '/' to achieve what you need.

harun
  • 1,889
  • 18
  • 19
  • I want to run s1 and s2 separately.. so how should I configure it. (i am new to java ) thank you very much for your reply – user1145280 Feb 28 '14 at 13:30
  • Your s1 and s2 are running already separately. On /STEST/s1 and /STEST/s2 respectively. The manager/html/list, just lists the deployed contexts, it doesn't list the servlets. – harun Feb 28 '14 at 13:34
0

I want to run s1 and s2 separately.. so how should I configure it.

Well, if your servlets are in package com then you need to place them under \Tomcat 5.5\webapps\STEST\WEB-INF\classes\com\s1.class. You have an extra \classes\ in your path. Tomcat cannot find your servlets.

Boss Man
  • 587
  • 2
  • 12