• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wildcards in ActionMappings

 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to use Wildcards in ActionMappings. i.e. i defined the action mapping as -

<action
path="/edit*"
type="org.apache.struts.webapp.example.Edit{1}Action"
name="{1}Form"
scope="request"
validate="false">
<forward
...

The struts user guide says that all requests URIs starting with the word 'edit' would be mapped to this action. For e.g. /editSubscription, /editRegistration would be mapped.
When i define the action of an jsp page as /editSubscription and submit the page, i get an error -

javax.servlet.jsp.JspException: Cannot retrieve mapping for action /editSubscription

So it seems it does not understand the wildcard mapping...
can anybody help me in defining wild card mapping?
thanks in advance.
 
Uwe Barthel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
what version of struts do you use ?
the wildcard mapping is NOT included in 1.2 and less.
so, get a nightly build.
thx
Uwe Barthel
 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ohh...i am using 1.1
thats why it isn't working...
thnaks a lot!
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rashmi
http://www.twdata.org/struts-wildcard/
 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Pradeep!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic