sitemesh

Custom Error Page Not Decorated by Sitemesh in Spring Security Application

喜夏-厌秋 提交于 2019-12-07 23:31:55
问题 In a Spring MVC (3.2.4) application with Spring Security (3.2.0.RC2) with Sitemesh (2.4.2), the web.xml file has this entry: <error-page> <error-code>403</error-code> <location>/error?code=403</location> </error-page> which maps to ErrorController: @RequestMapping("error") public String displayErrorPage( @RequestParam(value = "code", defaultValue = "0") int code, Model model, final HttpServletRequest request, Principal principal) { // ... return "errorPage"; } which displays errorPage.jsp via

Custom Error Page Not Decorated by Sitemesh in Spring Security Application

痴心易碎 提交于 2019-12-06 13:18:42
In a Spring MVC (3.2.4) application with Spring Security (3.2.0.RC2) with Sitemesh (2.4.2), the web.xml file has this entry: <error-page> <error-code>403</error-code> <location>/error?code=403</location> </error-page> which maps to ErrorController: @RequestMapping("error") public String displayErrorPage( @RequestParam(value = "code", defaultValue = "0") int code, Model model, final HttpServletRequest request, Principal principal) { // ... return "errorPage"; } which displays errorPage.jsp via an InternalResourceViewResolver (there are no other view resolvers in the app). The security works

Why does calling the security authentication property `principal.displayName` in a decorator throw an exception?

流过昼夜 提交于 2019-12-06 08:19:27
Is there a reason why calling the security authentication property principal.displayName in a decorator would cause a problem? I'm setting it as a variable in a sitemesh decorator: <c:set var="displayName"> <sec:authentication property="principal.displayName" /> </c:set> But it generates this exception: java.lang.RuntimeException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Invalid property 'principal.displayName' o f bean class [org.springframework.security.authentication.AnonymousAuthenticationToken]: Bean property 'principal.displayName' is not readable or has an invalid

Generic Error Page not decorated

醉酒当歌 提交于 2019-12-06 07:12:09
问题 I have a generic error page which is not decorated by SiteMesh. May I know what is the reason ? <filter> <display-name>SiteMesh_Filter</display-name> <filter-name>SiteMesh_Filter</filter-name> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class> </filter> <filter-mapping> <filter-name>SiteMesh_Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <error-page> <error-code>404</error-code> <location>/pages/error.jsp</location> </error-page> Thanks. 回答1:

“Not Modified” header followed by unexpected content body with sitemesh3 and mod-jk

被刻印的时光 ゝ 提交于 2019-12-05 17:52:01
In my Java / Struts2 / Tomcat application, when requesting some resources that generate a "304 Not Modified" response, the file is still being sent in the response. This is a response example captured with Fiddler: HTTP/1.1 304 Not Modified Date: Thu, 26 Jun 2014 11:27:27 GMT Server: Apache/2.2.16 (Ubuntu) Connection: Keep-Alive Keep-Alive: timeout=15, max=100 Vary: Accept-Encoding /*! jQuery v1.7.2 jquery.com | jquery.org/license */ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9? a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f(" <"+a+">")

Is it possible to define a decorator directly in a JSP with Sitemesh?

邮差的信 提交于 2019-12-04 14:17:02
问题 I know I should define decorators in a configuration file or my own subclass of ConfigurableSiteMeshFilter . For example: public class SitemeshFilter extends ConfigurableSiteMeshFilter { @Override protected void applyCustomConfiguration(final SiteMeshFilterBuilder builder) { builder.addDecoratorPath("/*", "/WEB-INF/views/layouts/default.jsp"); } } This works for me but this isn't perfect. Can I define what decorator to use directly in a JSP file? <%@ taglib uri="http://java.sun.com/jsp/jstl

Generic Error Page not decorated

余生长醉 提交于 2019-12-04 12:36:54
I have a generic error page which is not decorated by SiteMesh. May I know what is the reason ? <filter> <display-name>SiteMesh_Filter</display-name> <filter-name>SiteMesh_Filter</filter-name> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class> </filter> <filter-mapping> <filter-name>SiteMesh_Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <error-page> <error-code>404</error-code> <location>/pages/error.jsp</location> </error-page> Thanks. This is the most recent archive of the original issue. This is the closed issue page. So, it looks like you

Best practices for sharing web-tier code (Controllers and JSPs) between similar web apps

三世轮回 提交于 2019-12-04 08:32:48
问题 I'm working on rewriting some aging web applications. There are two in particular that are very, very similar, yet share no code today and I aim to fix that. The projects are being rewritten with Maven, Spring MVC, and Sitemesh. Model tier code is easy enough to share using JARs. But I don't know of any good ways to share common web-tier code (JSPs and Controllers) between similar apps. Here's some background. These apps are webstores. One is a normal store (think amazon.com) that a user can

Confluence 6 属性的一个示例

喜你入骨 提交于 2019-12-03 07:13:43
下面是有关 Confluence 页面被调用的前几行的访问概述。 [344ms] - /display/ds/Confluence+Overview [313ms] - SiteMesh: parsePage: http://localhost:8080/display/ds/Confluence+Overview [313ms] - XW Interceptor: Before defaultStack: /pages/viewpage.action (ViewPageAction.execute()) [0ms] - SpaceAwareInterceptor.intercept() [16ms] - PageAwareInterceptor.intercept() [0ms] - AOP: PageManager.getPage() [16ms] - AOP: PermissionManager.hasPermission() [0ms] - AOP: SpacePermissionManager.hasPermission() [16ms] - AOP: SpacePermissionManager.hasPermission() [0ms] - AOP: SpacePermissionManager.hasPermission() [0ms] - AOP:

Best practices for sharing web-tier code (Controllers and JSPs) between similar web apps

淺唱寂寞╮ 提交于 2019-12-02 23:52:05
I'm working on rewriting some aging web applications. There are two in particular that are very, very similar, yet share no code today and I aim to fix that. The projects are being rewritten with Maven, Spring MVC, and Sitemesh. Model tier code is easy enough to share using JARs. But I don't know of any good ways to share common web-tier code (JSPs and Controllers) between similar apps. Here's some background. These apps are webstores. One is a normal store (think amazon.com) that a user can sign into, search products, add to a shopping cart, and check out. The other is basically the same