You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Zoran Avtarovski <zo...@sparecreative.com> on 2007/04/25 01:21:18 UTC

[s2] Extending struts.xml

I'm trying to extend the standard struts.xml by using includes but tomcat is
throwing errors.

I found some info on the mail lists pointing to an error in xwork and that
it was fixed in 2.08. When I went looking to download a nightly build there
were only 2.10 builds.

My question is what's the easiest way to fix the problem. I've put all my
config info into struts.xml but it's already becoming unwieldy and is
growing rapidly.

Z.



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


Re: [s2] Extending struts.xml

Posted by ML...@abusinessware.com.
Hi,

I have some errors too, in 2.1.0 (build 25/04) version.

I had to add the tiles type (<result-type name="tiles" 
class="org.apache.struts2.views.tiles.TilesResult"/>) in the 
default-struts.xml, because it was not inherite from my struts.xml

The bad configuration :
struts.xml :
<struts>
    <constant name="struts.enable.DynamicMethodInvocation" value="false" 
/>
    <constant name="struts.objectFactory" value="spring" />
    <constant name="struts.devMode" value="true" />
    <constant name="struts.custom.i18n.resources" value="package" />
 
    <include file="struts-default.xml"/>
        <package name="default" extends="struts-default">
        <result-types>
                        <result-type name="tiles" 
class="org.apache.struts2.views.tiles.TilesResult"/>
                </result-types>
                <interceptors>
                        <interceptor-stack name="crmStack">
                ...
                        </interceptor-stack>
        </interceptors>

                <default-interceptor-ref name="crmStack"/>
 
                <global-results>
                        ...
                </global-results>
    </package>
 
    <include file="home.xml"/>
</struts>

home.xml :
<struts>
        <package name="home" extends="default">
        <action name="enter" class="com.abw.coordination.EnterAction">
            <result>/login.jsp</result>
        </action>
        <action name="login" class="com.abw.coordination.LoginAction">
            <result>/frame.jsp</result>
            <result name="error">/error.jsp</result>
        </action>
        <action name="home" class="com.abw.coordination.HomeAction">
            <result type="tiles">home.def</result>
            <result name="failure" type="tiles">error.def</result>
        </action>
        </package>
</struts>

The error was Struts did'nt find the result type "tiles".

To resolve this, I have to duplicate the result-type in each imported xml 
files. Or to had the "tiles" result-type in the struts-default.xml.



Regards,

Michaël



Zoran Avtarovski <zo...@sparecreative.com> 
26/04/2007 02:34
Veuillez répondre à
"Struts Users Mailing List" <us...@struts.apache.org>


A
Struts Users Mailing List <us...@struts.apache.org>
cc

Objet
Re: [s2] Extending struts.xml






> What are the errors you are seeing?
> 
ERROR [http-8080-1] - Unable to find parent package default
ERROR [http-8080-1] - Unable to find parent packages default
Apr 24, 2007 9:53:50 PM org.apache.catalina.core.StandardContext 
filterStart
SEVERE: Exception starting filter struts
Error building results for action getAction in namespace  - action -
file:/usr/local/apache-tomcat-6.0.10/webapps/mms/WEB-INF/classes/struts-sysa
dmin.xml:14:55
... 

Caused by: No result type specified for result named 'success', perhaps 
the
parent package does not specify the result type? - result -
file:/usr/local/apache-tomcat-6.0.10/webapps/mms/WEB-INF/classes/struts-sysa
dmin.xml:15:36

Z.



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



Re: [s2] Extending struts.xml

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
> What are the errors you are seeing?
> 
ERROR [http-8080-1] - Unable to find parent package default
ERROR [http-8080-1] - Unable to find parent packages default
Apr 24, 2007 9:53:50 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts
Error building results for action getAction in namespace  - action -
file:/usr/local/apache-tomcat-6.0.10/webapps/mms/WEB-INF/classes/struts-sysa
dmin.xml:14:55
... 

Caused by: No result type specified for result named 'success', perhaps the
parent package does not specify the result type? - result -
file:/usr/local/apache-tomcat-6.0.10/webapps/mms/WEB-INF/classes/struts-sysa
dmin.xml:15:36

Z.



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


Re: [s2] Extending struts.xml

Posted by Nate Drake <nd...@gmail.com>.
What are the errors you are seeing?




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


Re: [s2] Extending struts.xml

Posted by Dave Newton <ne...@yahoo.com>.
--- Zoran Avtarovski <zo...@sparecreative.com> wrote:
> Thanks for the big call Dave.

;)

> My concern was that 10 may introduce more issues
> than it solved. So I should've said "What's the 
> easiest and least disruptive way to fix the
> problem?"

I haven't updated that far either... An XWork person
will chime in, I'm sure...

d.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [s2] Extending struts.xml

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
Thanks for the big call Dave.

My concern was that 10 may introduce more issues than it solved. So I
should've said "What's the easiest and least disruptive way to fix the
problem?"

Z.

> --- Zoran Avtarovski <zo...@sparecreative.com> wrote:
>> I found some info on the mail lists pointing to an
>> error in xwork and that it was fixed in 2.08. When I
> 
>> went looking to download a nightly build there
>> were only 2.10 builds.
> 
> .10 is bigger than .08. The fix is probably still in
> it.
> 
> d.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> ---------------------------------------------------------------------
> 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: [s2] Extending struts.xml

Posted by Dave Newton <ne...@yahoo.com>.
--- Zoran Avtarovski <zo...@sparecreative.com> wrote:
> I found some info on the mail lists pointing to an
> error in xwork and that it was fixed in 2.08. When I

> went looking to download a nightly build there
> were only 2.10 builds.

.10 is bigger than .08. The fix is probably still in
it.

d.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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