Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Poblem with doPost() and doGet() method?

 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i am new to servlets , i am trying some simple code of Servlet..
I am defining a HTML FORM code in servlets doGet() method , and retrieving a name that user submit through same Servlets doPost() method.
here is method that i defined :


The problem is , the FORM that servlet shows is correct , but when i submitted the form , rather getting HI {fname} , i am getting the same FORM again .

What ll be its solution ??

Thanks in advance.
[ March 04, 2008: Message edited by: Bear Bibeault ]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the FORM tag does not have a method="POST" attribute, it is not not actually performing a POST, but a GET (which is the default in the absence of a method attribute).
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a ton , sir, My problem is solved. actully its my fault that i am not check the code fully , before posting it..

Thanks once again..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic