You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Carlo Camerino <cm...@gmail.com> on 2009/04/20 15:34:30 UTC

Struts HttpSession Thread Safety

Hi,

Our application uses struts 1. We are now currently problem with
httpsessionswapping
We would like to ask on the best way to approach this because currenty we
are using

request.getSession() to access the httpsession

public ActionForward loadFundTxferAddSel(
        ActionMapping mapping,
        ActionForm form,
        HttpServletRequest request,
        HttpServletResponse response)  {
}

What is the best way to ensure that the struts session is accessed properly?

should we do it this way?

HttpSession session  = (HttpSession) request.getSession()
synchronized(session) {
}

What would be the best way to handle this thanks a lot...
Really need your help

Carlo