This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to access hidden property in jsp" Watch "How to access hidden property in jsp" New topic

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

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.
I agree. Here's the link:
subject: How to access hidden property in jsp