Login.jsp%@pagelanguage=javaimport=java.util.*pageEncoding=GBK%h1系统登录/h1formaction=login.jspmethod=post用户名:inputtype=textname=namebr密码:inputtype=passwordname=passwordbrinputtype=submitvalue=登录/form%Stringname=request.getParameter(name);Stringpass=request.getParameter(password);if(!((.equals(name)||name==null)&&(.equals(pass)||pass==null))){if(abc.equals(name)&&123.equals(pass)){session.setAttribute(name,name);response.sendRedirect(welecom.jsp);}else{%%}}%Welcome.jsp%@pagelanguage=javaimport=java.util.*pageEncoding=ISO-8859-1%%if(session.getAttribute(name)!=null){%h1欢迎光临!/h1h2请先ahref=logout.jsp注销/a/h2%}else{%h1请先ahref=login.jsp登录/a!/h1%}%Logout.jsp%@pagelanguage=javaimport=java.util.*pageEncoding=GBK%htmlbody%response.setHeader(refresh,2;URL=login.jsp);session.invalidate();%h3您已成功退出本系统,两秒后跳转会首页!/h3h3如果没有跳转,请按ahref=login.jsp这里/a/h3/body/html