- 论坛徽章:
- 0
|
I have tried several methods to modify the value of the timeout for my current project. I find modify the web configuration file (web.xml) is the easiest way to implement it.
DOCTYPE[/url]
web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> The name of the application C'mon, you know what goes into a description, don't you? context-param[/url]
> name_of_context_initialization_parameter value_of_context_initializtion_parameter Again, some description servlet[/url]
> guess_what_name_of_servlet Again, some description com.foo-bar.somepackage.TheServlet foo bar servlet-mapping[/url]
> name_of_a_servlet *.some_pattern servlet-mapping[/url]
> image /image session-config[/url]
> 30
session-timeout
: The timeout for a session in minutes. If you want to modify the default timeout value, do it here.
In another way, you can use the JavaScript function window.setTimeout(…) to set the timeout value and do what you want it to do when the page is overtime.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/29515/showart_440126.html |
|