同一页面

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");       
     %>

 

posted on 2013-09-03 11:54  new PersonBean()  阅读(210)  评论(0编辑  收藏  举报