File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass certain action from struts2 mapper

 
Rishit Patel
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is my case.
step-1 : i want to configure action with .gif extention.I know how to do this
i just add struts.action.extension=gif,action.

But the problem is if certain pattern match like i have to this for only
pattern that match /flag/*.gif .Im my case i have lot of .gif file is in my
project.so if i try to configure .gif then it tell me that there is no such
action in struts config file.

Thanks
please let me revert back if you not getting my question properly
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rishit Patel:
i want to configure action with .gif extention.I know how to do this
i just add struts.action.extension=gif,action.

I would recommend that you not do this. If you want a Struts action to provide the content for an image, just refer to it in the <img> tag. Example:
 
Rishit Patel
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually i did this in way you mention but the problem is
Apache does not send the required if-modified-since header for urls with
.action extension and therefore the performace is hindered.So i think it is good that i have any way to solve this problem


Thanks very much for you reply .do you have any other suggestion.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic