• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to pass fixed string parameter value when a jsp action is called.

 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a jsp where i need to pass a hidden fixed string value to the doPost method everytime the jsp's submit button is hit and POST action is called.

Is it possible to pass a default string value everytime that jsp is submitted so that i could get that hidden string value via request.getParameter() in the doPost method?

Thanks in advance



 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just create a hidden input in the form.
 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear Bibeault , I created an input hidden field like the one shown below:



and pass the String "0" whenever the jsp is submitted.

It works for me now!

Thanks for the help provided.


Best Regards

Moieen
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!