A negative time indicates the session should never timeout.
负数应该没问题
负数应该没问题
解决方案 »
- linunx 环境移植到aix下,jdk不起作用
- Struts1.X 中 LookupDispatchAction 可以传参数吗
- tomcat能不能动态配置数据源
- 100分求教高手,解决立马给分!
- webedit 修改内容。。急。在线等
- 为什么我新键的一个站台无法显示呢?
- 我用JavaBean读取XML文件中的内容再写到数据库中,前段时间还用得好好的,可不知怎么回事,突然就不行了,
- 高分求救!!!急!!!
- 我快疯了!关于Iplanet 6中JSP的中文显示问题,高分求救!
- window.openta
- APACHE---mod_rewrite==URL重写,看到的却是JSP源码?
- 为什么编译成功,却老是Exception in thread "main"
在test1.jsp中:
<%
session.setMaxInactiveInterval(-1);
session.setAttribute("user",new Integer(10));
%>
<A href="./test2.jsp">href</A>在test2.jsp中:
<%=session.getMaxInactiveInterval()%>
<br>
<%=session.getAttribute("user")%>
刚开始确实输出-1和10
但如果test1.jsp等一段时间(半小时以上),再链接到test2.jsp,输出:1800和null(恢复默认值了)可能是我使用session的方法不对,请大家帮助!