| Author |
web xml file
|
venkatesh badrinathan
Ranch Hand
Joined: Aug 03, 2008
Posts: 77
|
|
i am new to servlet technology. i have written my first servlet program and placed it in web-inf/classes folder in tomcat. and my html page in root directory. the issue is whether i should configure web.xml file or not?(although i configured it, i got 404 error, saying that the particular servlet file is not found). i have heard my friend saying that when we place html file in root directory, we do not need to configure xml file. why is that so?? can someone explain please..
|
SCJP1.5
|
 |
Harinath Kuntamukkala
Ranch Hand
Joined: May 17, 2005
Posts: 37
|
|
Hi, You must configure the Servlet in web.xml file. Thanks, Hari
|
 |
venkatesh badrinathan
Ranch Hand
Joined: Aug 03, 2008
Posts: 77
|
|
hi harinath, i have configured my xml file but got the err 404 as i have mentioned above. how should i fix this? my xml file is as follows, here 'vec' is the servlet prog name and the class name itself, whose class file is been placed in classes folder inside web-inf dir. is there any err in my xml file..(i always go wrong in configuring xml file). please provide some links or explain me if possible. thanks in advance.
|
 |
Pavlos Chatzidimitriou
Greenhorn
Joined: Aug 18, 2008
Posts: 10
|
|
|
I think you should remove and and it will be ok.You can look here for more details.
|
 |
venkatesh badrinathan
Ranch Hand
Joined: Aug 03, 2008
Posts: 77
|
|
althogh i removed the comment tag, my servlet is not invoked.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
All classe used in servlets should be in a package to avoid mysterious problems. You may be following an old pattern that depended on the dreaded Invoker servlet. Bill
|
Java Resources at www.wbrogden.com
|
 |
Harinath Kuntamukkala
Ranch Hand
Joined: May 17, 2005
Posts: 37
|
|
Hi Venkatesh, The problem is that the server is not able to find your servlet. Please check wheather the corresponding class file (with package structure) is in WEB-INF/classes folder or not. Thanks, Hari
|
 |
 |
|
|
subject: web xml file
|
|
|