Hello. I am currently learning how to use
jsf and i have a big problem that I don't know how to solve. I might not even be able to explain very accurate what the problem is but I will try.
Here it goes:
I have a page, admin.jsp, where you can perform CRUD operations on a table. The problem i have is with the Read action. In order to read users from the db, you insert the username and then press Read button. The users whose username is similar to the one inserted by the user are displayed in a datatable, on another page (data.jsp). The problem is, how do I transfer the username from one page to another? I have a bean, called "login_bean" where the username is kept, as long as I perform some operation from the bean on the admin.jsp page. But once I go to another page, username dissappears. I will post some code, hopefully it will become clearer.
PS: I simplifid the code and left only info concerning username, hoping that it will become easier to understand
admin.jsp:
data.jsp
login_bean.java
[/code]
I must mention that everything I did here was taken from internet examples. I don't know jsf/jsp, I needed to make a project for the university in 2 weeks, and I did not have much time to repare.
Thank you