You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Fenderbosch, Eric" <Er...@fedex.com> on 2003/10/08 21:24:15 UTC

Normal Application Flow?

This is how I'm envisioning my application flow.  Is this standard, completely out of whack, or somewhere in between?

1.  User enters/clicks on context URL, like /track.
2.  Appserver finds welcome file, index.jsp.
3.  index.jsp does a forward, via global-forward w/ redirect, to /track/do/login.
4.  login action sees username is blank and forwards to /track/login.jsp. (Can't hide jsp in WEB-INF because we are using WebLogic 6.1)
5.  User enters username and password, and submits to /track/do/login.
6.  login action sees username is NON blank, calls login class and upon login success, forwards w/ redirect to /track/do/track.
7.  track action detects form is empty and forwards to /track/track.jsp.
8.  User enters data and submits to /track/do/track
9.  track form performs validation.
10. track action submits user data to track business class.
11. Business class returns result object.
12. track action puts result object in response/session.
13. track action forwards to /track/results.jsp.
14. results.jsp extracts result object from response/session and displays to user.

I've also got a LoginFilter which checks that the user is logged in before allowing access to /do/track, but I didn't want to complicate the outline.

Also, what is the purpose of the input attribute of an action?

Thanks.

Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Normal Application Flow?

Posted by Ted Husted <hu...@apache.org>.
The flow seems fine.

If validation faile (9), the controller needs to know where to forward 
the request to display the error messages and capture the corrected input.

In Struts 1.1, input is a URI path by default, but you can switch over 
to a forward, if that's more convenient.

HTH, Ted.

Fenderbosch, Eric wrote:

> This is how I'm envisioning my application flow.  Is this standard, completely out of whack, or somewhere in between?
> 
> 1.  User enters/clicks on context URL, like /track.
> 2.  Appserver finds welcome file, index.jsp.
> 3.  index.jsp does a forward, via global-forward w/ redirect, to /track/do/login.
> 4.  login action sees username is blank and forwards to /track/login.jsp. (Can't hide jsp in WEB-INF because we are using WebLogic 6.1)
> 5.  User enters username and password, and submits to /track/do/login.
> 6.  login action sees username is NON blank, calls login class and upon login success, forwards w/ redirect to /track/do/track.
> 7.  track action detects form is empty and forwards to /track/track.jsp.
> 8.  User enters data and submits to /track/do/track
> 9.  track form performs validation.
> 10. track action submits user data to track business class.
> 11. Business class returns result object.
> 12. track action puts result object in response/session.
> 13. track action forwards to /track/results.jsp.
> 14. results.jsp extracts result object from response/session and displays to user.
> 
> I've also got a LoginFilter which checks that the user is logged in before allowing access to /do/track, but I didn't want to complicate the outline.
> 
> Also, what is the purpose of the input attribute of an action?
> 
> Thanks.
> 
> Eric
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org