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 Struts and the fly likes Hibernate and Struts: Displaying default values in html:text tags 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 » Frameworks » Struts
Bookmark "Hibernate and Struts: Displaying default values in html:text tags" Watch "Hibernate and Struts: Displaying default values in html:text tags" New topic
Author

Hibernate and Struts: Displaying default values in html:text tags

L Duperval
Ranch Hand

Joined: May 14, 2003
Posts: 63
Hi,

I'm using Hibernate, Struts 1.1 and JSP's to build an application. I'm stumped on an easy question: how do I display the default value for an <html:text/> tag? Here is the situation:

- A user wants to edit an entry in the database
- She enters the key to locate the entry
- The search action find the entry, creates an object and sticks it in the session
- On my JSP page, I want to display the content of the object with text inputs, which contain the current values for the object.

I'm using a <html:form> to display the contents., however, I haven't figured out how to initialise the values properly. I'm sure this is a very basic question, but for the life of me, I can't figure out how to do it correctly.

Can anyone nudge (or push or shove) me in the right direction?

Thanks,

L
[ September 23, 2004: Message edited by: Laurent Duperval ]

Live Free, Live Happy
L Duperval
Ranch Hand

Joined: May 14, 2003
Posts: 63
And of course, as soon as I asked the qestion, I saw the light...

L
 
 
subject: Hibernate and Struts: Displaying default values in html:text tags
 
Similar Threads
Problem Passing Parameter values to action
Struts making me nuts :)
Should I use form beans ?
DynaValidatorForm not redisplaying scoped variables
logic:iterate for counter