Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

basics of web.xml

 
Pratibha Malhotra
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a servlet with name HelloWorldServlet by using
http://localhost:8080/chapter01/servlet/HelloWorldServlet
where servlet is a virtual directory which don't exist.
what changes do i have to make to access this servlet without using /servlet
ie by using
http://localhost:8080/chapter01/HelloWorldServlet
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
Make the following changes in the web.xml file that exists in WEB-INF folder:

hth
[ March 31, 2004: Message edited by: Malhar Barai ]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there is a small mistake in the above example. Shouldn't it be:

The chapter01 is defined by the web application
Olli
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In order to avoid various problems, all Java classes used in servlets or JSP should be put in a package. Remember that the location under WEB-INF\classes must reflect the package naming.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic