为什么页面不能跳转?
我在标签中验证登陆,为什么条件成立却不跳转
jsp页面:
<%@ taglib uri="/WEB-INF/check.tld" prefix="user" %><user:check />...
*标签前面没有空
标签:
....
public int doStartTag() throws JspTagException {
try {
HttpSession session=pageContext.getSession();
boolean islogin=true;
if(session.getAttribute("userinfo")==null){
islogin=false;
}
if(!islogin){
pageContext.forward("../user/login.jsp");
}
} catch (IOException e) {
e.printStackTrace();
throw new JspTagException("doEndTag()标签出错!",e);
} catch (ServletException e) {
e.printStackTrace();
throw new JspTagException("doEndTag()标签出错!",e);
}
return SKIP_PAGE;
}
.....