Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4755

Dyanamic Attributes in struts tag is not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.3.31
    • Fix Version/s: 2.3.37
    • Component/s: Core Tags
    • Labels:
      None
    • Environment:

      Production

    • Flags:
      Important

      Description

      We have upgraded to struts2-core-2.3.32.jar from struts2-core-2.3.20.jar because of recent vulnerability issue.
      As part of upgrade, we have added and replaced below jars

      struts2-core-2.3.32.jar
      xwork-core-2.3.32.jar
      commons-lang3-3.2.jar
      asm-3.3.jar
      asm-commons-3.3.jar
      asm-tree-3.3.jar
      freemarker-2.3.22.jar
      ognl-3.0.19.jar
      javassist-3.11.0.GA.jar
      commons-fileupload-1.3.2.jar
      commons-io-2.2.jar

      After upgrade, application is up and running. But we are facing to render JSP with struts tags

      For example :

      <s:a href="#create-account-modal" data-toggle='modal'> </s:a>

      Here data-toggle='modal' is not part of struts-tld. we are getting error as below

      	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:695)
      	at com.ibm._jsp._FEIAMCreateUserAccount._jspService(_FEIAMCreateUserAccount.java:143)
      	at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
      	at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
      	at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
      	at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:354)
      	at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:198)
      	at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:179)
      	at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
      	at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:84)
      	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:606)
      	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)
      	at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
      	at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
      	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:372)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:276)
      	at com.hix.interceptor.FlowInterceptor.intercept(FlowInterceptor.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)
      	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:58)
      	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.hix.interceptor.ActionInterceptor.intercept(ActionInterceptor.java:282)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
      	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
      	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.hix.interceptor.UserInterceptor.intercept(UserInterceptor.java:76)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:140)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	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:245)
      	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
      	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
      	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
      	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
      	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
      	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
      	at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1062)
      	at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:982)
      	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
      	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
      	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
      	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
      	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
      	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
      	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
      Caused by: java.lang.NoSuchMethodError: org/apache/struts2/util/ComponentUtils.isExpression(Ljava/lang/Object;)Z
      	at org.apache.struts2.views.java.simple.DynamicAttributesHandler.processDynamicAttributes(DynamicAttributesHandler.java:48)
      	at org.apache.struts2.views.java.simple.DynamicAttributesHandler.start(DynamicAttributesHandler.java:41)
      	at org.apache.struts2.views.java.simple.AbstractTagHandler.start(AbstractTagHandler.java:62)
      	at org.apache.struts2.views.java.simple.CommonAttributesHandler.start(CommonAttributesHandler.java:38)
      	at org.apache.struts2.views.java.simple.AbstractTagHandler.start(AbstractTagHandler.java:62)
      	at org.apache.struts2.views.java.simple.ScriptingEventsHandler.start(ScriptingEventsHandler.java:54)
      	at org.apache.struts2.views.java.simple.AbstractTagHandler.start(AbstractTagHandler.java:62)
      	at org.apache.struts2.views.java.simple.AnchorHandler$CloseHandler.generate(AnchorHandler.java:48)
      	at org.apache.struts2.views.java.DefaultTheme.renderTag(DefaultTheme.java:122)
      	at org.apache.struts2.views.java.JavaTemplateEngine.renderTemplate(JavaTemplateEngine.java:95)
      	at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:584)
      	at org.apache.struts2.components.Anchor.end(Anchor.java:145)
      	at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
      

      Any of the struts-tag which is having any bootstrap related tags. It is not working. Please help us here.

      Thanks,

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              habajwa Harveer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: