This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with hidden field  RSS feed

 
rahul vasishta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,


How to set the value of hidden field from Action class? I have JSP and Action class defined for the JSP Page. I havent defined the Form class for it.
Is it possible to set value for hidden filed and retrieve it on submit without having Form class defined for JSP Page?

-Rahul
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
without having Form class defined for JSP Page

This is a little confusing. In struts form classes are defined for Actions not JSP pages. There's a html:hidden tag which can be easily used for your requirement...

[After reading David's reply, I think I misunderstood the question , but I beat David by 10 seconds ]
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always get values directly from the request, but... I'm not so sure that I would.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!