It's not a secret anymore!
The moose likes Servlets and the fly likes Web.xml files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Web.xml files" Watch "Web.xml files" New topic

Web.xml files

Brian Mulvany

Joined: Oct 19, 2004
Posts: 28
I have created several Java classes that will search for cds by an artist or album name and will parse some of the information. The search it carries out on the site is dependant on what the runtime paramaters for the program are set to.
I have created a servlet (in a seperate package)in JBuilder that has a shtml form. I enter a value in this form and this value is used as a paramater for the package with all the parsing classes. This works in JBuilder. So when I enter in U2 in the shtml form it will search CDWow for cds by U2.
I want to get this working outside JBuilder. I see somebody mentioned you have to change the web.xml file so it will work for whatever file you are trying to create.
When I try and request the shtml file by typing in the following
it says it cannot find the file, but if I resave the form as form.html it can find that and it works grand in JBuilder. But as the web.xml file is set up for shtml the html version wont work. So I was thinking if I alterthe xml file to work for html it might work.

There are two parts of the code that might need changing included below.



Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
See the tomcat docs.
If 5.0 see

Moreover, you should download servlet spec, and jsp spec from Read about web.xml and its elements.
[ March 06, 2005: Message edited by: Adeel Ansari ]
I agree. Here's the link:
subject: Web.xml files
It's not a secret anymore!