• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Poblem with doPost() and doGet() method?

 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
reply
    Bookmark Topic Watch Topic
  • New Topic