tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Kam <>
Subject post redirect get to the same tomcat instance in a tomcat cluster ?
Date Tue, 12 Jun 2012 17:17:25 GMT
Hi all !

Is it possible to do POST submit to the tomcat-A, redirect happens,
and then GET to the same tomcat-A again in a tomcat cluster ?
And, in hope to make things easier, all the tomcat servers in the
cluster are stateless wihout any sessions

This needs arise because each tomcat servers will have it's own spring
context (a kind of state, but not a per-user-session),
and i am making use of flash attribute feature detailed in here :

Here are the relevant quotes from the page :

Flash attributes provide a way for one request to store attributes
intended for use in another. This is most commonly needed when
redirecting — for example, the Post/Redirect/Get pattern. Flash
attributes are saved temporarily before the redirect (typically in the
session) to be made available to the request after the redirect and
removed immediately.

Flash attribute support is always "on" and does not need to enabled
explicitly although if not used, it never causes HTTP session
creation. On each request there is an "input" FlashMap with attributes
passed from a previous request (if any) and an "output" FlashMap with
attributes to save for a subsequent request. Both FlashMap instances
are accessible from anywhere in Spring MVC through static methods in

Do not pursue the past. Do not lose yourself in the future.
The past no longer is. The future has not yet come.
Looking deeply at life as it is in the very here and now,
the practitioner dwells in stability and freedom.
(Thich Nhat Hanh)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message