Remove Tiles !!!!

main
Paulo Gustavo Veiga 2023-07-30 22:34:31 -07:00
parent 1340fff68a
commit e55e7e8867
2 changed files with 2 additions and 33 deletions

View File

@ -19,22 +19,14 @@ public class AppConfig {
@Bean
HandlerExceptionResolver errorHandler() {
final SimpleMappingExceptionResolver result =
new SimpleMappingExceptionResolver();
//exception to view name mapping
final Properties p = new Properties();
p.setProperty(MapNotPublicSecurityException.class.getName(), "reactInclude");
p.setProperty(AccessDeniedSecurityException.class.getName(), "reactInclude");
result.setExceptionMappings(p);
final SimpleMappingExceptionResolver result = new SimpleMappingExceptionResolver();
//mapping status code with view response.
result.addStatusCode("reactInclude", 403);
//setting default error view
result.setDefaultErrorView("errorTemplate");
result.setDefaultErrorView("reactInclude");
result.setDefaultStatusCode(500);
return result;
}

View File

@ -1,23 +0,0 @@
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<tiles-definitions>
<!-- Template Declaration -->
<definition name="errorTemplate" template="/jsp/errorTemplate.jsp">
<put-attribute name="title" value="" type="string"/>
<put-attribute name="details" value="" type="string"/>
</definition>
<!-- Error Pages -->
<definition name="unexpectedError" extends="errorTemplate">
<put-attribute name="title" value="UNEXPECTED_ERROR"/>
<put-attribute name="details" value="UNEXPECTED_ERROR_DETAILS"/>
<put-attribute name="logError" value="true"/>
</definition>
<definition name="securityError" extends="errorTemplate">
<put-attribute name="title" value="NO_ENOUGH_PERMISSIONS"/>
<put-attribute name="details" value="NO_ENOUGH_PERMISSIONS_DETAILS"/>
</definition>
</tiles-definitions>