File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes get disabled values from HttpServletRequest parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "get disabled values from HttpServletRequest parameter" Watch "get disabled values from HttpServletRequest parameter" New topic
Author

get disabled values from HttpServletRequest parameter

Gajen Pingalkar
Ranch Hand

Joined: Aug 29, 2006
Posts: 37
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jan 10, 2002
Posts: 61215
    
  66

Disabled fields are not sent as part of the form submission. Any browser that would send them is broken.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: get disabled values from HttpServletRequest parameter