wood burning stoves 2.0*
The moose likes Struts and the fly likes Wildcards in ActionMappings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Wildcards in ActionMappings" Watch "Wildcards in ActionMappings" New topic
Author

Wildcards in ActionMappings

Rashmi Tambe
Ranch Hand

Joined: Aug 07, 2001
Posts: 418
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

Joined: Dec 16, 2003
Posts: 9
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


--<br />Sorry for my bad englich
Rashmi Tambe
Ranch Hand

Joined: Aug 07, 2001
Posts: 418
ohh...i am using 1.1
thats why it isn't working...
thnaks a lot!
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

Rashmi
http://www.twdata.org/struts-wildcard/


Groovy
Rashmi Tambe
Ranch Hand

Joined: Aug 07, 2001
Posts: 418
Thanks Pradeep!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wildcards in ActionMappings
 
Similar Threads
ERROR :: cannot find ActionMappings or ActionFormBeans
Cannot find ActionMappings or ActionFormBeans collection
Cannot find ActionMappings or ActionFormBeans collection
Cannot find ActionMappings or ActionFormBeans collection
Cannot find ActionMappings or ActionFormBeans collection