aspose file tools*
The moose likes Struts and the fly likes Login then Retrieval Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Login then Retrieval" Watch "Login then Retrieval" New topic
Author

Login then Retrieval

Itenas
Greenhorn

Joined: Oct 29, 2004
Posts: 3
Hi,

What is the best way to implement this sample flow?

1. There are only 2 pages, login.jsp and profile.jsp
2. Each of the views (login.jsp and profile.jsp) have its corresponding Action Form and Action Class.
login.jsp >> LoginFormBean.java and LoginAction.java
profile.jsp >> ProfileFormBean.java and ProfileAction.java
3. On login, the execute() of LoginAction will be invoked. This method checks if the user and password is valid or not.
4. If valid, the profile.jsp will be loaded. However, the page should contain the data of the user.

The retrieval of user data is contained in execute method of ProfileAction.

How can I retrieve the data after the login process but before loading the profile.jsp?

Also, is it possible to attach an instance of ProfileFormBean aside from LoginFormBean to the ActionMapping of LoginAction?

Thanks.
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
How can I retrieve the data after the login process but before loading the profile.jsp?


Yes, you can retrive data before open profile.jsp .

Solution :: you can change config of login's action in struts-config.xml.

example



SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Login then Retrieval
 
Similar Threads
Need an attribute to be available in different places (SOLVED)
Setting HttpSession Attribute Not Working (Struts)
Struts 2 welcome-file-list
"No configuration found for the specified action"
Compiler error in Action class - configuring data source in struts-config.xml. Please help!