|
There are now three pages ① → ② → ③,
<% out.print ("<a href =\" searchnews.jsp? p = "+ i +"\">" + 2+ "</a> ");%>
out.print (request.getParameter ("p")); (how is it null?)
Assuming these statements are on ②, the request built-in object here refers to the request sent by ① page to ② page.
In order to get the parameters from the hyperlink, it must be the request of ② page through the hyperlink to ③ page
Objects can only be obtained using request.getParameter ("p"). |
|