标题:jsp页面出现一个错误,大神帮忙看下喽
只看楼主
墨落成白
Rank: 1
等 级:新手上路
帖 子:46
专家分:4
注 册:2014-3-16
结帖率:70%
 问题点数:0 回复次数:1 
jsp页面出现一个错误,大神帮忙看下喽
org.apache.jasper.JasperException: An exception occurred processing JSP page /Left.jsp at line 20

17:                     <td height="5" align="center"><img src="Images/ic.gif" width="1" height="1"></td>
18:                 </tr>
19:                 <%
20:                     if (session.getAttribute("type").toString().equals("1")) {
21:                 %>
22:                 <tr>
23:                     <td height="30" align="center" background="Images/left2.jpg" style="text-align: left; padding-left: 40px;"><a href="TeacherManager.action">XXX</a></td>

这个项目原来是用struts2写的,我加入了Hibernate.出现了这个错误,下面是action的对应代码
public String execute() throws Exception {
        if (Type.equals("系统管理员")) {
            String hql = "from Admin where Admin_Username=''" + Username + "and Admin_Password=''" + Password;
            if (null == new BaseDaoImpl().CheckLogin(hql)) {
                Msg = "用户名或者密码错误";
                return INPUT;
            } else {
                // 获取ID
                String Admin_ID = new BaseDaoImpl().CheckLogin(hql);
                // 创建session
                ServletActionContext.getRequest().getSession().setAttribute("id", Admin_ID);
                ServletActionContext.getRequest().getSession().setAttribute("type", "1");
                return SUCCESS;
            }
搜索更多相关主题的帖子: center style equals background occurred 
2016-04-11 20:33
墨落成白
Rank: 1
等 级:新手上路
帖 子:46
专家分:4
注 册:2014-3-16
得分:0 
2016-04-11 21:03



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-463532-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025405 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved