struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Cartwright <>
Subject Re: S2: httpheader result type
Date Fri, 04 Jan 2008 23:44:24 GMT
Hi Laurie,

Thanks for your reply and suggestion. I can access what I'm assuming is 
the Exception object, but can't seem to get the message property from it:

            <result name="sessionTimeout" type="httpheader">
                <param name="status">204</param>
                <param name="headers.class">${exception}</param>
               <param name="headers.message">${exception.message}</param>
              <param name="headers.stack">${exception.stackTrace}</param>

${exception} reports the fully qualified Exception class name
${exception.message} is null
${exception.stackTrace} reports only the first line of the stack trace.

If I forward to a JSP, it has access to the message, stack trace via
<s:property value="exception" />
<s:property value="exceptionStack" />
In any case, having the class name provides me a workable solution - 
thanks so much for your help!

-- john

Laurie Harper wrote:
> wrote:
>> Hello All,
>> in configuring the httpheader result type in the struts.xml file, is
>> there a way to access objects on the value stack?
> Have you tried using an expression, as in
>   <result ...>
>     <param ...>${}</param>
> L.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message