求助:使用JSP+JAVABEAN+XML 开发的一个例子中checkSessionBean总是不能编译
使用JSP+JAVABEAN+XML 开发的一个例子中checkSessionBean总是不能编译
package canyin;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest;
public class checkSessionBean {
private boolean bolCheckPass=false;
private HttpServletRequest request = null;
public boolean checkSessionBean(HttpServletRequest request,String strSessionName,String strCheckValue){
public boolean checkSessionBean(HttpServletRequest request){
HttpSession session = request.getSession(false);
return(bolCheckPass);
if (strSessionName==null || strCheckValue==null){
return(bolCheckPass);
}else{
if (session!=null && session.getValue(strSessionName)!=null){
bolCheckPass=session.getValue(strSessionName).equals(strCheckValue);
}
return(bolCheckPass);
}
}
}
附实例源码http://www.code365.com/web/jsp/servlet/200512132047176743.htm