aspose file tools*
The moose likes Struts and the fly likes urgent help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "urgent help" Watch "urgent help" New topic
Author

urgent help

ragu pathi
Greenhorn

Joined: Sep 15, 2009
Posts: 2
im new to struts ..
i hv created user registration form...wen user clicks confirm button after entering all fields ...it directs to create page wer user could find all the details entered..in tat page wen user clicks create button,the user account will b created in the database..nd login page will b open..
in case if user enter wrong values,user can click back button which again directed to user registration form wer user can find all the entered values n all fields(textbox or dropdown etc)which is editable...


so how 2 populate the entered values wen user clicks back button???
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9302
    
  17

Hi Ragu, welcome to javaranch.

Please Use Real Words in your posts and Ease Up.

Can you tell us whether you are using Struts 1 or Struts 2...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
ragu pathi
Greenhorn

Joined: Sep 15, 2009
Posts: 2
i am using struts-2.1.6.GA...
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9302
    
  17

For the values to be automatically filled into the respective textboxes, they'll need to be properties in action which will show that page. And those properties need to be filled with the respective values. If that's not possible, then you'll have to manually fill the values of the textboxes using OGNL or EL...
Pavel Kazlou
Ranch Hand

Joined: Sep 07, 2009
Posts: 33
Hi Ragu.
I would like to add that you should use more informative topic name.

In your scenario you use two HTTP requests. The first for submiting form. The second for returning back to form (of course this back button is not browser's one!). The thing used to pass the information between HTTP requests is HTTP session. In case of struts 2 to use session you have your Action class to implement SessionAware interface, which will demand your class to implement method "setSession". The framework then use this method to pass your Action a Map which you can use to store all the fields when submitting form and retrieve them when returning back.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: urgent help