I have two jsp pages: search.jsp and update.jsp.
search.jsp
update.jsp
When I run search.jsp then one value fetches from database and I store that
Using Query parameter
Using Hidden variable .
...
you can send Using Session object.
session.setAttribute("userId", userid);
These values will now be available from any jsp as long as your session is still active.
int userid = session.getAttribute("userId");