You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Weis <dj...@sjdjweis.com> on 2017/12/07 15:07:46 UTC
Problems making SEO friendly URLs
Hello
I'm trying to set up an action to make attractive URLs but I'm not having
success. Below is the struts.xml file and the error.
Any help would be appreciated!
Thanks
dave
Messages:
There is no Action mapped for namespace [/commerce] and action name
[dave/1/2] associated with context path [/SUBECON].
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.devMode" value="true"/>
<constant name="struts.patternMatcher" value="regex"/>
<constant name="struts.enable.SlashesInActionNames" value="true"/>
<constant name="struts.mapper.alwaysSelectFullNamespace" value="false"/>
<constant name="struts.action.extension" value="," />
<package name="default" extends="struts-default" namespace="/">
<result-types>
<result-type name="tiles"
class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<action name=""
class="com.subecon.filter.SiteFilterAction"
method="execute">
<result name="public" type="tiles">public.index</result>
<result name="commerce" type="tiles">commerce.index</result>
</action>
<action name="public/index">
<result type="tiles">public.index</result>
</action>
<action name="commerce/dave/{number}/{name}"
class="com.subecon.actions.store.DaveTestAction">
<result type="tiles">commerce.index</result>
</action>
</package>
</struts>
Re: Problems making SEO friendly URLs
Posted by Dave Weis <dj...@sjdjweis.com>.
I was using the 'normal' method with forms and tiles. The problem ended up
being that I was inheriting my namespaces from 'struts-default' instead of
'default' so tiles weren't activated in that namespace.
The last couple webapps I wrote were on struts 1 so it's been an
adjustment. I do enjoy not having to create forms constantly :-)
Thanks for the help
dave
On Fri, Dec 8, 2017 at 12:58 AM, Lukasz Lenart <lu...@apache.org>
wrote:
> Hi Dave,
>
> Did you try to use RestfulActionMappers?
> http://struts.apache.org/core-developers/restful-action-mapper.html
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Problems making SEO friendly URLs
Posted by Lukasz Lenart <lu...@apache.org>.
Hi Dave,
Did you try to use RestfulActionMappers?
http://struts.apache.org/core-developers/restful-action-mapper.html
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org