You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Décio Heinzelmann Luckow <de...@gmail.com> on 2008/04/13 15:32:06 UTC

Problems with default-action-ref (I was sent this message before with wrong subject...)

Sorry, a sent this message with an wrong subject, now is the correct

Hi all,

I was testing the tag <default-action-ref> to configure the default action
mapping for a package, without success, then I search Struts Jira for
something about this and find the WW2525.

The WW2525 is closed with the argument that this tag is used to configure
the default class to be used when an action mapping don't specify the class.

I disagree with this because we have this tags:
<default-class-ref>
and
<default-action-ref>

I think that <default-class-ref> is to set de default class of mapping
without class, and not <default-action-ref>

The file xwork-default.xml use <default-class-ref> to set ActionSupport
<default-class-ref class="com.opensymphony.xwork2.ActionSupport" />

And really, in my tests the default-action-ref don´t runs correctly.

This ocurred with someone too?

Thanks

Décio Heinzelmann Luckow

Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

Posted by Lukasz Lenart <lu...@googlemail.com>.
>  This ocurred with someone too?

No, for me works like charm, maybe because I'm using 2.1.1-SNAPSHOT ;-)

        <default-action-ref name="index"/>

        <!-- base action, which will redirect to user defined default page -->
        <action name="index"
class="pl.org.lenart.ems.struts2.actions.IndexAction">
            <result type="redirectAction">${redirectName}</result>
        </action>


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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


Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

Posted by Lukasz Lenart <lu...@googlemail.com>.
>  the s2.1 version is only avaiable from subversion?

If you using Maven, you can Apache Snapshot repo
http://people.apache.org/repo/m2-snapshot-repository/

or download struts2-blank.war from here
http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/struts2-blank/2.1.1-SNAPSHOT/struts2-blank-2.1.1-SNAPSHOT.war


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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


Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

Posted by Décio Heinzelmann Luckow <de...@gmail.com>.
Ok, thanks for all.

the s2.1 version is only avaiable from subversion?

the major version that i see in the site is Struts 2.0.11.1


2008/4/13, Dave Newton <ne...@yahoo.com>:
>
> --- Lukasz Lenart <lu...@googlemail.com> wrote:
> > > That's why I re-opened the bug for S2.0.
> > As I understood, only for S2.0, because for 2.1 the tag
> > <default-action-ref> is working fine (I already test it)?
>
> That's why I re-opened the bug for S2.0.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

Posted by Dave Newton <ne...@yahoo.com>.
--- Lukasz Lenart <lu...@googlemail.com> wrote:
> > That's why I re-opened the bug for S2.0.
> As I understood, only for S2.0, because for 2.1 the tag
> <default-action-ref> is working fine (I already test it)?

That's why I re-opened the bug for S2.0.

Dave


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


Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

Posted by Lukasz Lenart <lu...@googlemail.com>.
> That's why I re-opened the bug for S2.0.

As I understood, only for S2.0, because for 2.1 the tag
<default-action-ref> is working fine (I already test it)?


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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


Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

Posted by Dave Newton <ne...@yahoo.com>.
That's why I re-opened the bug for S2.0.

--- Lukasz Lenart <lu...@googlemail.com> wrote:

> Hi once again and to clarify
> 
> >  <default-class-ref>
> 
> is used when you did not specified the class for you action like below:
> 
> <action name="index">
>   <result type="index">/index.jsp</result>
> </action>
> 
> >  and
> >  <default-action-ref>
> 
> is used when Struts could not find the action name for given http request,
> e.g
> 
> http://localhost/struts2/
> 
> 
> Regards
> -- 
> Lukasz
> 
> http://www.linkedin.com/in/lukaszlenart
> 
> ---------------------------------------------------------------------
> 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: Problems with default-action-ref (I was sent this message before with wrong subject...)

Posted by Lukasz Lenart <lu...@googlemail.com>.
Hi once again and to clarify

>  <default-class-ref>

is used when you did not specified the class for you action like below:

<action name="index">
  <result type="index">/index.jsp</result>
</action>

>  and
>  <default-action-ref>

is used when Struts could not find the action name for given http request, e.g

http://localhost/struts2/


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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


Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

Posted by Dave Newton <ne...@yahoo.com>.
--- Décio Heinzelmann Luckow <de...@gmail.com> wrote:
> I was testing the tag <default-action-ref> to configure the default action
> mapping for a package, without success, then I search Struts Jira for
> something about this and find the WW2525.
> 
> The WW2525 is closed with the argument that this tag is used to configure
> the default class to be used when an action mapping don't specify the
> class.
> 
> I disagree with this because we have this tags:
> <default-class-ref>
> and
> <default-action-ref>
> 
> I think that <default-class-ref> is to set de default class of mapping
> without class, and not <default-action-ref>
> 
> The file xwork-default.xml use <default-class-ref> to set ActionSupport
> <default-class-ref class="com.opensymphony.xwork2.ActionSupport" />
> 
> And really, in my tests the default-action-ref don´t runs correctly.
> 
> This ocurred with someone too?

Looking at http://struts.apache.org/2.0.11.1/docs/action-configuration.html
I'd say you're correct and we closed that bug prematurely; I think both
Pillip and I were thinking of default-class-ref.

I am re-opening the issue; thanks.

Dave

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