• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About some web descriptor dtd's

 
Herbert Maosa
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Herbert Maosa
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic