More website doc problems: Type Conversion and Conversion Annotation

2015-08-19 Thread rgm
In order to determine the best way to prompt for and store a javax.mail.internet.InternetAddress, I began researching these pages, which are broken to various degrees: https://cwiki.apache.org/confluence/display/WW/Type+Conversion https://cwiki.apache.org/confluence/display/WW/Conversion+Annotatio

website documentation problem?

2015-08-07 Thread rgm
Am seeing "Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20" on this page and many others: https://struts.apache.org/docs/parameters-interceptor.html

TokenInterceptor locking HTTP session for entire action invocation?

2015-07-11 Thread rgm
the List Users page is trying to show whether or not "Alice" is logged in by accessing properties of her HTTP session. Is it necessary for TokenInterceptor to hold onto the session lock for the entire action invocation? Sincerely, rgm

TokenInterceptor locking HTTP session for entire action invocation?

2015-07-10 Thread rgm
the List Users page is trying to show whether or not "Alice" is logged in by accessing properties of her HTTP session. Is it necessary for TokenInterceptor to hold onto the session lock for the entire action invocation? Sincerely, rgm

Strategy for remove nulls from string parameter values?

2014-07-28 Thread rgm
I've got a problem where my PostgreSQL database won't store a String that contains a null charcter, and I'm trying to figure out the best place to sanitize the parameter. Your advice is appreciated. If it were a one-off issue, I'd handle it in the validate() method of the action, but in this case

Detect abuse of parameterInterceptor / Zero-Day issue?

2014-04-24 Thread rgm
I'd like to begin monitoring the server's request log and system logs to be able to detect abuse of today's 0-day, if possible. Is it possible to search for GET requests or Struts log statements to determine if this issue is being exploited?

Diagnosing problem loading "theme.properties" on JBoss 7 with Struts 2.3.16

2013-12-12 Thread rgm
allow the constructor for FileInputStream to throw the exception itself. -rgm

Fwd: Theme problem after update to 2.3.16 -- loading parent theme templates?

2013-12-11 Thread rgm
re, but the relative path I specified in struts.ui.templateDir does not appear to be searched with respect to the webapp's root. Here's where JBoss puts it on my filesystem: /usr/local/jboss/standalone/tmp/vfs/deploymentee851be496797b89/rgm-app.war-ccba0b3fcf2c2b22/mx/themes/css_xhtml/the

Theme problem after update to 2.3.16 -- loading parent theme templates?

2013-12-11 Thread rgm
I'm getting this error from my JBoss 7 application server: ERROR [freemarker.runtime] (http--0.0.0.0-8443-3) Template processing error: "Error reading included file /mx/themes/~~~rgm/dynamic-attributes.ftl": freemarker.temp late.TemplateException: Error reading included file /m

Are S2-018 and S2-019 serious / remotely exploitable?

2013-09-18 Thread rgm
7.html> - In Struts 2 before 2.3.15.1 the information following "redirect:" or "redirectAction:" can easily be manipulated to redirect to an arbitrary location. Unsure about appropriate panic level, -rgm

Providing "excludeParams" to ParametersInterceptor -- must expand "defaultStack"

2013-09-16 Thread rgm
exploding" the defaultStack in my struts.xml? Currently I have: Must I "explode" that "defaultStack" reference in order to provide the "excludeParams" parameter to the "params" interceptor contained therein? Thank you, -rgm

Regression from WW-3810? NPE in UrlSet.includeClassesUrl(UrlSet.java:199)

2012-06-08 Thread struts . rgm
Like I said a couple of days ago, this doesn't actually seem to hurt anything, but I thought that Ɓukasz might want to have a look at this exception. Has anyone else seen this with 2.3.4 or newer snapshots? -rgm On Jun 6, 2012, at 2:23 PM, struts@spamgourmet.com wrote: > Runnin

NPE at at xwork2.util.finder.UrlSet.includeClassesUrl(UrlSet.java:199)

2012-06-06 Thread struts . rgm
Running Struts 2.3.4 build #481 on JBoss 5 I'm getting the following NullPointerException on startup. It seems benign, and happens with devMode either true or false. 2012-06-06 12:50:18,539 INFO [com.opensymphony.xwork2.config.impl.DefaultConfiguration] (HDScanner) Overriding property struts

Re: Dynamic Attributes can't be boolean? StrutsUtil.translateVariables exception

2012-05-25 Thread struts . rgm
Chris, Surrounding it with quotes would mean that I'd have to change all my UI templates, as well as my theme templates. Note how my theme template expects a Boolean (not a String) attribute, below: > < <#if parameters.required?default(false)> > < required="true"<#rt/> > < From my perspec

Dynamic Attributes can't be boolean? StrutsUtil.translateVariables exception

2012-05-25 Thread struts . rgm
After installing Struts 2.3.4, it appears that dynamic attributes must be strings now? I've modified text.ftl in my custom theme like this (diff output): 23c23 < --- > 46,54d45 < <#if parameters.required?default(false)> < required="true"<#rt/> < < <#if parameters.autofocus?default(false)> <

Bug? 2.3.3 struts2-blank.war fails to deploy on JBoss 5

2012-05-07 Thread struts . rgm
I recently tried to upgrade our app from 2.3.1.2 to 2.3.3, but got an error in startup. To determine if it was "just me" I tried deploying the struts2-blank.war file in my JBoss 5.1 system, but got the attached error. It seems that the application cannot load "struts-default.xml" anymore. Th

Re: Fuzz testing and ognl.MethodFailedException - Freemarker results can't use integer types in compare operations?

2012-03-15 Thread struts . rgm
Errors() && fieldErrors?keys?seq_contains("userGroupId")) > ... do something with userGroupId as an integer ... Sincerely, rgm On Mar 15, 2012, at 11:09 AM, struts@spamgourmet.com wrote: > I've got accessor/mutators on my action for an integer ID parameter

Fuzz testing and ognl.MethodFailedException - Freemarker results can't use integer types in compare operations?

2012-03-15 Thread struts . rgm
I've got accessor/mutators on my action for an integer ID parameter like this: NewUserAction { int _userGroupId = -1; // execute, validate, other methods setUserGroupId( int id ) { this._userGroupId = id; } getUserGroupId() { return _userGroupId; } } But when I

freemarker radio tag with map literals [solved, kind of]

2011-10-13 Thread struts . rgm
#assign cars = {'ford':'Fusion', 'toyota':'Prius'} /> <@s.radio name="cars" list=cars listKey="key" listValue="%{ getText( value ) }" /> I would have expected it to work without the listKey and listValue attributes. If you have additional insight I'd love to hear it. Thanks, -rgm - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Example for optgroup doesn't work

2011-09-19 Thread struts . rgm
Regarding: http://struts.apache.org/2.2.3/struts2-core/apidocs/org/apache/struts2/components/OptGroup.html and http://struts.apache.org/2.2.3.1/docs/optgroup.html The example given at the bottom, when translated in to Freemarker tag syntax, doesn't work. Here's my FM version: <@s.select label=

Documentation: Checkbox "false" injection

2011-07-20 Thread struts . rgm
The "using checkboxes" page at http://struts.apache.org/2.2.3/docs/using-checkboxes.html says: The framework automatically tracks the checkboxes used by a form (so you don't have to). If a checkbox is missing, a default value for the checkbox (usually false) is injected. The checkbox

FieldErrors for a specific form ID

2011-07-19 Thread struts . rgm
After perusing the source code I don't feel like this is possible, but if y'all know otherwise please give me a heads-up even if just to confirm my suspicion. It appears that Struts2 does know the ID of the current form, but this information is not used for an xwork validation context -- which ap

Using string literals or references to objects in @s.url?

2011-07-12 Thread struts . rgm
dFailException for the integer-only setter. http://struts.apache.org/2.2.3/docs/freemarker-tags.html Or maybe it's "obvious." -rgm

Documentation styles missing some classes?

2011-07-11 Thread struts . rgm
This could be intentional, but I believe the "space.css" style stylesheet lost the CSS class definition for ".tipMacro." This makes the docs look a little less nice in v2.2.3 than in v2.0.14. Compare the green package heirarchy tip boxes between: http://struts.apache.org/2.0.14/docs/loca

Re: Namespace sitemesh decorators? Namespace from freemarker result?

2011-07-05 Thread struts . rgm
Dear Roland-from-last-week, The normal ConfigDecoratorMapper does what you want. Since namespaces in Struts look like a "path" in the URL, you can simply apply a decorator to the pattern for the namespace. For example, in your decorators.xml, do: /yournamespace/* There is n

Namespace sitemesh decorators? Namespace from freemarker result?

2011-06-28 Thread struts . rgm
I have two namespaces, "admin" and " (the default namespace). I'd like to re-use the same result template for both, but decorate them differently. My templates declare their decorator using the meta tag, like this: Then, in decorators.xml, I have defined: I'd like to generalize this to h

RedirectAction supports "anchor" param

2011-06-21 Thread struts . rgm
I've opened this minor documentation issue as: https://issues.apache.org/jira/browse/WW-3652 Affected files will be: src/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java (needs javadoc updates) -Roland

Re: optgroup supporting cssClass? or dynamicAttributes?

2011-06-20 Thread struts . rgm
https://issues.apache.org/jira/browse/WW-3209 I wonder if I've just run into this unresolved issue. On Jun 20, 2011, at 5:37 PM, struts@spamgourmet.com wrote: > Is it possible for optgroup to support some of the attributes that other > UIBeans have, such as "cssClass" and "id" ? > > I crea

optgroup supporting cssClass? or dynamicAttributes?

2011-06-20 Thread struts . rgm
Is it possible for optgroup to support some of the attributes that other UIBeans have, such as "cssClass" and "id" ? I created my own theme and edited optgoup.ftl to check for parameters.cssClass??, but it appears that this is not enough. Perhaps some of the universal HTML attributes should be

Re: jsp caching problem

2011-06-13 Thread struts . rgm
For the browser-side issues, you might try using the "autocomplete="off"" attribute on the form tag. See: https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion#How_to_Turn_Off_the_Autocompletion_Feature It may differ for Google Chrome and IE. -Roland On Jun 13, 2011, at 10:46 AM

Re: Custom TextProvider -- fall-back not working?

2011-06-08 Thread struts . rgm
Some more minor points on this issue, relating to the document at: http://struts.apache.org/2.2.3/xwork-core/apidocs/com/opensymphony/xwork2/TextProvider.html * "Implementing classes can delegate TextProviderSupport" -- clarifying the verb "delegate" or providing an example would be really useful

Custom TextProvider -- fall-back not working?

2011-06-08 Thread struts . rgm
This is a question that has come up before, but I've not seen it answered fully (I searched the list first!). Here's what I've got so far. Goals: Implement a custom resource provider that gets searched BEFORE the action-level, interface-level, or package-level ".properties" files, and gets its

Re: Hash tags

2011-06-01 Thread struts . rgm
Yes, I believe the document should be updated to add an anchor example. As Dave mentioned, I'll file a JIRA ticket for that. Explaining my other sentence, I saw that the extended class also supported the "location" and "parse" parameters in addition to "anchor." However, the constructor for the

Re: Hash tags

2011-06-01 Thread struts . rgm
I tried that first, but it yields "viewuser#userPreferences.action." I found the answer by diving into the source code. The key insight is that this is called an "anchor" (not a hash). This works: viewuser userPreferences This document should be updated: http://struts.apache.org/2.2.3/d

Hash tags

2011-06-01 Thread struts . rgm
Does the redirectAction result support a parameter or attribute defining a hash tag to append? For example, this: viewuser Might yield: /context/viewuser.action#userPreferences I don't see any such thing on the document: http://struts.apache.org/2.2.3/docs/redirect-action-result.html Tha

Localization for SiteMesh decorators

2011-01-28 Thread struts . rgm
This seems like a documentation bug. This page: http://struts.apache.org/2.2.1.1/docs/localization.html Says "Internationalizing SiteMesh decorators is possible, but there are quirks. See SiteMesh Plugin for more." Unfortunately, the link in the documentation is invalid. After using Google to f

Re: cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread struts . rgm
I did try that -- but unless simple/text.ftl changes, there will *still* be an unwanted "class='inputError'" before my cssClass and cssErrorClass attributes are handled by css.ftl. Your example produces the following broken tag: It's closer -- but I believe that a change needs to be made in t

cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread struts . rgm
When a validation error occurs with the css_xhtml theme, the CSS class for a form input does not have the correct class attributes, if a "cssClass" has been supplied. Instead of class "inputError" joining the existing "class" which is specified by the "cssClass" form tag attribute, two separat

Running external Javascript files through Struts/Freemarker -- access to ActionContext and ValueStack?

2010-11-12 Thread struts . rgm
I have an action and freemarker result that includes an external Javascript file. This javascript files needs to be able to use the getText() method. I figured I'd name it "util.js.ftl" so that accessing it directly caused the sitemesh-freemarker filter to catch it, but this throws a NullPoint

Re: Transparently handling a missing image

2010-09-17 Thread java . rgm
directory, then that is returned by getServletPath(). If it's missing, then super.getServletPath() is returned. Criticism welcome! -rgm - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For addit

Message resources -- 2 suggestions and 1 question

2010-09-17 Thread java . rgm
ton.new = New button.new.user = %{ "button.new" } User Thank you, -rgm - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

FM template fall-back / multiple template loaders

2010-08-26 Thread java . rgm
esult will be "login.ftl" such that getLocation() is able to call File.exists(). /${location}/login.ftl Is there perhaps a better way to handle this type of situation? Would you recommend that I extend the FreemarkerManager class and add my own TemplateLoader into t

Choosing a result dynamically based on session attribute?

2010-08-18 Thread java . rgm
action does NOT provide a getSession() method? I'd like to do something like this: /layouts/${Session.layout}/index.ftl -rgm - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: u

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
; J2EE Filter or Servlet mapped to ".png"? I look forward to hearing any ideas you might have. -rgm - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Advice on replacing an image with fall-back?

2010-07-28 Thread java . rgm
ibrary within the FreeMarker templates to reference external resources Any guidance or ideas are appreciated! -rgm - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Setting up 2.2.1 in maven for testing

2010-07-27 Thread java . rgm
new implementors. Thank you for taking the time to consider improving the docs, I know it's not as sexy as coding. -rgm On Jul 27, 2010, at 8:13 AM, java@spamgourmet.com wrote: > I'd like to test the Sitemesh / FreeMarker "full integration" configuration > availa

Setting up 2.2.1 in maven for testing

2010-07-27 Thread java . rgm
t maven downloads the pre-release build of struts2-core-2.2.1.jar on its own from the staging repository. I've added a pluginRepository section (from the 2.2.1 VOTE email), but this is insufficient / incomplete. Any help is appreciated. Sincerely, -rgm -- My current