Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to pass certain action from struts2 mapper

 
Greenhorn
Posts: 3
  • 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
 
Ranch Hand
Posts: 4864
  • 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
  • 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.
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic