Jyoti
Jyoti

Reputation: 2115

how to change session timeout for a web Application using Struts 2.0?

I need to change the session time for my web Application.

The web application is created using Struts 2.0 and is deployed on Tomcat Web Server.

I tried it by changing the timeout in web.xml of server like below.

  <session-config>
        <session-timeout>1</session-timeout>
    </session-config>

And also i tried it by puting above code in web.xml of Web Application.

But both of above solutions did not work.

Still, Web Applicaiton session is maintained for 30 minutes. Please suggest how can i change the session timout value.

Thanks Jyoti

Upvotes: 1

Views: 3298

Answers (1)

Bozho
Bozho

Reputation: 597016

It should work. Put it in webapps/yourapp/WEB-INF/web.xml. Remove it from the server's web.xml. And make sure everything is freshly redeployed.

Also make sure you are not interacting with the session (including ajax) for that amount of time.

Upvotes: 3

Related Questions