Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

Java Servlet Deployment Descriptor Question

Thread view: 
Nazario Cipriani - 25 Oct 2006 13:07 GMT
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.
Manish Pandit - 25 Oct 2006 18:38 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.