c:if+EL表达式实现新增/编辑共用一个页面

来源:互联网 发布:电脑网络延迟高 编辑:程序博客网 时间:2024/05/02 00:43
根据上一个页面的url传值来确定头部显示为哪个页面;

例如:url:"localhose.......eidt?​themeId="+themeId;

我们就可以在jsp页面写下面这句:​

<div class="position">

<a href="${ctx}/index" target="_top">首页</a><em>></em><a>系统管理</a>

<em>></em>

<a class="last-position"><c:if test="${empty param.themeId}">主题新增</c:if>

<c:if test="${not empty param.themeId}">主题编辑</c:if></a>

 </div>

<div class="form-title">

<c:if test="${empty param.themeId}">主题新增</c:if>

<c:if test="${not empty param.themeId}">主题编辑</c:if>

</div>

0 0