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

struts2 + tiles help

I would like my struts-config file to redirect to a tiles page (instead 
of having a separate jsp page with just a tiles include).

I tried to make <result type="tiles" but I'm getting the following 
exception at startup:

2007/11/23 19:12:39 [ERROR] seaspider] - Exception starting filter 
struts2 <Error building results for action FileStatsAction in namespace  
- action - file:/C:/
Program%20Files/apache-tomcat-5.5.25/webapps/seaspider/WEB-INF/classes/seaspider.xml:9:96>Error 
building results for action FileStatsAction in namespace  - acti
on - 
file:/C:/Program%20Files/apache-tomcat-5.5.25/webapps/seaspider/WEB-INF/classes/seaspider.xml:9:96
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:340)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:429)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)


My struts-config.xml file:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
    <package name="seaspider" extends="struts-default">
        <action name="FileStatsAction" 
class="com.fraudwall.seaspider.reports.FileStatsAction">
            <result type="tiles">reportpage.definition</result>
        </action>
    </package>
</struts>


reportpage.definition is defined in tiles-defs.xml

Thanks for your help,

Kate

Re: Struts2 + JFreeChart Plugin + HttpServletRequest

Posted by Antonio Petrelli <an...@gmail.com>.
This is a Struts-related question. Please ask it in the Struts Users
Mailing list:
http://struts.apache.org/mail.html

Antonio

2007/11/24, Kate Fox <ka...@fraudwall.net>:
> 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
>

Struts2 + JFreeChart Plugin + HttpServletRequest

Posted by Kate Fox <ka...@fraudwall.net>.
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

Re: struts2 + tiles help

Posted by Antonio Petrelli <an...@gmail.com>.
Please post the complete stacktrace.

Ciao
Antonio

2007/11/24, Kate Fox <ka...@fraudwall.net>:
> I would like my struts-config file to redirect to a tiles page (instead
> of having a separate jsp page with just a tiles include).
>
> I tried to make <result type="tiles" but I'm getting the following
> exception at startup:
>
> 2007/11/23 19:12:39 [ERROR] seaspider] - Exception starting filter
> struts2 <Error building results for action FileStatsAction in namespace
> - action - file:/C:/
> Program%20Files/apache-tomcat-5.5.25/webapps/seaspider/WEB-INF/classes/seaspider.xml:9:96>Error
> building results for action FileStatsAction in namespace  - acti
> on -
> file:/C:/Program%20Files/apache-tomcat-5.5.25/webapps/seaspider/WEB-INF/classes/seaspider.xml:9:96
>         at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:340)
>         at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:429)
>         at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
>
>
> My struts-config.xml file:
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
>         "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>         "http://struts.apache.org/dtds/struts-2.0.dtd">
>
> <struts>
>     <package name="seaspider" extends="struts-default">
>         <action name="FileStatsAction"
> class="com.fraudwall.seaspider.reports.FileStatsAction">
>             <result type="tiles">reportpage.definition</result>
>         </action>
>     </package>
> </struts>
>
>
> reportpage.definition is defined in tiles-defs.xml
>
> Thanks for your help,
>
> Kate
>