struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rene Gielen <>
Subject Re: S2 support for index action?
Date Tue, 21 Aug 2012 08:59:47 GMT
I think I see the use case - while accessing /cart/ should be a valid request to the cart topic
landing page (index), default action might map to a default "unknown URI" page, which has
say a humble error message and some suggestions what URIs the user would want to access.
Sent from my mobile phone

Lukasz Lenart <> schrieb:

2012/8/20 Paul Benedict <>:
> Are you familiar with index actions in HTTP servers? It's the page
> that loads when a directory is specified. It's the default when no
> specific resource is requested. That's different than the "default
> action" in S2 which runs if no suitable action can be found.
> Pretend there is a default package called "checkout" with "viewCart"
> set to the default action. Here are some example actions in that
> package:
> /checkout/addToCart.action = Adds item to cart
> /checkout/viewCart.action = Views
> /checkout/ = runs default action
> /checkout/zzzzzz = runs default action too
> /checkout/qwerty = runs default action too
> As you can see, S2 interprets the default action to mean "I can't find
> anything so let's execute the default." I am saying, we should allow a
> more narrow configuration that says run the default action only if NO
> specific resource in the package is being requested.

But isn't the same as default action per package ? Where you can
specify the index action:

<package name="default" namespace="/" extends="struts-default">

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

<action name="index">


Or would you have a more sophisticated mechanism which will
automagically discover index action instead of specifying default
action for each package ?

The case is that there can be more than one class used to implement
actions for given namespace.

+ 48 606 323 122


To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message