You need to change your filter-mapping in web.xml so that static
resources like images, css, js etc do not get processed by the struts
filter.
This is what I use where all actions use the *.action extension.
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
Bummer,
Even with two namespaces, "/" and "/images" it still wants to run the image
file, "/images/logo.gif", as an action under the "/images" namespace, it
complains that there is no action mapped
I also tried a single namespace for "/" and got the same error.
So, I think this is a bug... o
As far as using one action why would I want 30 actions that are
identical? Since the page is populated by the database?
I agree that it does not utilize one of the best features of struts to its
full extent... but it does use it, and many other features.
On Jun 3, 2010 4:34 AM, "Paweł Wielg
Thanks for the rezsponse. And I am sorry for the multiple posts of the last
message.
Unfortunately, when I create a newnamespace, I still have the same problem.
I think the reason is it is looking for an action named "logo.for" in the
namespace "images", and since the only action is "fred" it doe
Hi Phil,
i see your point,
when action is configured to catch all requests like that it will
catch all *.gif requests,
maybe add namespace to your action and that will solve your problem,
then You will call any action but in /Example/mynamespace/* and You
will store your images in /images directory
Thanks for your response Pawel,
I am still having problems, so I have included a sample setup. I am using
Eclipse and GlassFish v3. The files in my WAR are:
/images/logo.gif
/META-INF/MANIFEST.MF
/WEB-INF/classes/com/example/
actions/MainSite.class
/WEB-INF/classes/struts.xml
/WEB-INF
Thanks for your response Pawel,
I am still having problems, so I have included a sample setup. I am using
Eclipse and GlassFish v3. The files in my WAR are:
/images/logo.gif
/META-INF/MANIFEST.MF
/WEB-INF/classes/com/example/
actions/MainSite.class
/WEB-INF/classes/struts.xml
/WEB-INF
Thanks for your response Pawel,
I am still having problems, so I have included a sample setup. I am using
Eclipse and GlassFish v3. The files in my WAR are:
/images/logo.gif
/META-INF/MANIFEST.MF
/WEB-INF/classes/com/example/actions/MainSite.class
/WEB-INF/classes/struts.xml
/WEB-INF/
Hi Phil,
why You want to use struts2 if You are dropping one of the main parts
of it - actions?
It looks like You are trying to write one servlet (action) and catch
all that is coming in. If this is correct i strongly suggest to
rethink struts2 as a framework.
As to the problem of blank action exte
Correction, when the extension is blank, it does not find the image. It
seems that I was getting a cached version.
So, it seems that blank extensions do NOT completely work... That is, they
don't work with other resource types (images, css, etc)
I still would appreciate your response, and still
10 matches
Mail list logo