Github user abrin commented on a diff in the pull request:

    https://github.com/apache/struts/pull/7#discussion_r10770402
  
    --- Diff: core/src/main/resources/template/simple/checkboxlist.ftl ---
    @@ -29,7 +29,13 @@
             <#else>
                 <#assign itemKey = stack.findValue('top')/>
         </#if>
    -    <#if parameters.listValue??>
    +  <#if parameters.listValueKey??>
    +    <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale 
    +       file for it's localized value.  This is then used as a label -->
    +    <#assign itemValue = stack.findString(parameters.listValueKey)/>
    +    <#-- FIXME: find a better way to get the value than a call to @s.text 
-->
    --- End diff --
    
    Interesting, if I add the following in our freemarker (either inside or 
outside of our tag-backed freemarker):
    ```
    <#assign itemValue = struts.getText('error.not_implemented') />
    ${itemValue}
    ```
    
    I see:
    ```
    ERROR 2014-03-19 13:34:04,935 3701958 [qtp2040959768-236 ] 
(CommonsLogger.java:38) 
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor - The following 
has evaluated to null or missing:
    ==> struts.getText('error.not_implemented')  [in template 
"WEB-INF/content/resource/view-template.ftl" at line 82, column 22]
    
    Tip: If the failing expression is known to be legally null/missing, either 
specify a default value with myOptionalVar!myDefault, or use <#if 
myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the 
last step of the expression; to cover the whole expression, use parenthessis: 
(myOptionVar.foo)!myDefault, (myOptionVar.foo)??
    
    The failing instruction:
    ==> #assign itemValue = struts.getText("e...  [in template 
"WEB-INF/content/resource/view-template.ftl" at line 82, column 1]
    FreeMarker template error:
    The following has evaluated to null or missing:
    ==> struts.getText('error.not_implemented')  [in template 
"WEB-INF/content/resource/view-template.ftl" at line 82, column 22]
    
    Tip: If the failing expression is known to be legally null/missing, either 
specify a default value with myOptionalVar!myDefault, or use <#if 
myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the 
last step of the expression; to cover the whole expression, use parenthessis: 
(myOptionVar.foo)!myDefault, (myOptionVar.foo)??
    
    The failing instruction (FTL stack trace):
    ----------
    ==> #assign itemValue = struts.getText("e...  [in template 
"WEB-INF/content/resource/view-template.ftl" at line 82, column 1]
    ----------
    
    Java stack trace (for programmers):
    ----------
    freemarker.core.InvalidReferenceException: [... Exception message was 
already printed; see it above ...]
        at 
freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98)
        at freemarker.core.Assignment.accept(Assignment.java:112)
        at freemarker.core.Environment.visit(Environment.java:265)
        at freemarker.core.MixedContent.accept(MixedContent.java:93)
        at freemarker.core.Environment.visit(Environment.java:265)
        at freemarker.core.EscapeBlock.accept(EscapeBlock.java:85)
        at freemarker.core.Environment.visit(Environment.java:265)
        at freemarker.core.Environment.process(Environment.java:243)
        at freemarker.template.Template.process(Template.java:277)
        at 
org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:215)
        at 
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
        at 
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
        at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:50)
        at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)
        at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)
        at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
        at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)
        at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.apache.struts2.interceptor.MessageStoreInterceptor.intercept(MessageStoreInterceptor.java:197)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.tdar.struts.interceptor.HttpMethodInterceptor.intercept(HttpMethodInterceptor.java:28)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.tdar.struts.interceptor.HttpsInterceptor.doHttpIntercept(HttpsInterceptor.java:51)
        at 
org.tdar.struts.interceptor.HttpsInterceptor.intercept(HttpsInterceptor.java:34)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.tdar.struts.interceptor.SessionSecurityInterceptor.intercept(SessionSecurityInterceptor.java:108)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
        at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        at 
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
        at 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562)
        at 
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
        at 
org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter.doFilter(StrutsExecuteFilter.java:93)
        at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at 
com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
        at 
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
        at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:91)
        at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at 
org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
        at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at 
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at 
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at 
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at 
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
        at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575)
        at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
        at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
        at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:276)
        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:103)
        at 
org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
        at 
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
        at 
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at 
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at 
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
        at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
        at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
        at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
        at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
        at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:370)
        at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
        at 
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
        at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
        at 
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
        at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:722)
    ```
    
    is it possible that there's something different in how our struts.xml is 
setup? [ 
https://bitbucket.org/tdar/tdar.src/src/default/src/main/resources/struts.xml ] 
or should we expose "StrutsUtils" as a bean on our controllers.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to