File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to access hidden property in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to access hidden property in jsp" Watch "How to access hidden property in jsp" New topic
Author

How to access hidden property in jsp

shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
hi all,

i have a property where i'll set some true/false value to that property in action class and forward to jsp, now based on that property value i'll have to display a field. suppose if i have a hidden field for that property
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If you're making a *decision* based on an arbitrary property, you don't need to make it a hidden property--unless you need to send it back to the server (which is where it came from in the first place). You can simply set a request attribute with the value and test for it in the JSP using a <c:if...> tag.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to access hidden property in jsp
 
Similar Threads
Buttons EventHandler and Property-Setting
Accessing javascript variable in jsp
How To Output the Value of A Hidden Field?
Jsf rerender using javascript
how to avoid hedden field value displaying