Define success and failure forwards in your struts-config file for the
specified action.

In the action class (which should delegate to a business object), 
retrieve the data. Upon failure, forward to the "failure" forward,
else forward to the "success" forward.

You could achieve the same using declarative exceptions.

If the list of countries doesn't vary between users, you
can do this when your application starts up and place the
country list in ServletContext. In this fashion, you only
have a single database hit for getting the countries.

robert

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Muhammad Momin Rashid
> Sent: Thursday, July 22, 2004 10:38 AM
> To: [EMAIL PROTECTED]
> Subject: Form Bean and decions based on Business Logic calls
> 
> 
> Hello,
> 
> I have a form bean which needs to retrieve some information from the
> business logic.  I want to know how I can redirect to different pages on the
> bases of data retrieved.
> 
> e.g. I need to retrieve and display a list of countries for the user to
> select from.  In case of failure to retrieve the information I would like to
> take user to a different page to indicate error.
> 
> What would be the best way to accomplish this?  I am using struts 1.1 with
> Tiles.
> 
> Regards,
> Muhammad Momin Rashid
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to