You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pat O'Reilly <po...@gmail.com> on 2007/02/09 20:43:51 UTC

restful2 and struts.action.extension=

I am hoping someone who is working with the restful2 action mapper could tell
me if there is a way to exclude certain extensions from being mapped to
actions.  Specifically, I have configured my action like so:

<action name="catalog/*" class="productAction">
  <param name="productName">{0}</param>
  <result>view.jsp</result>
</action> 

and in struts.properties I have:  struts.action.extension= 

With it left blank, then it maps any extension (or no extension) to actions,
but I would like to be able to access .jsp and .html resources without
having to do a special mapping in struts.xml.  Given that I would probably
want to do the same thing in other contexts, then it seems like the easiest
way to do this would be with a list of extensions that are excluded from
being mapped to actions in struts.properties.  Is there any way to do this
currently, such as a with a struts.action.extension.exclude property?  Or
what is the best practice way of configuring this?

So, for instance with restful2 I can map /catalog/PlasmaTV to pull up a
product with name of PlasmaTV, but I would also like to have other html and
jsps directly accessible such as through /catalog/help.html or
/catalog/help.jsp without having to map an action specifically to that url.


-- 
View this message in context: http://www.nabble.com/restful2-and-struts.action.extension%3D-tf3202390.html#a8892308
Sent from the Struts - User mailing list archive at Nabble.com.


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