File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes About some web descriptor dtd's Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "About some web descriptor dtd Watch "About some web descriptor dtd New topic
Author

About some web descriptor dtd's

Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
Alright folks, lead me. I am trying to catch up with y'all.First of all, I am wondering about the significance of <servlet-name>...</servlet-name> in web.xml.... I thought that after configuring this, I will be able to invoke my servlet by refering to this name, as opposed to using it's class name; but apparently I can't.

Herbert
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
the significance of <servlet-name>...</servlet-name> in web.xml....
1. to define custom URL using servlet-mapping.
2. to define init-param's for your servlet.
and others....(I can't think of any right now)
I thought that after configuring this, I will be able to invoke my servlet by refering to this name, as opposed to using it's class name; but apparently I can't.
Did you map this servlet-name to a particular URL using servlet-mapping element?
Let us know the details. I will check again later in the morning......
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
Yes, I did map the servlet to the servlet mapping. So what is happening is that I can access the servlet using the value I put for <servlet-url>..... and not the servlet name.
Herbert.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
So what is happening is that I can access the servlet using the value I put for <servlet-url>..... and not the servlet name
IMO, that is the right behavior.
regds.
- satya
 
 
subject: About some web descriptor dtd's
 
Threads others viewed
Servlet Mapping purpose
Run Servlet without registering it in web.xml
Servlet Mapping
Servlet intances for application
About invoke servlet.
MyEclipse, The Clear Choice