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

[struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3.28
    • Fix Version/s: 2.3.29, 2.5.1
    • Component/s: Plugin - Tiles
    • Labels:
      None

      Description

      Hi,

      Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener (StrutsWildcardServletTilesApplicationContext).

      This listener make a call to ServletContext.getRealPath method.
      However this method can't be used with a tomcat "unpackWARs=false" deployment scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).

      Cause when war file is not exploded, this method return always "null".
      So i get a NullPointerException during context loading !

      Could you restore a classpath context loading ? As in the previous version ?

      thanks

        Issue Links

          Activity

          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Looks like it does

          Show
          lukaszlenart Lukasz Lenart added a comment - Looks like it does
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user victorsosa closed the pull request at:

          https://github.com/apache/struts/pull/93

          Show
          githubbot ASF GitHub Bot added a comment - Github user victorsosa closed the pull request at: https://github.com/apache/struts/pull/93
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user victorsosa commented on the pull request:

          https://github.com/apache/struts/pull/93#issuecomment-206505978

          Close this PR; the code was implemented by aleksandr-m

          Show
          githubbot ASF GitHub Bot added a comment - Github user victorsosa commented on the pull request: https://github.com/apache/struts/pull/93#issuecomment-206505978 Close this PR; the code was implemented by aleksandr-m
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Struts-JDK6-support-2.3 #1013 (See https://builds.apache.org/job/Struts-JDK6-support-2.3/1013/)
          WW-4622 - Adds fallback to static config definitions to allow work in (amashchenko: rev 5ce807aaea3b3efc1c8de2c064b43052b0b8c73b)

          • plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
          • plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
          • plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Struts-JDK6-support-2.3 #1013 (See https://builds.apache.org/job/Struts-JDK6-support-2.3/1013/ ) WW-4622 - Adds fallback to static config definitions to allow work in (amashchenko: rev 5ce807aaea3b3efc1c8de2c064b43052b0b8c73b) plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletTilesApplicationContext.java
          Hide
          hudson Hudson added a comment -

          UNSTABLE: Integrated in Struts-JDK7-master #460 (See https://builds.apache.org/job/Struts-JDK7-master/460/)
          WW-4622 - getRealPath NPE check (amashchenko: rev b6a7a0e38a71707523517fa33570955c182e7bdc)

          • plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
          Show
          hudson Hudson added a comment - UNSTABLE: Integrated in Struts-JDK7-master #460 (See https://builds.apache.org/job/Struts-JDK7-master/460/ ) WW-4622 - getRealPath NPE check (amashchenko: rev b6a7a0e38a71707523517fa33570955c182e7bdc) plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          Tried a few things, but seems like your assumption is correct -> isn't possible.

          But besides defining DEFINITIONS_CONFIG, there is a second way. To move tiles definitions into resources in that way they should be loaded via getClass().getClassLoader().getResources("/").

          Commited NPE check to make it possible and also ported whole thing to 2.3.x.

          Does it resolves WW-4622, WW-4623, WW-4624? WDYT?

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - Tried a few things, but seems like your assumption is correct -> isn't possible. But besides defining DEFINITIONS_CONFIG , there is a second way. To move tiles definitions into resources in that way they should be loaded via getClass().getClassLoader().getResources("/") . Commited NPE check to make it possible and also ported whole thing to 2.3.x. Does it resolves WW-4622 , WW-4623 , WW-4624 ? WDYT?
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 5ce807aaea3b3efc1c8de2c064b43052b0b8c73b in struts's branch refs/heads/support-2-3 from Aleksandr Mashchenko
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=5ce807a ]

          WW-4622 - Adds fallback to static config definitions to allow work in restricted envs (cherry picked from 6770b35), getRealPath NPE check; WW-4623, WW-4624 - Adds support for multiple tiles defintions (cherry picked from c12cd61)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 5ce807aaea3b3efc1c8de2c064b43052b0b8c73b in struts's branch refs/heads/support-2-3 from Aleksandr Mashchenko [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=5ce807a ] WW-4622 - Adds fallback to static config definitions to allow work in restricted envs (cherry picked from 6770b35), getRealPath NPE check; WW-4623 , WW-4624 - Adds support for multiple tiles defintions (cherry picked from c12cd61)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit b6a7a0e38a71707523517fa33570955c182e7bdc in struts's branch refs/heads/master from Aleksandr Mashchenko
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=b6a7a0e ]

          WW-4622 - getRealPath NPE check

          Show
          jira-bot ASF subversion and git services added a comment - Commit b6a7a0e38a71707523517fa33570955c182e7bdc in struts's branch refs/heads/master from Aleksandr Mashchenko [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=b6a7a0e ] WW-4622 - getRealPath NPE check
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          > And both ways should work even if getRealPath() returns null.

          This isn't possible I think

          Show
          lukaszlenart Lukasz Lenart added a comment - > And both ways should work even if getRealPath() returns null. This isn't possible I think
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment - - edited

          Looks good.

          I think it is ok if:

          1) w/o DEFINITIONS_CONFIG - StrutsWildcardServletTilesApplicationContext will load only from /WEB-INF (no sub-folders) all tiles*

          2) with DEFINITIONS_CONFIG - load all specified files

          And both ways should work even if getRealPath() returns null.

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - - edited Looks good. I think it is ok if: 1) w/o DEFINITIONS_CONFIG - StrutsWildcardServletTilesApplicationContext will load only from /WEB-INF (no sub-folders) all tiles* 2) with DEFINITIONS_CONFIG - load all specified files And both ways should work even if getRealPath() returns null.
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          You are right but by modifying StrutsTilesContainerFactory it is possible, see this commit

          Show
          lukaszlenart Lukasz Lenart added a comment - You are right but by modifying StrutsTilesContainerFactory it is possible, see this commit
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          Doesn't look like ServletApplicationContext can resolve multiple definitions configs (e.g. /tiles1.xml,/tiles2.xml). Or does it?

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - Doesn't look like ServletApplicationContext can resolve multiple definitions configs (e.g. /tiles1.xml,/tiles2.xml ). Or does it?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user aleksandr-m commented on the pull request:

          https://github.com/apache/struts/pull/93#issuecomment-205349984

          And this will break working stuff also.

          Show
          githubbot ASF GitHub Bot added a comment - Github user aleksandr-m commented on the pull request: https://github.com/apache/struts/pull/93#issuecomment-205349984 And this will break working stuff also.
          Hide
          sebastien_leboucher Sebastien Leboucher added a comment -

          Ok i get this :

          struts2-tiles-plugin / 2.3.24.1

          Show
          sebastien_leboucher Sebastien Leboucher added a comment - Ok i get this : struts2-tiles-plugin / 2.3.24.1
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          First:
          Sebastien Leboucher you should be able to use the previous version of plugin with Struts 2.3.28 - just to get security fixes

          Secondly:
          I have already discovered such problem in restricted environment e.g. Google AppEngine and solved it as follow in Struts 2.5, so it's a fallback to the old behaviour if user specified Tiles definitions via DEFINITIONS_CONFIG.

          Based on your discussion and problems defined in WW-4624 my idea is as follow:

          • port my solution from Struts 2.5 to use static resource loading as a fallback
          • define dedicated <init-param/> that will allow define custom patterns to be used in StrutsWildcardServletTilesApplicationContext
          • add Victor's solution with loading multiple definitions and new default pattern i.e. */tiles.xml
          Show
          lukaszlenart Lukasz Lenart added a comment - First: Sebastien Leboucher you should be able to use the previous version of plugin with Struts 2.3.28 - just to get security fixes Secondly: I have already discovered such problem in restricted environment e.g. Google AppEngine and solved it as follow in Struts 2.5, so it's a fallback to the old behaviour if user specified Tiles definitions via DEFINITIONS_CONFIG . Based on your discussion and problems defined in WW-4624 my idea is as follow: port my solution from Struts 2.5 to use static resource loading as a fallback define dedicated <init-param/> that will allow define custom patterns to be used in StrutsWildcardServletTilesApplicationContext add Victor's solution with loading multiple definitions and new default pattern i.e. * /tiles .xml
          Hide
          sebastien_leboucher Sebastien Leboucher added a comment -

          Thank you Lukasz, I'll test this morning

          Show
          sebastien_leboucher Sebastien Leboucher added a comment - Thank you Lukasz, I'll test this morning
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lukaszlenart commented on the pull request:

          https://github.com/apache/struts/pull/93#issuecomment-205177100

          You can ignore Travis for now - I have enabled it experimentally but those tests must be fixed at some point

          Show
          githubbot ASF GitHub Bot added a comment - Github user lukaszlenart commented on the pull request: https://github.com/apache/struts/pull/93#issuecomment-205177100 You can ignore Travis for now - I have enabled it experimentally but those tests must be fixed at some point
          Hide
          sebastien_leboucher Sebastien Leboucher added a comment -

          Thanks to you Victor

          Show
          sebastien_leboucher Sebastien Leboucher added a comment - Thanks to you Victor
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user aleksandr-m commented on the pull request:

          https://github.com/apache/struts/pull/93#issuecomment-205042373

          This alone is not enough to solve WW-4622(https://issues.apache.org/jira/browse/WW-4622). The `ResourceFinder` won't handle that case.

          Show
          githubbot ASF GitHub Bot added a comment - Github user aleksandr-m commented on the pull request: https://github.com/apache/struts/pull/93#issuecomment-205042373 This alone is not enough to solve WW-4622 ( https://issues.apache.org/jira/browse/WW-4622 ). The `ResourceFinder` won't handle that case.
          Hide
          victorsosa victorsosa added a comment -
          Show
          victorsosa victorsosa added a comment - Thanks you Sebastien Leboucher and Aleksandr Mashchenko
          Hide
          victorsosa victorsosa added a comment -

          OK, got it; that's is a good candidate to replace the call.

          I am going to change it to

          URL url = context.getResource(String path)

          Show
          victorsosa victorsosa added a comment - OK, got it; that's is a good candidate to replace the call. I am going to change it to URL url = context.getResource( String path)
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user victorsosa commented on the pull request:

          https://github.com/apache/struts/pull/93#issuecomment-205006766

          This is the stack trace of the recently portlet-webapp test fails

          ```
          2016-04-03 15:47:03,142 ERROR [btpool0-1] dispatcher.Jsr168Dispatcher (Jsr168Dispatcher.java:487) - Could not execute action

          javax.portlet.PortletException: org.apache.jasper.JasperException: /WEB-INF/view/index.jsp(1,42) PWC6117: File "/struts-tags" not found

          at org.apache.pluto.internal.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:115) ~[pluto-container-1.1.6.jar:?]

          at org.apache.struts2.portlet.result.PortletResultHelperJSR168.include(PortletResultHelperJSR168.java:51) ~[classes/:?]

          at org.apache.struts2.portlet.result.PortletResult.executeMimeResult(PortletResult.java:227) ~[classes/:?]
          ```

          Show
          githubbot ASF GitHub Bot added a comment - Github user victorsosa commented on the pull request: https://github.com/apache/struts/pull/93#issuecomment-205006766 This is the stack trace of the recently portlet-webapp test fails ``` 2016-04-03 15:47:03,142 ERROR [btpool0-1] dispatcher.Jsr168Dispatcher (Jsr168Dispatcher.java:487) - Could not execute action javax.portlet.PortletException: org.apache.jasper.JasperException: /WEB-INF/view/index.jsp(1,42) PWC6117: File "/struts-tags" not found at org.apache.pluto.internal.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:115) ~ [pluto-container-1.1.6.jar:?] at org.apache.struts2.portlet.result.PortletResultHelperJSR168.include(PortletResultHelperJSR168.java:51) ~ [classes/:?] at org.apache.struts2.portlet.result.PortletResult.executeMimeResult(PortletResult.java:227) ~ [classes/:?] ```
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          Sorry copy-paste error. Was referring to context.getResource, which will give jndi: protocol url. But currently ResourceFinder doesn't support this protocol.

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - Sorry copy-paste error. Was referring to context.getResource , which will give jndi: protocol url. But currently ResourceFinder doesn't support this protocol.
          Hide
          victorsosa victorsosa added a comment - - edited

          I don't see context.getResourceAsStream as a fix; it doesn't works, we need the path.

          Sorry can you explain more the idea.

          Show
          victorsosa victorsosa added a comment - - edited I don't see context.getResourceAsStream as a fix; it doesn't works, we need the path. Sorry can you explain more the idea.
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          Protecting makes no sense if resources cannot be loaded anyway. Maybe we can use context.getResourceAsStream and load resources via JNDI.

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - Protecting makes no sense if resources cannot be loaded anyway. Maybe we can use context.getResourceAsStream and load resources via JNDI.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user aleksandr-m commented on the pull request:

          https://github.com/apache/struts/pull/93#issuecomment-204510571

          Resources still need to be loaded, NPE check is not enough.

          BTW recently portlet-webapp test fails in my environment too (Oracle JDK).

          Show
          githubbot ASF GitHub Bot added a comment - Github user aleksandr-m commented on the pull request: https://github.com/apache/struts/pull/93#issuecomment-204510571 Resources still need to be loaded, NPE check is not enough. BTW recently portlet-webapp test fails in my environment too (Oracle JDK).
          Hide
          victorsosa victorsosa added a comment - - edited

          Aleksandr Mashchenko I afraid so; We can't load the resource if the ServletContext.getRealPath() return Null. That was my initial reaction to this problem. But anyway we need to protect the API against NPE.

          That part of loading the resources, right now is due to the container(tomcat, etc) and we depend on it.

          Show
          victorsosa victorsosa added a comment - - edited Aleksandr Mashchenko I afraid so; We can't load the resource if the ServletContext.getRealPath() return Null. That was my initial reaction to this problem. But anyway we need to protect the API against NPE. That part of loading the resources, right now is due to the container(tomcat, etc) and we depend on it.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user victorsosa commented on the pull request:

          https://github.com/apache/struts/pull/93#issuecomment-204507324

          Travis is no compiling correctly because is using OpenJDK 7 instead of Java JDK 7

          Show
          githubbot ASF GitHub Bot added a comment - Github user victorsosa commented on the pull request: https://github.com/apache/struts/pull/93#issuecomment-204507324 Travis is no compiling correctly because is using OpenJDK 7 instead of Java JDK 7
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          victorsosa Just to check for NPE isn't enough, resources still need to be loaded.

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - victorsosa Just to check for NPE isn't enough, resources still need to be loaded.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user victorsosa opened a pull request:

          https://github.com/apache/struts/pull/93

          WW-4622 [struts2-tiles-plugin] [StrutsWildcardServletTilesApplicationContext] getRealPath

          [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

          protect the struts API by avoiding the NPE calling ServletContext.getRealPath()

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/victorsosa/struts ww-4622

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/struts/pull/93.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #93


          commit da8b13a87ef0d6af54a8cabbc62d54fbca67f683
          Author: victor sosa <victorsosa@users.noreply.github.com>
          Date: 2016-03-03T18:16:11Z

          Merge pull request #8 from apache/master

          update pull

          commit a5d716393999110b3701563479a96e83136a8b97
          Author: victor sosa <victorsosa@users.noreply.github.com>
          Date: 2016-03-03T18:41:11Z

          Merge pull request #9 from victorsosa/easymock_update

          Easymock update

          commit 6bb1ec67ad539d4bf6850f8314ef521e06b8295e
          Author: victor sosa <victorsosa@users.noreply.github.com>
          Date: 2016-03-04T22:07:16Z

          Merge pull request #10 from apache/master

          pull update

          commit 379b75292e6d084dc881e71f0a826c45934d9df8
          Author: victor sosa <victorsosa@users.noreply.github.com>
          Date: 2016-03-27T18:43:40Z

          Merge pull request #11 from apache/master

          update pull

          commit 66327a1c3277821ae59bba6f93a7aaa3a4c7b55a
          Author: victorsosa <victor.sosa@peopleware.do>
          Date: 2016-04-01T18:04:07Z

          fix for WW-4622

          StrutsWildcardServletTilesApplicationContext getRealPath NPE


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user victorsosa opened a pull request: https://github.com/apache/struts/pull/93 WW-4622 [struts2-tiles-plugin] [StrutsWildcardServletTilesApplicationContext] getRealPath [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath protect the struts API by avoiding the NPE calling ServletContext.getRealPath() You can merge this pull request into a Git repository by running: $ git pull https://github.com/victorsosa/struts ww-4622 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/struts/pull/93.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #93 commit da8b13a87ef0d6af54a8cabbc62d54fbca67f683 Author: victor sosa <victorsosa@users.noreply.github.com> Date: 2016-03-03T18:16:11Z Merge pull request #8 from apache/master update pull commit a5d716393999110b3701563479a96e83136a8b97 Author: victor sosa <victorsosa@users.noreply.github.com> Date: 2016-03-03T18:41:11Z Merge pull request #9 from victorsosa/easymock_update Easymock update commit 6bb1ec67ad539d4bf6850f8314ef521e06b8295e Author: victor sosa <victorsosa@users.noreply.github.com> Date: 2016-03-04T22:07:16Z Merge pull request #10 from apache/master pull update commit 379b75292e6d084dc881e71f0a826c45934d9df8 Author: victor sosa <victorsosa@users.noreply.github.com> Date: 2016-03-27T18:43:40Z Merge pull request #11 from apache/master update pull commit 66327a1c3277821ae59bba6f93a7aaa3a4c7b55a Author: victorsosa <victor.sosa@peopleware.do> Date: 2016-04-01T18:04:07Z fix for WW-4622 StrutsWildcardServletTilesApplicationContext getRealPath NPE
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user victorsosa closed the pull request at:

          https://github.com/apache/struts/pull/92

          Show
          githubbot ASF GitHub Bot added a comment - Github user victorsosa closed the pull request at: https://github.com/apache/struts/pull/92
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user victorsosa commented on the pull request:

          https://github.com/apache/struts/pull/92#issuecomment-204501865

          Dumped, too many conflicts

          Show
          githubbot ASF GitHub Bot added a comment - Github user victorsosa commented on the pull request: https://github.com/apache/struts/pull/92#issuecomment-204501865 Dumped, too many conflicts
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user victorsosa opened a pull request:

          https://github.com/apache/struts/pull/92

          WW-4622 [struts2-tiles-plugin] [StrutsWildcardServletTilesApplicationContext] getRealPath

          [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

          protect the struts API by avoiding the NPE calling ServletContext.getRealPath()

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/victorsosa/struts ww-4622

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/struts/pull/92.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #92


          commit b8826816550422be78be1f7f86ef28f86ee3ca3c
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-09-28T18:51:50Z

          WW-4540 Implements Strict DMI aka SMI

          commit 56ae397d75430dc63fd68b0bfb36afbac1226023
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-09-28T19:15:38Z

          [maven-release-plugin] prepare release STRUTS_2_5_BETA2

          commit 6fbdab1848821b54f3d84981fcd1507f5abd5d92
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-09-28T19:15:50Z

          [maven-release-plugin] prepare for next development iteration

          commit 9638d7adaa9aaed3473e17c9291abdc3421a868a
          Author: Andrea Ligios <andrea.ligios@gmail.com>
          Date: 2015-09-29T14:59:30Z

          Correcting typos...

          https://issues.apache.org/jira/browse/WW-4550?focusedCommentId=14934912&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14934912

          commit 9ad9404bfac2b936e1b5f0f5e828335bc5a51b48
          Author: Andrea Ligios <andrea.ligios@gmail.com>
          Date: 2015-10-05T09:09:48Z

          Changing an erroneous variable's name

          RFC 3399 does not exist. RFC 3339 is the one used here: https://tools.ietf.org/html/rfc3339

          commit 50ae859dab626b6b8c446158f07a4b8e3f889828
          Author: Johannes Geppert <jogep@apache.org>
          Date: 2015-10-05T18:09:55Z

          WW-4505 Add plugin to support bean validation

          • Remove pre configured interceptor stack to use bean validation with rest plugin because this causes conflicts when rest plugin is not used

          commit ecde389ee6fa2a58318d5c78d0186edf8b189b63
          Author: Johannes Geppert <jogep@apache.org>
          Date: 2015-10-05T18:15:51Z

          WW-4540 Enable Strict DMI be default

          • Extend global allowed methods in rest plugin with rest plugin specific default methods

          commit a6241552b67986056da32a70ae75d69c5c40a878
          Author: Johannes Geppert <jogep@apache.org>
          Date: 2015-10-05T19:25:06Z

          WW-4540 Enable Strict DMI be default

          • Add to global allowed methods to rest showcase configuration

          commit 221ef32e37dfd7b8e2a10e7c1586609d4cba8aec
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-06T06:21:23Z

          WW-4402 Updates struts-annotations to support JDK8

          commit e28e7f69b9c3243a76f5a65615fb2917dab689a9
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-06T11:27:53Z

          Includes global-allowed-methods instead of overriding them

          commit f0797388bc220b48c720e0fb29d42d4f58243757
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-06T13:27:04Z

          Fixes failing tests under JDK8

          commit a5812bf0b68b0ffc145f6273e3683b4fc92865fc
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-06T13:36:28Z

          Fixes expected test result

          commit d95fc63992f3892519d970b07052776e0401003a
          Author: Andrea Ligios <andrea.ligios@gmail.com>
          Date: 2015-10-07T14:17:38Z

          Added support for RFC3339 with date part only

          https://issues.apache.org/jira/browse/WW-4551

          commit 366a0b4a5876b26c95eb186487afbd7e84a1cfaf
          Author: cnenning <cnenning@apache.org>
          Date: 2015-10-09T09:11:34Z

          added tests for rfc3339 date formats

          commit 41dd070eda52a72193b9bbf00b9d1f6343dcc5cc
          Author: cnenning <cnenning@apache.org>
          Date: 2015-10-09T09:13:25Z

          WW-4551 merges #52 which adds support for rfc3339 date-only date-format

          commit 79a2022b55e48fb65e23f5be8d775c8006ce83e8
          Author: Jasper <jasper_rosenberg@yahoo.com>
          Date: 2015-10-09T11:34:31Z

          Make it easier to extend to use own ActionInvocation

          I needed to extend DefaultActionProxyFactory to return my own ActionInvocation, but I had to override all of createActionProxy() to do so. Seems like a safe change to break out the ActionInvocation creation to make it easier to just override that piece.

          commit 117f5fbacc6193b1384f1cea3ee844252bfbdb3e
          Author: Jasper <jasper_rosenberg@yahoo.com>
          Date: 2015-10-09T11:41:05Z

          Make it easier to extend to override interceptor stack

          Just as createAction is split out from init, it would be great to split out creating the interceptor iterator creation so it can be overridden without having to override all of init(). (Needed this to always prepend an i18n interceptor to all stacks).

          commit a7b840c75a913f4b1394e07e9a54919a10a445e9
          Author: Christoph Nenning <cnenning@apache.org>
          Date: 2015-10-12T10:47:21Z

          fixed compile error by adding 'new'

          commit da6b03a0a84afbb27ff238247a6edb2c8201066d
          Author: Christoph Nenning <cnenning@apache.org>
          Date: 2015-10-12T10:54:51Z

          WW-4553 Merges #55 which moves creation of interceptors list and iterator to a factory method to allow overriding it

          commit 9c5c568fc5544bb26e7fffcd5a8dbc81dab4cf6a
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-13T04:53:25Z

          Upgrades to master-10 and cleans up plugins

          commit 0dd0f045d2cbe6dc6144299e444fe05aa03c0180
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-13T06:38:09Z

          Drops deprecation interceptor

          commit 4bff5a87486b67a6da0f7703af574f2eff65e036
          Author: cnenning <cnenning@apache.org>
          Date: 2015-10-13T08:21:43Z

          Cleaned up project to be buildable with jdk8. Moved StrutsPortletTestCase to src/test where it belongs! Declared dependencies -junit-plugin and junit as scope test, as it should be.

          commit 9d5b948190480aa6916acf639f84529f534b7041
          Author: cnenning <cnenning@apache.org>
          Date: 2015-10-13T10:52:54Z

          Revert "Cleaned up project to be buildable with jdk8. Moved StrutsPortletTestCase to src/test where it belongs! Declared dependencies -junit-plugin and junit as scope test, as it should be."

          This reverts commit 4bff5a87486b67a6da0f7703af574f2eff65e036.

          commit e0f258f718c4bae691b6b73cb196a3bf55492114
          Author: cnenning <cnenning@apache.org>
          Date: 2015-10-13T11:06:35Z

          made spring-core an optional compile dependency, as that is required for javadoc of jdk8

          commit ed1b8cc7b32dd31d5196c5cbd5e57b6cc38e05eb
          Author: cnenning <cnenning@apache.org>
          Date: 2015-10-13T11:27:57Z

          refactored testEntrySet() to be not dependent on order of entries, fixes test executio wiht jdk8

          commit 692e763e4391169a06bb832a0fec5a42f16534fc
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-13T17:45:33Z

          WW-2891 Replaces deprecated Freemarker's operators

          commit 617bfd23d9deaa1b0e8783964f8d010ff83d7eb9
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-13T17:46:06Z

          WW-2891 Cleans up poms and update Freemarker to the latest available version

          commit 5dcbe657b015c6df5ebbdf35e2548cef41099116
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-19T18:49:49Z

          WW-4536 Drops static to allow redefine the key

          (cherry picked from commit 755ad3fadb0f3b6b6b351c9bc41b59b95c45c07b)

          commit b79c6959a4d5fbfd816e6dce660b095683ad987b
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-19T18:51:48Z

          WW-4536 Checks for patterns in action names to build the same key for actions with patterns

          (cherry picked from commit 30d30e07dee736243b035eb47be4a1c8dae469a2)

          1. Conflicts:
          2. core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java

          commit 0ba7965637eea7d55959de6517d4157fd8ed0bd3
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2015-10-20T06:39:39Z

          Drops unused code
          (cherry picked from commit 412684b)


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user victorsosa opened a pull request: https://github.com/apache/struts/pull/92 WW-4622 [struts2-tiles-plugin] [StrutsWildcardServletTilesApplicationContext] getRealPath [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath protect the struts API by avoiding the NPE calling ServletContext.getRealPath() You can merge this pull request into a Git repository by running: $ git pull https://github.com/victorsosa/struts ww-4622 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/struts/pull/92.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #92 commit b8826816550422be78be1f7f86ef28f86ee3ca3c Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-09-28T18:51:50Z WW-4540 Implements Strict DMI aka SMI commit 56ae397d75430dc63fd68b0bfb36afbac1226023 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-09-28T19:15:38Z [maven-release-plugin] prepare release STRUTS_2_5_BETA2 commit 6fbdab1848821b54f3d84981fcd1507f5abd5d92 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-09-28T19:15:50Z [maven-release-plugin] prepare for next development iteration commit 9638d7adaa9aaed3473e17c9291abdc3421a868a Author: Andrea Ligios <andrea.ligios@gmail.com> Date: 2015-09-29T14:59:30Z Correcting typos... https://issues.apache.org/jira/browse/WW-4550?focusedCommentId=14934912&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14934912 commit 9ad9404bfac2b936e1b5f0f5e828335bc5a51b48 Author: Andrea Ligios <andrea.ligios@gmail.com> Date: 2015-10-05T09:09:48Z Changing an erroneous variable's name RFC 3399 does not exist. RFC 3339 is the one used here: https://tools.ietf.org/html/rfc3339 commit 50ae859dab626b6b8c446158f07a4b8e3f889828 Author: Johannes Geppert <jogep@apache.org> Date: 2015-10-05T18:09:55Z WW-4505 Add plugin to support bean validation Remove pre configured interceptor stack to use bean validation with rest plugin because this causes conflicts when rest plugin is not used commit ecde389ee6fa2a58318d5c78d0186edf8b189b63 Author: Johannes Geppert <jogep@apache.org> Date: 2015-10-05T18:15:51Z WW-4540 Enable Strict DMI be default Extend global allowed methods in rest plugin with rest plugin specific default methods commit a6241552b67986056da32a70ae75d69c5c40a878 Author: Johannes Geppert <jogep@apache.org> Date: 2015-10-05T19:25:06Z WW-4540 Enable Strict DMI be default Add to global allowed methods to rest showcase configuration commit 221ef32e37dfd7b8e2a10e7c1586609d4cba8aec Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-06T06:21:23Z WW-4402 Updates struts-annotations to support JDK8 commit e28e7f69b9c3243a76f5a65615fb2917dab689a9 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-06T11:27:53Z Includes global-allowed-methods instead of overriding them commit f0797388bc220b48c720e0fb29d42d4f58243757 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-06T13:27:04Z Fixes failing tests under JDK8 commit a5812bf0b68b0ffc145f6273e3683b4fc92865fc Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-06T13:36:28Z Fixes expected test result commit d95fc63992f3892519d970b07052776e0401003a Author: Andrea Ligios <andrea.ligios@gmail.com> Date: 2015-10-07T14:17:38Z Added support for RFC3339 with date part only https://issues.apache.org/jira/browse/WW-4551 commit 366a0b4a5876b26c95eb186487afbd7e84a1cfaf Author: cnenning <cnenning@apache.org> Date: 2015-10-09T09:11:34Z added tests for rfc3339 date formats commit 41dd070eda52a72193b9bbf00b9d1f6343dcc5cc Author: cnenning <cnenning@apache.org> Date: 2015-10-09T09:13:25Z WW-4551 merges #52 which adds support for rfc3339 date-only date-format commit 79a2022b55e48fb65e23f5be8d775c8006ce83e8 Author: Jasper <jasper_rosenberg@yahoo.com> Date: 2015-10-09T11:34:31Z Make it easier to extend to use own ActionInvocation I needed to extend DefaultActionProxyFactory to return my own ActionInvocation, but I had to override all of createActionProxy() to do so. Seems like a safe change to break out the ActionInvocation creation to make it easier to just override that piece. commit 117f5fbacc6193b1384f1cea3ee844252bfbdb3e Author: Jasper <jasper_rosenberg@yahoo.com> Date: 2015-10-09T11:41:05Z Make it easier to extend to override interceptor stack Just as createAction is split out from init, it would be great to split out creating the interceptor iterator creation so it can be overridden without having to override all of init(). (Needed this to always prepend an i18n interceptor to all stacks). commit a7b840c75a913f4b1394e07e9a54919a10a445e9 Author: Christoph Nenning <cnenning@apache.org> Date: 2015-10-12T10:47:21Z fixed compile error by adding 'new' commit da6b03a0a84afbb27ff238247a6edb2c8201066d Author: Christoph Nenning <cnenning@apache.org> Date: 2015-10-12T10:54:51Z WW-4553 Merges #55 which moves creation of interceptors list and iterator to a factory method to allow overriding it commit 9c5c568fc5544bb26e7fffcd5a8dbc81dab4cf6a Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-13T04:53:25Z Upgrades to master-10 and cleans up plugins commit 0dd0f045d2cbe6dc6144299e444fe05aa03c0180 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-13T06:38:09Z Drops deprecation interceptor commit 4bff5a87486b67a6da0f7703af574f2eff65e036 Author: cnenning <cnenning@apache.org> Date: 2015-10-13T08:21:43Z Cleaned up project to be buildable with jdk8. Moved StrutsPortletTestCase to src/test where it belongs! Declared dependencies -junit-plugin and junit as scope test, as it should be. commit 9d5b948190480aa6916acf639f84529f534b7041 Author: cnenning <cnenning@apache.org> Date: 2015-10-13T10:52:54Z Revert "Cleaned up project to be buildable with jdk8. Moved StrutsPortletTestCase to src/test where it belongs! Declared dependencies -junit-plugin and junit as scope test, as it should be." This reverts commit 4bff5a87486b67a6da0f7703af574f2eff65e036. commit e0f258f718c4bae691b6b73cb196a3bf55492114 Author: cnenning <cnenning@apache.org> Date: 2015-10-13T11:06:35Z made spring-core an optional compile dependency, as that is required for javadoc of jdk8 commit ed1b8cc7b32dd31d5196c5cbd5e57b6cc38e05eb Author: cnenning <cnenning@apache.org> Date: 2015-10-13T11:27:57Z refactored testEntrySet() to be not dependent on order of entries, fixes test executio wiht jdk8 commit 692e763e4391169a06bb832a0fec5a42f16534fc Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-13T17:45:33Z WW-2891 Replaces deprecated Freemarker's operators commit 617bfd23d9deaa1b0e8783964f8d010ff83d7eb9 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-13T17:46:06Z WW-2891 Cleans up poms and update Freemarker to the latest available version commit 5dcbe657b015c6df5ebbdf35e2548cef41099116 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-19T18:49:49Z WW-4536 Drops static to allow redefine the key (cherry picked from commit 755ad3fadb0f3b6b6b351c9bc41b59b95c45c07b) commit b79c6959a4d5fbfd816e6dce660b095683ad987b Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-19T18:51:48Z WW-4536 Checks for patterns in action names to build the same key for actions with patterns (cherry picked from commit 30d30e07dee736243b035eb47be4a1c8dae469a2) Conflicts: core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java commit 0ba7965637eea7d55959de6517d4157fd8ed0bd3 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2015-10-20T06:39:39Z Drops unused code (cherry picked from commit 412684b)
          Hide
          victorsosa victorsosa added a comment -

          Thanks guys, for the clarification the patch is on way.

          Show
          victorsosa victorsosa added a comment - Thanks guys, for the clarification the patch is on way.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user victorsosa closed the pull request at:

          https://github.com/apache/struts/pull/91

          Show
          githubbot ASF GitHub Bot added a comment - Github user victorsosa closed the pull request at: https://github.com/apache/struts/pull/91
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user victorsosa commented on the pull request:

          https://github.com/apache/struts/pull/91#issuecomment-204499487

          I will close this PR to open one on the correct support branch. Sorry for the trouble.

          Show
          githubbot ASF GitHub Bot added a comment - Github user victorsosa commented on the pull request: https://github.com/apache/struts/pull/91#issuecomment-204499487 I will close this PR to open one on the correct support branch. Sorry for the trouble.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user victorsosa opened a pull request:

          https://github.com/apache/struts/pull/91

          WW-4622 [struts2-tiles-plugin] [StrutsWildcardServletTilesApplicationContext] getRealPath

          [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

          protect the struts API by avoiding the NPE calling ServletContext.getRealPath()

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/victorsosa/struts ww-4622

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/struts/pull/91.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #91


          commit da8b13a87ef0d6af54a8cabbc62d54fbca67f683
          Author: victor sosa <victorsosa@users.noreply.github.com>
          Date: 2016-03-03T18:16:11Z

          Merge pull request #8 from apache/master

          update pull

          commit a5d716393999110b3701563479a96e83136a8b97
          Author: victor sosa <victorsosa@users.noreply.github.com>
          Date: 2016-03-03T18:41:11Z

          Merge pull request #9 from victorsosa/easymock_update

          Easymock update

          commit 6bb1ec67ad539d4bf6850f8314ef521e06b8295e
          Author: victor sosa <victorsosa@users.noreply.github.com>
          Date: 2016-03-04T22:07:16Z

          Merge pull request #10 from apache/master

          pull update

          commit 379b75292e6d084dc881e71f0a826c45934d9df8
          Author: victor sosa <victorsosa@users.noreply.github.com>
          Date: 2016-03-27T18:43:40Z

          Merge pull request #11 from apache/master

          update pull

          commit 66327a1c3277821ae59bba6f93a7aaa3a4c7b55a
          Author: victorsosa <victor.sosa@peopleware.do>
          Date: 2016-04-01T18:04:07Z

          fix for WW-4622

          StrutsWildcardServletTilesApplicationContext getRealPath NPE


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user victorsosa opened a pull request: https://github.com/apache/struts/pull/91 WW-4622 [struts2-tiles-plugin] [StrutsWildcardServletTilesApplicationContext] getRealPath [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath protect the struts API by avoiding the NPE calling ServletContext.getRealPath() You can merge this pull request into a Git repository by running: $ git pull https://github.com/victorsosa/struts ww-4622 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/struts/pull/91.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #91 commit da8b13a87ef0d6af54a8cabbc62d54fbca67f683 Author: victor sosa <victorsosa@users.noreply.github.com> Date: 2016-03-03T18:16:11Z Merge pull request #8 from apache/master update pull commit a5d716393999110b3701563479a96e83136a8b97 Author: victor sosa <victorsosa@users.noreply.github.com> Date: 2016-03-03T18:41:11Z Merge pull request #9 from victorsosa/easymock_update Easymock update commit 6bb1ec67ad539d4bf6850f8314ef521e06b8295e Author: victor sosa <victorsosa@users.noreply.github.com> Date: 2016-03-04T22:07:16Z Merge pull request #10 from apache/master pull update commit 379b75292e6d084dc881e71f0a826c45934d9df8 Author: victor sosa <victorsosa@users.noreply.github.com> Date: 2016-03-27T18:43:40Z Merge pull request #11 from apache/master update pull commit 66327a1c3277821ae59bba6f93a7aaa3a4c7b55a Author: victorsosa <victor.sosa@peopleware.do> Date: 2016-04-01T18:04:07Z fix for WW-4622 StrutsWildcardServletTilesApplicationContext getRealPath NPE
          Hide
          victorsosa victorsosa added a comment -

          I will submit a patch by the end of the day

          Show
          victorsosa victorsosa added a comment - I will submit a patch by the end of the day
          Hide
          victorsosa victorsosa added a comment -

          OK, what we can do is protect the struts API by avoiding the NPE.

          This is the code right now:
          URL url = new File(context.getRealPath(String.valueOf(path))).toURI().toURL();

          it need to change to:
          String filename = context.getRealPath(String.valueOf(path));
          // check if filename is null
          if(filename != null)
          URL url = new File(filename).toURI().toURL();

          Do you agree? Guys
          This will avoid the NPE

          Show
          victorsosa victorsosa added a comment - OK, what we can do is protect the struts API by avoiding the NPE. This is the code right now: URL url = new File(context.getRealPath(String.valueOf(path))).toURI().toURL(); it need to change to: String filename = context.getRealPath(String.valueOf(path)); // check if filename is null if(filename != null) URL url = new File(filename).toURI().toURL(); Do you agree? Guys This will avoid the NPE
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          Not a container issue. Not only Tomcat works like this - Struts2-tiles-plugin 2.3.28 - StrutsTilesListener throws NullPointerException.

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - Not a container issue. Not only Tomcat works like this - Struts2-tiles-plugin 2.3.28 - StrutsTilesListener throws NullPointerException .
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment - - edited

          victorsosa But we can change how plugin loads resources.

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - - edited victorsosa But we can change how plugin loads resources.
          Hide
          victorsosa victorsosa added a comment - - edited

          Had you try another version? can you try tomcat 8?

          also you can try version 7.0.68

          Show
          victorsosa victorsosa added a comment - - edited Had you try another version? can you try tomcat 8? also you can try version 7.0.68
          Hide
          sebastien_leboucher Sebastien Leboucher added a comment - - edited

          it's tomcat-7.0.53

          Show
          sebastien_leboucher Sebastien Leboucher added a comment - - edited it's tomcat-7.0.53
          Hide
          victorsosa victorsosa added a comment -

          Which versions of Tomcat are you referring to?

          Show
          victorsosa victorsosa added a comment - Which versions of Tomcat are you referring to?
          Hide
          sebastien_leboucher Sebastien Leboucher added a comment -

          I'm not sure that this is a container issue... but more a compliant container issue...
          Apache Tomcat works like this, i don't think this will be changed...
          So the struts2-tiles-plugin is no more compliant with Apache Tomcat and "unpackWARs=false" option...since 2.3.28
          But the previous version do it perfectly

          Show
          sebastien_leboucher Sebastien Leboucher added a comment - I'm not sure that this is a container issue... but more a compliant container issue... Apache Tomcat works like this, i don't think this will be changed... So the struts2-tiles-plugin is no more compliant with Apache Tomcat and "unpackWARs=false" option...since 2.3.28 But the previous version do it perfectly
          Hide
          victorsosa victorsosa added a comment - - edited

          Aleksandr Mashchenko You just proof my point; This is a container issue and not a Struts issue.

          "This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive)."

          We can't change that API - ServletContext.getRealPath(String path)

          Show
          victorsosa victorsosa added a comment - - edited Aleksandr Mashchenko You just proof my point; This is a container issue and not a Struts issue. "This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive)." We can't change that API - ServletContext.getRealPath(String path)
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -
          Show
          aleksandr-m Aleksandr Mashchenko added a comment - Should be fixable. Some solutions - Why does getRealPath() return null when deployed with a .war file? .
          Hide
          sebastien_leboucher Sebastien Leboucher added a comment -

          Ok, so i understand you can't handle this particular use case ? (ie when web app is not expanded)
          Cause when i expand my war, it works fine...without modifying my struts config.
          I tested today this version : 2.3.24.1, and it works perfectly with or without war exploded.
          This new version introduce a new way to load the context...and i can't have the last security fix....
          Do i have to change my listener ?

          Show
          sebastien_leboucher Sebastien Leboucher added a comment - Ok, so i understand you can't handle this particular use case ? (ie when web app is not expanded) Cause when i expand my war, it works fine...without modifying my struts config. I tested today this version : 2.3.24.1, and it works perfectly with or without war exploded. This new version introduce a new way to load the context...and i can't have the last security fix.... Do i have to change my listener ?
          Hide
          victorsosa victorsosa added a comment - - edited

          This one is open
          https://bz.apache.org/bugzilla/show_bug.cgi?id=56890

          "This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive)."

          This issue is a won't fix, we can't change that code behaviour.

          Show
          victorsosa victorsosa added a comment - - edited This one is open https://bz.apache.org/bugzilla/show_bug.cgi?id=56890 "This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive)." This issue is a won't fix, we can't change that code behaviour.
          Hide
          victorsosa victorsosa added a comment -

          Please check this two bugs resolved in tomcat recently

          https://bz.apache.org/bugzilla/show_bug.cgi?id=57556
          https://bz.apache.org/bugzilla/show_bug.cgi?id=55837

          This is really more an env issue than a struts bug.

          Show
          victorsosa victorsosa added a comment - Please check this two bugs resolved in tomcat recently https://bz.apache.org/bugzilla/show_bug.cgi?id=57556 https://bz.apache.org/bugzilla/show_bug.cgi?id=55837 This is really more an env issue than a struts bug.
          Hide
          sebastien_leboucher Sebastien Leboucher added a comment - - edited

          Hi,
          I can't use unpackWARs=true, because i can't change the deployment scheme (industrialized in scripts).
          But i can confirm it works fine in a local environment (with war exploded and the same config).

          This a small sample :

          part web.xml configuration :
          <context-param>
          <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
          <param-value>/WEB-INF/tiles.xml</param-value>
          </context-param>

          <listener>
          <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
          </listener>

          part tiles.xml configuration :

          <!DOCTYPE tiles-definitions PUBLIC
          "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
          "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">

          <tiles-definitions>

          <definition name="baseLayout" template="/abcdtrainssiteweb/rechercheitineraire/pl/screen/layout/baseLayout.jsp">
          <put-attribute name="css" value="commun/css/styles.css" />
          <put-attribute name="title" value="Template" />
          <put-attribute name="header" value="/contextappli/screen/layout/header.jsp" />
          <put-attribute name="body" value="/contextappli/screen/layout/body.jsp" />
          <put-attribute name="footer" value="/contextappli/screen/layout/footer.jsp" />
          </definition>

          <definition name="home" extends="baseLayout">
          <put-attribute name="title" value="test" />
          <put-attribute name="body" value="/contextappli/screen.jsp" />
          </definition>

          Is it enough ?

          Show
          sebastien_leboucher Sebastien Leboucher added a comment - - edited Hi, I can't use unpackWARs=true, because i can't change the deployment scheme (industrialized in scripts). But i can confirm it works fine in a local environment (with war exploded and the same config). This a small sample : part web.xml configuration : <context-param> <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name> <param-value>/WEB-INF/tiles.xml</param-value> </context-param> <listener> <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class> </listener> part tiles.xml configuration : <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd"> <tiles-definitions> <definition name="baseLayout" template="/abcdtrainssiteweb/rechercheitineraire/pl/screen/layout/baseLayout.jsp"> <put-attribute name="css" value="commun/css/styles.css" /> <put-attribute name="title" value="Template" /> <put-attribute name="header" value="/contextappli/screen/layout/header.jsp" /> <put-attribute name="body" value="/contextappli/screen/layout/body.jsp" /> <put-attribute name="footer" value="/contextappli/screen/layout/footer.jsp" /> </definition> <definition name="home" extends="baseLayout"> <put-attribute name="title" value="test" /> <put-attribute name="body" value="/contextappli/screen.jsp" /> </definition> Is it enough ?
          Hide
          victorsosa victorsosa added a comment - - edited

          Also can you provide a small sample to test this out? to duplicate the issue

          Show
          victorsosa victorsosa added a comment - - edited Also can you provide a small sample to test this out? to duplicate the issue
          Hide
          victorsosa victorsosa added a comment -

          Did you try it using unpackWARs=true? just to confirm

          Show
          victorsosa victorsosa added a comment - Did you try it using unpackWARs=true? just to confirm

            People

            • Assignee:
              Unassigned
              Reporter:
              sebastien_leboucher Sebastien Leboucher
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development