jstl使用

jstl使用

jstl应用

问题我已经在注释中写好,帮我看看。

<BODY>

<%

String str = request.getParameter(“userName”)==null?””:request.getParameter(“userName”);

if (str.equals(“”)) {

response.sendRedirect(“exampleJstl_2.jsp?message=pls input data!”);

} else {

out.print(“以下是<font color=red size=16>”+str+”</font>用户的基本信息。。。。”);

}

%>

<p>

<c:if test=”empty ${param.userName}”>

<c:set var=”str” value=”” scope=”page”/>

</c:if>

<c:if test=”${param.userName}!=null”>

<c:set var=”str” scope=”page”>

${param.userName}

</c:set>

</c:if>

<!– 这个判断不知道为什么报错,报错的内容是: 

org.apache.jasper.JasperException: /exampleJstl_2R.jsp(24,37) Unterminated &lt;c:if tag

是否不能这样写呢?–>

<c:if test=”${pageScope.str}.euqals(“”)”>

<c:redirect url=”exampleJstl_2.jsp”/>

</c:if>

<c:out value=”以下是<font color=red size=16>${pageScope.str}</font>用户的基本信息。。。。”/>

</BODY>




看来这个帖子要沉了

jstl使用

相关文章:

你感兴趣的文章:

标签云: