You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Richard Wallace (JIRA)" <ji...@apache.org> on 2008/07/08 00:22:05 UTC
[jira] Created: (WW-2712) NPE in
TemplatePageFilter.applyDecorator()
NPE in TemplatePageFilter.applyDecorator()
------------------------------------------
Key: WW-2712
URL: https://issues.apache.org/struts/browse/WW-2712
Project: Struts 2
Issue Type: Bug
Components: Plugin - SiteMesh
Affects Versions: 2.1.2
Reporter: Richard Wallace
When the ActionContextCleanUp->FreeMarkerPageFilter->FilterDispatcher chain are being used and the cleanup filter is applied to /* and the page filter is applied to /* and the filter dispatcher is only applied to *.action, the following NPE occurs:
java.lang.NullPointerException
at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:104)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:97)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
In looking at TemplatePageFilter, it seems to assume that a Dispatcher has been set for the thread. Since the FilterDispatcher is never hit, this is not the case. It seems the only way to make this work is to make sure all three of the filters is applied to the same path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2712) NPE in
TemplatePageFilter.applyDecorator()
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45315#action_45315 ]
Musachy Barroso commented on WW-2712:
-------------------------------------
I am lost on this one. Any one knows what do to with it, besides what is suggested in the ticket already (make sure all three of the filters is applied to the same path)?
> NPE in TemplatePageFilter.applyDecorator()
> ------------------------------------------
>
> Key: WW-2712
> URL: https://issues.apache.org/struts/browse/WW-2712
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Affects Versions: 2.1.2
> Reporter: Richard Wallace
> Fix For: 2.1.3
>
>
> When the ActionContextCleanUp->FreeMarkerPageFilter->FilterDispatcher chain are being used and the cleanup filter is applied to /* and the page filter is applied to /* and the filter dispatcher is only applied to *.action, the following NPE occurs:
> java.lang.NullPointerException
> at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:104)
> at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:97)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
> In looking at TemplatePageFilter, it seems to assume that a Dispatcher has been set for the thread. Since the FilterDispatcher is never hit, this is not the case. It seems the only way to make this work is to make sure all three of the filters is applied to the same path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2712) NPE in
TemplatePageFilter.applyDecorator()
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45337#action_45337 ]
Musachy Barroso commented on WW-2712:
-------------------------------------
TemplatePageFilter is from the sitemesh plugin
> NPE in TemplatePageFilter.applyDecorator()
> ------------------------------------------
>
> Key: WW-2712
> URL: https://issues.apache.org/struts/browse/WW-2712
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Affects Versions: 2.1.2
> Reporter: Richard Wallace
> Fix For: 2.1.3
>
>
> When the ActionContextCleanUp->FreeMarkerPageFilter->FilterDispatcher chain are being used and the cleanup filter is applied to /* and the page filter is applied to /* and the filter dispatcher is only applied to *.action, the following NPE occurs:
> java.lang.NullPointerException
> at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:104)
> at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:97)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
> In looking at TemplatePageFilter, it seems to assume that a Dispatcher has been set for the thread. Since the FilterDispatcher is never hit, this is not the case. It seems the only way to make this work is to make sure all three of the filters is applied to the same path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2712) NPE in
TemplatePageFilter.applyDecorator()
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-2712:
-----------------------------
Fix Version/s: 2.1.3
> NPE in TemplatePageFilter.applyDecorator()
> ------------------------------------------
>
> Key: WW-2712
> URL: https://issues.apache.org/struts/browse/WW-2712
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Affects Versions: 2.1.2
> Reporter: Richard Wallace
> Fix For: 2.1.3
>
>
> When the ActionContextCleanUp->FreeMarkerPageFilter->FilterDispatcher chain are being used and the cleanup filter is applied to /* and the page filter is applied to /* and the filter dispatcher is only applied to *.action, the following NPE occurs:
> java.lang.NullPointerException
> at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:104)
> at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:97)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
> In looking at TemplatePageFilter, it seems to assume that a Dispatcher has been set for the thread. Since the FilterDispatcher is never hit, this is not the case. It seems the only way to make this work is to make sure all three of the filters is applied to the same path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2712) NPE in
TemplatePageFilter.applyDecorator()
Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45319#action_45319 ]
Wes Wannemacher commented on WW-2712:
-------------------------------------
I think he is stating that when you have the following filter mappings -
<filter-mapping>
<filter-name>struts-cleanup</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>freemarker</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
That you will get an NPE in the TemplatePageFilter... I'm not sure if FreeMarkerPageFilter comes from sitemesh or freemarker itself (as I didn't look too much into this), but I was sort of assuming that it comes from sitemesh because why else use ActionContextCleanup? Anyhow, hopefully we'll get some more feedback from the original poster.
> NPE in TemplatePageFilter.applyDecorator()
> ------------------------------------------
>
> Key: WW-2712
> URL: https://issues.apache.org/struts/browse/WW-2712
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Affects Versions: 2.1.2
> Reporter: Richard Wallace
> Fix For: 2.1.3
>
>
> When the ActionContextCleanUp->FreeMarkerPageFilter->FilterDispatcher chain are being used and the cleanup filter is applied to /* and the page filter is applied to /* and the filter dispatcher is only applied to *.action, the following NPE occurs:
> java.lang.NullPointerException
> at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:104)
> at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:97)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
> In looking at TemplatePageFilter, it seems to assume that a Dispatcher has been set for the thread. Since the FilterDispatcher is never hit, this is not the case. It seems the only way to make this work is to make sure all three of the filters is applied to the same path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-2712) NPE in
TemplatePageFilter.applyDecorator()
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso resolved WW-2712.
---------------------------------
Resolution: Not A Problem
I will close this issue as "Not a problem" considering that the Sitemesh plugin "allows Sitemesh templates to access Struts information. ", it is up to the user to make the Dispatcher be applied to the request, which is a requirement for the Sitemesh plugin.
> NPE in TemplatePageFilter.applyDecorator()
> ------------------------------------------
>
> Key: WW-2712
> URL: https://issues.apache.org/struts/browse/WW-2712
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Affects Versions: 2.1.2
> Reporter: Richard Wallace
> Fix For: 2.1.3
>
>
> When the ActionContextCleanUp->FreeMarkerPageFilter->FilterDispatcher chain are being used and the cleanup filter is applied to /* and the page filter is applied to /* and the filter dispatcher is only applied to *.action, the following NPE occurs:
> java.lang.NullPointerException
> at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:104)
> at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:97)
> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
> In looking at TemplatePageFilter, it seems to assume that a Dispatcher has been set for the thread. Since the FilterDispatcher is never hit, this is not the case. It seems the only way to make this work is to make sure all three of the filters is applied to the same path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.