Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get disabled values from HttpServletRequest parameter

 
Gajen Pingalkar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my JSP-HTML page. I have few element (Input element - text, checkbox and radio button). When this page come's in edit mode I disabled all element (by disabled=true). After disabling I am not getting parameter from Request (HttpServletRequest) in my Action (Action Servlet - java).
How I can get values from request, when element is disabled, without putting value in Request Attribute or session.
Please reply.

Thanks,

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Send it as a hidden field and check for it. Disabled fields aren't sent (at least in some browsers; I don't know if that's true for all browsers or not).
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64837
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Disabled fields are not sent as part of the form submission. Any browser that would send them is broken.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic