2013-03-11 71 views
0

我只想獲取String pass的值,然後放入<p></p>。怎麼做?JSP獲取值

<% if(request.getParameter("status") != null) { %> 
     <% if(request.getParameter("status").equals("ok")) { 
      String pass = request.getParameter("pass");%> 
      <p>put the value of pass here in this line</p> 
     <% } %> 
    <% } %> 

回答

0

變化與代碼段落線以下

<p><%= pass%></p> 
0

使用JSTL

<c:out value="${pass}" /> 

使用小腳本(不太優選的)

<%= pass %>