You could use the session features to do this.
(b.jsp)
session.setAttribute("value",value);
(c.jsp)
session.getAttribute("value");
However, I would recommend a major restructuring. In your example, the meaning of your data depends on the order of the elements on the page. If you ever need to reinstall things (for example, moving b.jsp turns on after turning on c.jsp), you run the risk of breaking the business logic.
A good template for web development is a model-controller-controller. The "controller" determines which page should be displayed, the "model" calculates all the data and makes it available, and the "view" displays and formats.
I would recommend reviewing this article, which is useful for understanding why MVC is a valuable approach: http://www.javaranch.com/journal/200603/Journal200603.jsp#a5
Edit: as other users mentioned, the request area will be cleaner than the session area. However, I still recommend that you first determine the value before writing any display content.
source share