Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Login then Retrieval

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

 
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic