Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question abt web.xml file

 
Subbu Aswathanarayan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am using NT/IIS4.0/JRun3.1 combination in a project I am working on rit now.I have read a lot abt this web.xml file.but till now, for me, the need for editing this file never arose.
is it ok to have an empty web.xml file in an web application.will i encounter any problems due to this?if i do need to enter something in to the web.xml file what should i enter?
please explain the use of this file.
Thanks.
Subbu
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JRun 3.1 follows the Java servlet 2.2 API specification - downloadable from java.sun.com
You will need to use web.xml for all but the simplest servlets - the JRun administration application will configure it for you if you don't want to edit it directly. Study the existing JRun web.xml files.
Bill
 
Jason Kilgrow
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never ABSOLUTELY needed a web.xml file. There are certain things that you can put in it to make life somewhat easier.
Probably the thing that people use most is the servlet mapping.
Say you were re-writing a cgi app into a Java servlet but you didn't want to run all over your html code and change the name. You wanted the action on your forms to stay "cgi-bin/MyApp.exe" (or whatever). But you really wanted to use a servlet instead of the cgi. No problem. All you have to do is make a servlet mapping from cgi-bin/*.exe to point to your servlet MyServlet.
There is really good documentation (I think it's good) that comes with Tomcat. jakarta.apache.org
Or you could download the servlet 2.x specification from the same site.
Originally posted by Subbu Aswathanarayan:
Hi all,
I am using NT/IIS4.0/JRun3.1 combination in a project I am working on rit now.I have read a lot abt this web.xml file.but till now, for me, the need for editing this file never arose.
is it ok to have an empty web.xml file in an web application.will i encounter any problems due to this?if i do need to enter something in to the web.xml file what should i enter?
please explain the use of this file.
Thanks.
Subbu

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic