File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Wildcard Actions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Wildcard Actions" Watch "Wildcard Actions" New topic

Wildcard Actions

Ally Cavs
Ranch Hand

Joined: Aug 25, 2008
Posts: 89

my actions are like

<action name="save" class="example.Save">
<result type="tiles"></result>

so the url would be like

Now if I have a url for a image like so

How can i wildcard this url to hit my action. This is what I tried

<action name="*content*" class="save.ServeContent">
<result name="NONE"></result>

Hope I can do this?

Ankit Garg

Joined: Aug 03, 2008
Posts: 9463

I asked this some time ago. I think this will also be applicable here.

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ally Cavs
Ranch Hand

Joined: Aug 25, 2008
Posts: 89

Thanks for your very quick reply. im confused though. Are you sayiing to use the res plugin?

Do I really have to that?
Is there not another way?

I agree. Here's the link:
subject: Wildcard Actions
It's not a secret anymore!