• Post Reply Bookmark Topic Watch Topic
  • New Topic

really simple servlets,but why second one not work  RSS feed

 
vitesse wei
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I write two servlets as belows:
--------------------------------------------------------

-----------------------------------------------

------------------------------------------------------
and web.xml file
------------------------------------------------------

---------------------------
problem is when I request first servlet,it works fine,but second one is not,it says "HTTP method GET is not supported by this URL",but i have doGet in my second servlet,I shaped two examples almost same,but still can not fix it,my container is Apache Tomcat 5.0.27,any idea?thanks advance!
 
vitesse wei
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for view,after several times deploys,tomcat finally make second one work,mabey some cache in tomcat,but i did see that tomcat restart my apps context in its terminal every time i redeploy my app!?
 
Brijesh shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope you have given proper path in <servlet-class> tag..

If path is correct and doesn't work then delete all the files from
Tomcat 5.5\work\Catalina\localhost and restart your server.

It will work.

Regards,
Brijesh
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!