Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java Servlet Deployment Descriptor Question

Reply
Thread Tools

Java Servlet Deployment Descriptor Question

 
 
Nazario Cipriani
Guest
Posts: n/a
 
      10-25-2006
Hi guys,

my question is as follows.
If I assume the desployment descriptor below (shortened):

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name> XYZ </display-name>
<description> XZY </description>

<servlet>
<servlet-name> servlet </servlet-name>
<servlet-class>
soap.SoapServlet
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>servlet</servlet-name>
<url-pattern>/servlet_1/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>servlet</servlet-name>
<url-pattern>/servlet_2/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>servlet</servlet-name>
<url-pattern>/servlet_3/*</url-pattern>
</servlet-mapping>
</web-app>

Now my question: Is the same servlet instance accessed by three
different URLs or is there for each URL an own servlet instance running
(are there three instances of the servlet running)?

Regards,
Nazario.
 
Reply With Quote
 
 
 
 
Manish Pandit
Guest
Posts: n/a
 
      10-25-2006
Hi,

AFAIK, there will be only 1 instance of the servlet running in this
case.

However, it'd be interesting to know if you put 3 servlet elements all
pointing to the same <servlet-class> but with different <servlet-name>.
In that case, I believe it'd be 3 instances.

-cheers,
Manish

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieving the list of security roles from EJB deployment descriptor tremalnaik@gmail.com Java 0 04-18-2007 09:55 AM
How to alter deployment descriptor from jboss? stromg@gmail.com Java 0 12-04-2006 12:21 PM
How to alter deployment descriptor from jboss? stromg@gmail.com Java 0 12-04-2006 12:11 PM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Weblogic deployment descriptor datasource question Jeff Kelm Java 1 09-11-2003 01:47 AM



Advertisments