TUser user = (TUser) session.getAttribute(SnsSession.USER); if (user == null)
{
response.sendRedirect("../../pages/user/user_login.jsp");
} Integer i = user.getId(); 报错
解决方案 »
- 部署完成的工程出现问题 在线等
- strust2、spring、hibernate关于select控件和radio控件的问题大哥大姐救救俺 急!在线等呢
- STRUTS2 上传文件保存到数据库中
- 怎样减轻服务器压力(xml->sql)?
- 要使用myfaces1.2,得如何在web.xml里配置呀?我按标准教程来配老是不行啊!
- 两个数组比较问题
- tomcat+Myeclipse在windows下布置后的程序,怎么能转换到linux下运行.
- 我用tomcat5.5作wap服务器,用ie访问index.jsp时为什么会提示下载文件呢??高分相送!!在线等
- 怎样才能获得页面的环境路径??????????????
- dubbo 404
- 做表单级验证时报这个错,是什么错急用在线等!!!!!!!!!!
- help,help ,help
Integer i = user.getId();这一行
难道非要用else
{
response.sendRedirect("../../pages/user/user_login.jsp");
// 加入return,强迫返回。
return;
}----------------------------
sendRedirect虽然转向了,但是依然会执行下面的语句。
dispatch也一样:)
光看到转向就以为没事了
要是你要那样写的话,就应该用是:
<%
if (user == null)
{
%>
<jsp:forward page="../../pages/user/user_login.jsp"/>
<%
} Integer i = user.getId();%>
这就可以丢过去了事