Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet Error  RSS feed

 
maha devan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people

I have written a servlet code in Tomcat
I am getin the Following error

type Status report

message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).

Anybody to help on this. Why I am getting this error

Thanks
Maha
 
Praful Thakare
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I guess your servlet is missing doGet method..
also how are you invoking this servlet..
1) by typing url in browser ? (this will invoke doGet)
2) thru some link ? (this will invoke doGet)
3) by submit the form ?(this will invkoe method depending on method attribute of form tag)

Cheers
Praful
 
maha devan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can u pls see the previous post it would be as "How to set conf file file" mahadevan
There I have given the code.
I am doing servlet mapping and invoking the servlet through my browser.

Thanks
Maha
 
Praful Thakare
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maha devan,
Do these changes
1) define your ServletSample class public
2) add doGet method to it.
Cheers
Praful
 
maha devan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Thanks

It works
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!