Even though tomcat is installed properly, when we send a request for an existing servlet from the internet explorer to the tomcat server, the browser is displaying the requested resourse is not available. What to do? Please reply if you know

Showing Answers 1 - 1 of 1 Answers

mikessun

  • May 7th, 2008
 

Most likely you did not define the servlet mapping correctly.
in web.xml file, you define following:
....

 name_of_servlet com.somepackage.TestServlet

....

      name_of_a_servlet
/test_url_pattern/*.do

...

remember the servlet class must be located in WEB-INF/classes or packaged as a jar file and located at WEB-INF/lib directory.

from your browser, type following url to test:
http://tomcat_machine_ip:8000/webappname/test_url_pattern/test.do

it will either give you some compilation exception or display something per your servlet class

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions