As you say, it is not feasible technically as you want it (every http request from the browser creates a new HttpServletRequest
object)
You have 2 options:
- Using the
Session
, which you want to avoid as far as I understand - Bring back and forth some parameter into every successive request with the value you would like to keep.
The second option would mean to store some parameter inside your Page1.jsp <form>
with the variable you need your second action to receive, and then rinse and repeat. This is a pure html form solution.
If you are implementing a complex flow, this looks a fair case to have a look at Spring Webflow. There you can manage flow-level variables, which are stored at a "different" scope than request or session, and looks exactly what you want.