Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the invoker servlet

Status
Not open for further replies.

KerenE

Programmer
Nov 20, 2003
10
IL
Hi.

I would like to get more information about the invoker servlet.
It is defined in conf/web.xml as follows:
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>
org.apache.catalina.servlets.InvokerServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>


I want to remove these lines, so that only sepecific servlets will be processed. I have made a list of these servlets in my own webapps/myapp/WEB-INF/web.xml.
it looks like:
<web-app>
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>myapp.core.servlet.MyServlet</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
...
</web-app>

Can I add a mapping of my own servlets into this file, and remove the conf/web.xml?
Is the invoker servlet can be removed as well (As I already mentioned, I want to forbid processing of servlets which are not included in my list).

Can you please show me how to do it(how to define a mapping to my servlets)?

Thanks
Keren.
 
If you comment out the invoker servlet (don't delete conf/web.xml), then in your context web.xml, the following lines will be needed :

<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>myapp.core.servlet.MyServlet</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/servlet/MyServlet</url-pattern>
</servlet-mapping>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top