我正在使用struts框架,会话过期后,我将用户重定向到登录页面。空闲时间到期后,它会正确重定向到登录页面,但在文本框中显示用户名和密码。如何清除重定向到登录页面时的字段?会话过期并重定向到登录页面后清除登录字段?
<%
int timeout = session.getMaxInactiveInterval();
String redirect=request.getContextPath()+"/jsp/login.jsp";
response.setHeader("Refresh", timeout + "; URL ="+redirect);
response.addHeader("Cache-Control", "max-age=0,no-cache,no-store");
%>
这是会话过期的代码,并重定向到登录页面
发布您的jsp页面的代码,并将其与session.invalidate/set属性一起重定向。我会回答你的。 – Prateek 2012-07-19 05:49:29