struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Cartwright <John.C.Cartwri...@noaa.gov>
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.exception">SessionTimeoutException</param>
                <param name="headers.class">${exception}</param>
               <param name="headers.message">${exception.message}</param>
              <param name="headers.stack">${exception.stackTrace}</param>
            </result>

${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:
> John.C.Cartwright@noaa.gov 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 ...>${ognl.expression.here}</param>
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message