当前位置: 代码迷 >> Java Web开发 >> jstl展示无效,跳不进<c:choose><c:if>等标签
  详细解决方案

jstl展示无效,跳不进<c:choose><c:if>等标签

热度:8154   发布时间:2013-02-25 21:09:06.0
jstl显示无效,跳不进<c:choose><c:if>等标签
用myEclipse 进行debug时凡是进到如<c:if></c:if><c:choose></c:choose>等标签时直接由开始标签(如<c:if>)跳到跳到结束标签(如</c:if>),中间的代码不执行。请问为什么?sessionUser 是取到值的
  加班到十一点多都没搞出来,希望大侠们能指导一下小弟~~~下面是部分代码

Java code
<%@ page contentType="text/html; charset=utf-8"%><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%><%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %><%@page import="com.fa.custom.entity.User"%><% User sessionUser = (User)session.getAttribute("SESSION_USER"); %> <html> <head> <script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="../js/login.js"></script><link href="../css/style.css" rel="stylesheet" type="text/css" /><link href="../css/global.css" rel="stylesheet" type="text/css" /> <title> </title> </head> <body>  <div class="jobl_bot" ><c:choose>                <c:when test="${sessionUser != null}">                <div class="per_name"><span>${sessionUser.name}</span>,欢迎访问!</div>                <div class="per_listlink">                    <a href="../job/user_applyJob.do">我应聘的职位</a>|<a href="../job/user_updateResume.do">编辑简历</a><br />                    <a href="../job/job_updatePwd.do" class="update_pwd">修改密码</a>|<a href="../job/job_LogOut.do">退出登录</a>                </div>         </c:when>            <c:otherwise>                                <form name="form1" id="form1" action="../job/job_login.do" method="post" >                <div class="jlc_line">                    <div class="jlc_left">用户账号</div>                    <div class="jlc_right"><input name="userName" type="text" class="input_joblogin" /></div>                </div>                <div class="jlc_line">                    <div class="jlc_left">密码</div>                    <div class="jlc_right"><input name="userPass" type="password" class="input_joblogin" /></div>                </div>                <div class="jlc_line">                    <div class="jlc_left">验证码</div>                    <div class="jlc_right yzmbg">                        <table width="100%" border="0" cellspacing="0" cellpadding="0">                            <tr>                                <td class="input_yzm">                                    <input name="checkCode" type="text" class="yzm_input" />                                </td>                                <td><a onclick="javascript:refreshCode();" href="javascript:;">                                    <img align="bottom" id="checkCode" alt="验证码" /></a>                                </td>                            </tr>                        </table>                    </div>                </div>                <div class="jlc_loginbtn">                    <input type="image" id="btnLogin" src="../images/jobsys/zpindex_29.gif" width="159" height="29" border="0" alt="" />                </div>                <div class="jlc_txtlink"><a href="../job/job_registration.do">会员注册</a> | <a href="../job/job_backPwd.do">找回密码</a></div>            </form>             </c:otherwise></c:choose></div></body></html>