{
public void destroy()
{
}
{
HttpSession mySession = ((HttpServletRequest)req).getSession();
Boolean requestInProgess = (Boolean)mySession.getAttribute("SEMAPHORE_REQUEST_IN_PROGRESS");
if ( requestInProgess.booleanValue() == true )
{
((HttpServletResponse) resp).sendRedirect("to some other page telling the user to click only once or something");
}
else
{
mySession.setAttribute("SEMAPHORE_REQUEST_IN_PROGRESS", Boolean.TRUE);
chain.doFilter(req, resp);
mySession.setAttribute("SEMAPHORE_REQUEST_IN_PROGRESS", Boolean.FALSE);
}
}
{
}
}
De : Kristofer Younger [mailto:[EMAIL PROTECTED]
Envoy� : mardi 9 novembre 2004 10:59
� : [EMAIL PROTECTED]
Objet : Re: multiple submits...Mark
having not done a filter yet, it would be very helpful if I could get the code example...
TIA,
-Kristofer
On Nov 9, 2004, at 10:25 AM, [EMAIL PROTECTED] wrote:
We solved the problem by updating a semaphore in a filter,
It is very simple, only a coule of lines of code in one method...of course,
assuming you are using http sessions.
If this is not clear, I can send you an example.
HTH
Mark
-----Message d'origine-----
De : Kristofer Younger [mailto:[EMAIL PROTECTED]]
Envoy� : mardi 9 novembre 2004 10:17
� : MyFaces Discussion
Objet : multiple submits...
Is there an idiomatic method to making sure a form only gets submitted once per session? I'm getting dizzy trying decide the best method for myfaces...
any advice would sure be appreciated.
-Kristofer

