SourceResolution wrong when using page fragment layouts
-------------------------------------------------------
Key: STS-672
URL: http://www.stripesframework.org/jira/browse/STS-672
Project: Stripes
Issue Type: Bug
Components: ActionBean Dispatching
Affects Versions: Release 1.5.1
Environment: Windows XP SP2
Oracle WebLogic 10.3
Stripes 1.5.1, Stripes-Security
Reporter: Marcus Kraßmann
When using "Page fragment layouts", there is a problem with
getContext().getSourcePageResolution():
The sourcePage points to the inner used view, not the outer one. Using
http://www.stripesframework.org/display/stripes/Layout+Reuse#LayoutReuse-Pagefragmentlayouts
as an example, if "/layout/image.jsp" contains a submit button, then the
called action bean holds "/layout/image.js" as sourcePage, not
"/HelloWorld.jsp". So using manual validation and calling "return
getContext.getSourcePageResolution()" fails with an exception:
java.lang.NullPointerException
at
net.sourceforge.stripes.tag.layout.LayoutDefinitionTag.doStartTag(LayoutDefinitionTag.java:72)
at
jsp_servlet._web_45_inf._pages._layout._reusable.__search_bestellung._jsp__tag3(__search_bestellung.java:298)
at
jsp_servlet._web_45_inf._pages._layout._reusable.__search_bestellung._jspService(__search_bestellung.java:204)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:176)
at
weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:251)
at
net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110)
at
net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
at
org.stripesstuff.plugin.security.SecurityInterceptor.interceptResolutionExecution(SecurityInterceptor.java:220)
at
org.stripesstuff.plugin.security.SecurityInterceptor.intercept(SecurityInterceptor.java:126)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at
net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
at
net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477)
at
net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:287)
at
net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43)
at test.util.ContextFilter.doFilter(ContextFilter.java:49)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43)
at
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43)
at test.util.ContextFilter.doFilter(ContextFilter.java:49)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43)
at
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:97)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development