Get request.getattribute ("") on the JSP page

xiaoxiao2021-03-06  115

Since I use response.sendredirect ("B.JSP") in Servelet; this method jumps directly to the B.JSP page, so I am Request.Setattirbute in Servelet ("TestValue", "Test") this Attribute Value, I can't get it on the B.JSP page.

Exploring the reason, since there is no way to use Forward, if you need this value after the page, you need to take this method:

RequestDispatcher Dispatch = Request.getRequestDispatcher ("ShabcProject /" JSP);

Dispatch.forward (Request, Response);

转载请注明原文地址:https://www.9cbs.com/read-99383.html

New Post(0)