JSTL小问题

ssifqitf 2008-07-08 08:26:16
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
<title>
jsp1
</title>
</head>
<body bgcolor="#ffffff">
<form action="jsp1.jsp">
<table>
<tr><td>请输入:</td><td><input type="text" name="text" /></td></tr>
<tr><td><input type="submit" value="提交"/></td></tr>
</table>
</form>

<c:if test="${param.text}!=null">
你刚才输入的为:<c:out value="${param.text}"/>
</c:if>
</body>
</html>

请问我应该在这个if条件里怎么写呢?
...全文
51 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jy02411368 2008-07-08
  • 打赏
  • 举报
回复
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
<title>
jsp1
</title>
</head>
<body bgcolor="#ffffff">
<form action="jsp1.jsp(这里写的有问题要加上你的项目目录例如/mulu/jsp1.jsp)">
<table>
<tr> <td>请输入: </td> <td> <input type="text" name="text" /> </td> </tr>
<tr> <td> <input type="submit" value="提交"/> </td> </tr>
</table>
</form>

<c:if test="${param.text!=null}">
你刚才输入的为:${param.text}
</c:if>
</body>
</html>
_重剑无锋_ 2008-07-08
  • 打赏
  • 举报
回复
<c:out value="${param.text}"/>

${param.text}
yqh2009 2008-07-08
  • 打赏
  • 举报
回复
<c:if test="${! empty param.text}"></c:if>
happy08_xhx 2008-07-08
  • 打赏
  • 举报
回复
????

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧