This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes How to pass certain action from struts2 mapper 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 "How to pass certain action from struts2 mapper " Watch "How to pass certain action from struts2 mapper " New topic
Author

How to pass certain action from struts2 mapper

Rishit Patel
Greenhorn

Joined: Apr 11, 2008
Posts: 3
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

Joined: Feb 15, 2005
Posts: 4864
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:


Merrill
Consultant, Sima Solutions
Rishit Patel
Greenhorn

Joined: Apr 11, 2008
Posts: 3
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to pass certain action from struts2 mapper
 
Similar Threads
Log file created but datepattern is not getting appended
check if there is a gif viewer
Restricting Access
Configuration file to J2EE
pattern matching on client side by javascript