struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: [URGEN] Validation in Action and using redirection to view result page :(
Date Wed, 12 Apr 2006 12:03:23 GMT
Hi bowlkhin,

the approach that I used is this:

I have a JSP tile which just contains the HTML for errors and messages 

I put a scriptlet in this tile after the errors and messages tags.

The scriptlet removes the error or message from the session.

Hope that helps.


Pham Anh Tuan on 12/04/06 07:42, wrote:
> Hi all,
> case:
> I use Tiles and Velocity for presentation layer
> com.project.GeneratedKeyAction: will generated and register information of code or capcha
(or do something here - retrieve list of user type from DB, etc) to session scope.
>   <!-- go to Information & Registration page - this page include registration
information and registration form -->
>   <action path="/rw/gotoInfoPage"
>    type="com.project.GeneratedKeyAction" scope="request"
>    validate="false">
>    <forward name="success" path="aInfoPage"/>
>   </action>
> after user fullfill registration form, he/she submits this form with action /rw/
>   <!-- process registration -->
>   <action name="regFormBean" path="/rw/processRegForm"
>    type="com.project.ProcessRegistration" scope="request"
>    validate="false">
>    <forward name="success" path="/rw/" redirect="true" />
>    <forward name="failure" path="/rw/" redirect="true" />
>    <forward name="systemFailure" path="aLoi"/>
>   </action>
> as you saw, whether or not this registration process is successfull, I want the use back
to the info page (/rw/, if there's any error messages /successful messages,
this will be showed in the info page.
> I read Struts document, and it said that, when I use redirection in forward tag, it means
all values which I saved in request scope will be empty, but ... If I don't use redirection
in forward tag (to forward to the info page - "/rw/gotoInfoPage"), user will see url: /rw/
after the registration process, and if user refresh this page which has the url: /rw/,
errors will occur because there's no form bean or any data to process :( 
> but...
> I couldn't save all my error message or any  messages in session scope, because, where
could I remove that messages from session scope after process was successful :(
> Again, plz help me to solve this problem!
> thanks in advance :(
> bowlkhin

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message