dcsimg
Running Servlet in Tomcat 4.1
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Titu_Prusty
Posted On:   Thursday, April 15, 2004 01:12 AM


			

I have wrirren a servlet name MyServlet.java. I have
complied it and kept the .class file inside class directory.But when i invoke, it is giving me message "page not found".

When i kept the MyServlet.class inside example it is working well.I am not able to know what is the problem.

I have done mapping in web.xml, then also it is not working.

So may times i have run servlet in Tomcat 3.2.3 and worked on servlet.But i am not able to know why it is not running in Tomact 4.1 under a Context name "Parabank"

Re: Running Servlet in Tomcat 4.1

Posted By:   Dhiraj_Asrani  
Posted On:   Thursday, April 15, 2004 06:19 AM

Hi Himanshu...

Web.xml had errors.

We need two mappings
Servlet : defines name and class.
servlet-mapping : name to URL.

This is based on a common attrib servlet-name.(this is enetered in the URL).

e.g:



Hello
HelloWorldExample
1



Hello
/Hello


Re: Running Servlet in Tomcat 4.1

Posted By:   Dhiraj_Asrani  
Posted On:   Thursday, April 15, 2004 02:04 AM

Hi Titu..
Can u send ur servlet to me on: dhirajasrani@yahoo.com
I shall replicate the same and get back to you with the solution asap.
Best Regards,
Dhiraj.
About | Sitemap | Contact