You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kate Fox <ka...@fraudwall.net> on 2007/11/24 17:00:55 UTC

Struts2 + JFreeChart Plugin + HttpServletRequest

My JFreeChart action class implements ServletRequestAware, but 
setServletRequest is not being called.

Here is my definition from struts.xml:

      <package name="chart" extends="jfreechart-default">
       <action name="Graph" class="mypackage.Graph">
           <result name="success" type="chart">
               <param name="width">650</param>
               <param name="height">500</param>
           </result>
       </action>
   </package>

How can I get a HttpServletRequest object in my action?

Thanks for your help,

Kate

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


Re: Struts2 + JFreeChart Plugin + HttpServletRequest

Posted by Kate Fox <ka...@fraudwall.net>.
Do you also know if it's possible for JFreeChart to work with tiles?  
Does it also need an interceptor?

Thanks,

Kate

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


Re: Struts2 + JFreeChart Plugin + HttpServletRequest

Posted by Tom Schneider <sc...@gmail.com>.
You don't need the fix to get this to work.  You need to add the
servletConfig interceptor to the interceptor stack of your action.  This is
the interceptor that looks for ServletRequestAware and injects the
HttpServletRequest onto your action.


Kate Fox-2 wrote:
> 
> The version where it's fixed isn't out yet, correct? (I'm using
> struts2-tiles-plugin-2.0.11.jar and it's not working).
> 
> Where can I get the patched version? Also will it work with tiles?
> 
> Thanks,
> 
> Kate
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts2-%2B-JFreeChart-Plugin-%2B-HttpServletRequest-tf4866292.html#a13944121
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Struts2 + JFreeChart Plugin + HttpServletRequest

Posted by Dave Newton <ne...@yahoo.com>.
It doesn't have anything to do with Tiles; it's just
that the default chart package doesn't extend the
struts-default package, hence the normal interceptor
stack isn't executed.

Defining your own interceptor stack should fix the
issue.

d.

--- Kate Fox <ka...@fraudwall.net> wrote:

> The version where it's fixed isn't out yet, correct?
> (I'm using struts2-tiles-plugin-2.0.11.jar and it's
> not working).
> 
> Where can I get the patched version? Also will it
> work with tiles?
> 
> Thanks,
> 
> Kate
> 
> 
>
---------------------------------------------------------------------
> 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


Re: Struts2 + JFreeChart Plugin + HttpServletRequest

Posted by Kate Fox <ka...@fraudwall.net>.
The version where it's fixed isn't out yet, correct? (I'm using struts2-tiles-plugin-2.0.11.jar and it's not working).

Where can I get the patched version? Also will it work with tiles?

Thanks,

Kate


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


Re: Struts2 + JFreeChart Plugin + HttpServletRequest

Posted by Dave Newton <ne...@yahoo.com>.
https://issues.us.apache.org/struts/browse/WW-2204

--- Kate Fox <ka...@fraudwall.net> wrote:

> My JFreeChart action class implements
> ServletRequestAware, but 
> setServletRequest is not being called.
> 
> Here is my definition from struts.xml:
> 
>       <package name="chart"
> extends="jfreechart-default">
>        <action name="Graph" class="mypackage.Graph">
>            <result name="success" type="chart">
>                <param name="width">650</param>
>                <param name="height">500</param>
>            </result>
>        </action>
>    </package>
> 
> How can I get a HttpServletRequest object in my
> action?
> 
> Thanks for your help,
> 
> Kate
> 
>
---------------------------------------------------------------------
> 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