Re: Transparently handling a missing image

2010-09-17 Thread java . rgm
In case it helps anyone else (or in case anyone wants to tell me how much of a bad idea this is), to solve this problem I ended up writing my own SkinFilter class (implements Filter) which looks for a "skin" parameter in the HttpSession. If it's there, then the servlet request is wrapped in a

Message resources -- 2 suggestions and 1 question

2010-09-17 Thread java . rgm
On this page: http://struts.apache.org/2.2.1/docs/message-resource-files.html Suggestion -- discuss (or at least link to) PropertyResourceBundle MessageFormat patterns This page should include an example to the effect of: numUsers = {0,choice,0#No Users|1#1 User|1<{0} Users} Suggestion -- Expand

FM template fall-back / multiple template loaders

2010-08-26 Thread java . rgm
Is there a way to specify an alternate location for a result template in cases when the template is not found? If the specified template is missing, I'd like the framework to try looking in a different location before giving me a 500 error. I'm already using OGNL in my result configuration, b

Choosing a result dynamically based on session attribute?

2010-08-18 Thread java . rgm
Is it possible to choose an action result based on a value in the HttpSession? I have read the following page: http://struts.apache.org/2.0.11.1/docs/parameters-in-configuration-results.html I understand how to reference properties from the action itself, but is it possible if the acti

Including a Velocity page inside a FreeMarker template?

2010-08-12 Thread java . rgm
I'm migrating a system from Velocity to Freemarker. I'd like to be able to include the result of a velocity template into the outer freemarker template while migrating, but cannot seem to use the <@include_page > tag from within a FreemarkerResult. Apparently the FreeMarkerResult is NOT proces

Transparently handling a missing image

2010-07-29 Thread java . rgm
It's possible that this is not a Struts question, but it's succinct: I'd like to be able to code pages that ask for a resource that may or may not be present in one directory. If the resource is NOT present in the requested location, I'd like to automatically look for it in a different location

Advice on replacing an image with fall-back?

2010-07-28 Thread java . rgm
I'm suffering from option overload and need advice on how best to accomplish loading resources based on the User's current "skin." This would be something the user could set through an Action, and would be stored on the HttpSession. I'd like to have one set of templates and page resources norma

Re: Setting up 2.2.1 in maven for testing

2010-07-27 Thread java . rgm
Thank you Ɓukasz, I'm able to move forward now. I should point out that the Sitemesh Plugin page (linked below) lacks information about decorators.xml, which DOES seem to be required in order for the plugin to function. The decorators.xml file can simply contain "" but it seems that it must

Setting up 2.2.1 in maven for testing

2010-07-27 Thread java . rgm
I'd like to test the Sitemesh / FreeMarker "full integration" configuration available in Struts 2.2.1, detailed on this page: http://struts.apache.org/2.x/docs/sitemesh-plugin.html BUT I'm new to using maven and can't seem to figure out how to modify my pom.xml such that maven downloads the pre-