| Author |
servlet not loading
|
Sivaraman Lakshmanan
Ranch Hand
Joined: Aug 02, 2003
Posts: 231
|
|
Hai all, I am developing a web page which uses servlets and JSP. I am using Tomcat server. when I load all my JSP pages are working fine but when i call a servlet i get a error saying that the page u r requesting is unavailable. How to solve this problem. I have given all details in web.xml file also. siva.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
What is the syntax you are using for calling the servlet? If you are using "../servlet/myservlet" than it sounds like the ever-popular "invoker" servlet problem. Bill
|
Java Resources at www.wbrogden.com
|
 |
Sivaraman Lakshmanan
Ranch Hand
Joined: Aug 02, 2003
Posts: 231
|
|
yes I am using the same to invoke the servlet. Then what is the soln for the problem siva
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
You say : I have given all details in web.xml file also. What are those details? Does this mean you've supplied a <servlet>, <servlet-mapping> couplet for each servlet you're deploying?
|
 |
Sivaraman Lakshmanan
Ranch Hand
Joined: Aug 02, 2003
Posts: 231
|
|
|
yes, I have given servlet-name,servlet-class,servlet-mapping etc in the web.xml file.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
The "invoker" servlet is a convenience thing that (In my opinion) is a disaster. You can read about it in the ../conf/web.xml file. You should not use the invoker, instead, use web.xml to create a servlet mapping from a URL to your servlet name. Bill
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
Sivaraman, If you've got the proper mappings, then you shouldn't be putting /servlet into the call to the servlet. If it's there, take it out. You don't tell us "how" you call your servlets, so I can only assume you're doing something like: form action="/servlet/url-mapping" take out the /servlet part
|
 |
Sarath Mohan
Ranch Hand
Joined: Mar 17, 2001
Posts: 213
|
|
I still have the problem.... Could you please give me the code in web.xml and form action tag for a simple HelloServelt
|
Sarath Mohan
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
Here's a start ServletInvoker FAQ Read 'The Middling Tale' for the mapping info.
|
 |
 |
|
|
subject: servlet not loading
|
|
|