java - Forward inside tomcat webapp: sessions are not expired -


i have webservice quite simple forward webapp located on same tomcat container.

private response forward(         @context servletcontext context,         @context httpservletrequest request,         @context httpservletresponse response){     servletcontext ctx = context.getcontext("/myothewebapp");        requestdispatcher dispatcher=ctx.getrequestdispatcher("/test");     dispatcher.forward(request, response);     return response.ok("").build(); } 

this works desired except fact, sessions of webapp not being expired. in tomcat manager can see, opened sessions accumulated quite fast, several hundreds of them.

i not sure why last when response sent. ideas missing in forward-method?

why last when response sent.

why think session invalidated after response sent.

it invalidated if session timeout occurs or forcefully invalidate session using :

session#invalidate() method 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -