Yes.  Just return or return null instead of an ActionForward.  Don't look
for a mapping using mapping.findforward(null).  As a side note, you have a
lot of nested "try/catch" and "if" statements which a) can be difficult to
read (I had trouble) and the nested try/catches can cause performance issues
on high activity sites.  You might want to consider creating a few custom
exceptions and having everything in one TRY with a catch at the end for each
possible exception it your general method might look more readable like
this:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-
try {
   // step 1
   // step 2

   // step 3, an if "failed"? Throw an exception to catch
   //     below like "MySecurityException"

   // ...

   // ***everything worked?  Return null because we sent
   // ** the headers and returned a binary, i.e. your PDF.
   return;

  // Catch specific exceptions and set logs/messages
} catch ( MyNoAssignmentException mnoe )
   // setmessage
   // log
} catch ( MySecurityExeption mse ) {
   // setmessage
   // log
} catch ( MyNoAssignmentDetailsException mnade ) {
   // setmessage
   // log
} catch ( MyRenderException mre ) {
   // setmessage
   // log
}

// We got this far so we MUST have an error, return error page
return mapping.findForward("error");

=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Now wouldn't that be easier to read?  It would also be a bit more performant
because we have one try for the JVM to follow but any failure above must
result in a log, message setup, and a showing of the error page mapping.

Regards,
David


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

Reply via email to