【发布时间】:2016-12-01 09:11:07
【问题描述】:
我有一个带有下拉框的 header.jsp 作为“角色”。header.jsp 是通过 include 指令在所有其他 JSP 中使用的。登录后登录页面是一个主页。用户needs to select a value from the drop down box and some pages appear on that basis.The issue is that the selected value from the drop down is refreshed when any of the other jsp's from the list is selected.All the static data are properly passed到其他 JSP 的.how 可以是贯穿始终的值。这段代码(header.jsp)如下
<div class='header'>
<div class='top_header text-center'>
<span>Welcome:</span>
<c:out value="${sessionScope.displayName}" />
| <span>Role:</span>
<select id="role" class="role_select" name="role" onchange="submitRole(this);">
<option id="roleOption" value="Select Role">Select Role</option>
<c:forEach var="role" items="${sessionScope.role}">
<option value='${role}'>
<c:out value="${role}"/>
<c:set var="SelectRole" scope="session" value="${role}" />
</option>
</c:forEach>
</select>
| <span><a href='logout'>Logout</a></span> <span>
<c:if test="${not empty error}">
<div>${error}</div>
</c:if> <c:if test="${not empty message}">
<div>${message}</div>
</c:if>
</span>
</div>
<div class='container'>
<div class='pull-left col-lg-6 col-md-6 col-sm-6 col-xs-6'>
<span>Feedback System</span>
</div>
</div>
</div>
【问题讨论】:
标签: javascript jquery html angularjs jsp