我的代碼有什麼問題嗎?我的if else聲明不起作用。if else聲明不工作jsp
<%
String pages = request.getParameter("page");
%>
<input type="hidden" id="page" value="<%=pages%>"/>
<div class="navbar navbar-fixed-bottom">
<div class="navbar-inner">
<a class="brand" href="index.jsp">PeachMangoPie</a>
<ul class="nav pull-right">
<li <%if(pages=="papoy"){out.write("class='active' ");}%>><a href="index.jsp?page=papoy">Papoy</a></li>
<li class="divider-vertical"></li>
<li <%if(pages=="chuckie"){out.write("class='active' ");}%>><a href="index.jsp?page=chuckie">Chuckie</a></li>
<li class="divider-vertical"></li>
<li <%if(pages=="dutchmill"){out.write("class='active' ");}%>><a href="index.jsp?page=dutchmill">Dutch Mill</a></li>
<li class="divider-vertical"></li>
<li <%if(pages=="icecream"){out.write("class='active' ");}%>><a href="index.jsp?page=icecream">Ice Cream</a></li>
<li class="divider-vertical"></li>
<li <%if(pages=="chicken"){out.write("class='active' ");}%>><a href="index.jsp?page=chicken">Chicken</a></li>
<li class="divider-vertical"></li>
<li <%if(pages=="straberrycake"){out.write("class='active' ");}%>><a href="index.jsp?page=strawberrycake">Strawberry-Cake</a></li>
</ul>
</div>
</div>
*我的代碼有什麼問題嗎?*是,使用scriptlets:[如何避免Java代碼在JSP文件?](http://stackoverflow.com/q/3177733/1065197)。 –