If a request for

  /retrieve.do?id=42

fails (e.g. couldn't find item in database), I'd like to say

  request.setStatus(HttpServletResponse.SC_NOT_FOUND);
  request.setAttribute("warning", "Not your lucky day.");

and forward (not redirect) the request to

  /search.do?query=42

Can this behavior be accomplishing with Struts? Currently I'm using request.getRequestDispatcher(...).forward(...) with a modified HttpServletRequest, but there must be a better way (TM)...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to