• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

/* in Struts Action Mapping

 
Reshma Sreenivasulu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic