• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

really simple servlets,but why second one not work

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!?
 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't listen to Steve. Just read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic