Meaningless Drivel is fun!
The moose likes Servlets and the fly likes Need help with web.xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need help with web.xml file" Watch "Need help with web.xml file" New topic

Need help with web.xml file

northfield Sid
Ranch Hand

Joined: Aug 08, 2002
Posts: 106
I want to create an web.xml page
I frequently access a servlet page with this command:
Is it possible to avoid typing this tedious line by using the web.xml file?
Here is what I have tried:

so thus the code now becomes:
2nd question:
I have put the web.xml file at this location:
The file and rest of Java pages are at:
and all my HTML and JSP pages are at:
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
With the servlet-mapping tag in place, you shouldn't need /servlet in your url. It also appears that you have a problem with your context. Your webapp folder is called myJSPs-XML, but you are typing myJSPs in your URL. Unless you have changed your context in the Tomcat configuration file, that shouldn't work.

Matthew Phillips
I agree. Here's the link:
subject: Need help with web.xml file
It's not a secret anymore!