同一页面
a. <% int a= 1; %> <input type="text" value="<%=a%>"> b. <% request.setAttribute("a","1"); %> <input type="text" value="${a}">
不同页面:
<form action="action.jsp" method="post"> <input type="text" name="username"> <input type="submit" value="submit"> </form> 在action.jsp中: a. <input type="text" value="${param.username}"> b. <% String usrname = (String)request.getParameter("username"); %>