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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Passing parameter between pages and populating page with values.

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Say I have 2 java beans. 3 properties with getters and setters)
empPassword ( 3 properties with getters and setters)

And I have 2 jsp pages(empLogin.jsp,empDetail.jsp)

User will enter Login & password in empLogin.jsp page and it will have a method will check user credentials and it will return empId in case of success.

When user login & password is correct I'd like to send this empId to empDetail.jsp page and I'd like to query employeedetail table based on empId and show employee details on empDetail.jsp page.

Please let me know how to do these tasks for above situation:

1. How to pass empId between the pages. ( bean is in session scope).

2. In empLogin.jsp, I have submit button where I'm calling checkUser() method for validating empLoginName and password, in this method I'm calling antother method selectEmployeeDetail(which will retrive data for given empId) in, this method is invoking fine but the data is not showing up in empDetail.jsp page.

3. In dataTable tag, we can invoke a method from java bean to populate data but how to do similar in <h:form> tag.

Thanks in advance.

To do a great right, do a little wrong - shakepeare. twisted little ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic