Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

program flow problem

 
Aditi Gandy
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI I am new to Struts and I need to creat a small aplication with login page and POJO.

My program flow goes like this:



Requirement: Login, and display contents of Hashmap to the Home.jsp page if login is success.

My problem is:
After logging in, (if it is successful) how to make the program to go to a class where hashmap is hardcoded (a POJO).....
Assuming that there is a seperat action class for checking login values and a seperate class for hashmap. How to communicate between a POJO and action class??

Any one please help
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ashvini pradeep wrote:
After logging in, (if it is successful) how to make the program to go to a class where hashmap is hardcoded (a POJO).....
Assuming that there is a seperat action class for checking login values and a seperate class for hashmap. How to communicate between a POJO and action class??



Can you make the instance of POJO in Action class ?
 
Aditi Gandy
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i do it? Do i need to import POJO class / implement it in action class and instantiate the POJO class?
How do i do it

Please help.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Import it into your action class and then instantiate it.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!