Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing parameter between pages and populating page with values.  RSS feed

sharath kumar reddy karnati
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.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!