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
Post a Comment