Java Web App: passing form parameters across multiple pages

What is the best practice or best way to pass form parameters from page to page in a stream? If I have a stream, when the user enters data into the form and clicks on and repeats this process until it gets to the approval page, how can I approach this problem in order to save the data on the stream as simple as possible?

I think you could put all the information during the session, but could you run into memory problems if many people use your application and go through the stream at the same time?

+3
source share
3 answers

HttpSession - , "". @Rachel.

, (, Servlets), :

public void doPost (HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException    
{
    HttpSession session = req.getSession();
    session.setAttribute("Variable1", request.getParameter("input1"));
    //and so on..

HttpSession - .

+2
+3

. EL JSP, . .

0

Source: https://habr.com/ru/post/1739920/


All Articles