-none- 2007-09-03 - By Don Brown
Back Use two astrisks - '**'
Don
On 9/4/07, Neil Aggarwal <neil@(protected)> wrote: > Hello: > > In my struts.xml, I have this property: > > <constant name="struts.enable.SlashesInActionNames" value="true"/> > > At the very end of my actions, I have this one: > > <action name="*" class="page.NavUtil"> > <result name="success" type="tiles">page.products</result> > </action> > > This works if I have a url with a non-slash action name: > http://cbsweb.jammconsulting.com/cbsweb/nonExistent.action > loads the page I want. > > But, if I have an action name with a slash in it: > http://cbsweb.jammconsulting.com/cbsweb/test/nonExistent.action > I get this error: > [TP-Processor3] ERROR org.apache.struts2.dispatcher.Dispatcher - Could not > find action or result > There is no Action mapped for action name test/nonExistent. - [unknown > location] > at > com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1 > 86) > > But, if I add this action to my struts.xml: > <action name="*/*" class="page.NavUtil"> > <result name="success" type="tiles">page.products</result> > </action> > It brings up the correct page. > > Is there a way to have a wildcard that will match anything from > the url even if there are slashes in it? > > Thanks, > Neil > > -- > Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com > Eliminate junk email and reclaim your inbox. > Visit http://www.spammilter.com for details. > > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ > To unsubscribe, e-mail: user-unsubscribe@(protected) > For additional commands, e-mail: user-help@(protected) > >
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|