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

Regarding doGet and doPost  RSS feed

 
Chandu Sree
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what will happen if you are calling doPost() method in form and you have doGet() method in your servlet.

we will get any exception or else the doGet() method wil be called?


Thanks!!
[ November 05, 2007: Message edited by: Ben Souther ]
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If form method is post thn doGet() method will not be called.
Server will give messgae some thing like "post method is not supported"
 
Chandu Sree
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chandu Sree,
Welcome to JavaRanch!

In an effort to everyone you get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.
In particular please see:
UseRealWords


Abbreviations such as "u" or "ur" in
place of "you" and "you are" or "you're" confound language translation software making
it hard for our non-English speaking members to read your posts.
"plz" is not a word in the English language.

Again, welcome to JavaRanch and good luck with your question.
-Ben
 
shadul shaikh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You will get an exception. Obviously, no methods will be called.
If you did not mention any method in HTML page then you have to write as
public void doPost(.....) throws ......
{
doGet(request,response);
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!