• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

/* in Struts Action Mapping

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have the following action mappings.

Say,

<action path="/a" type="AAction">
<forward name="success" path="success.jsp" />
<forward name="failure" path="error.jsp" />
</action>

and

<action path="/b" type="BAction">
<forward name="success" path="success.jsp" />
<forward name="failure" path="error.jsp" />
</action>

And I have a requirement which is like this.

when the 'path' is anything OTHER THAN "/a" or "/b", i want it to be directed to a specific Action class.

I tried the path="/*", but its not supported.

How can this be implemented?

Thanks in advance.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid you can't specify a default mapping that is used if none of the others match.

Refer to the heading "Using Wildcards in ActionMappings" in this link to see what you can do.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic