This article mainly introduced in the JSP page to obtain the URL parameter method, the need friend may refer to the next
When a URL comes along, such as: Http://localhost:8080/pro/demo/hello.jsp?name=john, on the hello.jsp page, we can get the value of name: The code is as follows: <% String Path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/"; String name = Request.getparameter ("name");///%> and then displayed in <body>hello:<%=name%></body>. It can also be obtained directly in the body with ${}, because the URL request parameter is placed in the implied object param when the jstl is used. So you can write: The code is as follows: <body>hello:${param.name}</body> based on this logic, when using jquery, it can be done in the same way, such as: $ (function () {alert (${ Param.name}); });