This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60748
    
  65

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get disabled values from HttpServletRequest parameter
 
Similar Threads
Forward Problem in Struts
reading parameter from the request object in ActionServlet
Redirecting to a URL after actionPerformed in Portlet
the data in form is not being displayed :
HttpSession in JSP