Problems making SEO friendly URLs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems making SEO friendly URLs

Dave Weis
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>
Reply | Threaded
Open this post in threaded view
|

Re: Problems making SEO friendly URLs

Lukasz Lenart
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Problems making SEO friendly URLs

Dave Weis
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 <[hidden email]>
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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>