public class HstBridgeHandlerExceptionsResolver extends Object implements org.springframework.web.servlet.HandlerExceptionResolver, org.springframework.core.Ordered
HstPageNotFoundException
to forward request to the page not found sitemap item
configured in HST configuration.Constructor and Description |
---|
HstBridgeHandlerExceptionsResolver() |
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
String |
getPageNotFoundRefId()
Returns the reference id of the 'page not found' sitemap item.
|
org.springframework.web.servlet.ModelAndView |
resolveException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
Exception exception)
If the
exception is instance of HstPageNotFoundException ,
then it tries to resolve the sitemap item path of the configured 'page not found' sitemap item
and forward request to the 'page not found' sitemap item path info. |
protected String |
resolvePageNotFoundPathInfo()
Finds path info of the 'page not found' sitemap item.
|
void |
setOrder(int order)
Sets the order value of this object.
|
void |
setPageNotFoundRefId(String pageNotFoundRefId)
Sets the reference id of the 'page not found' sitemap item.
|
public String getPageNotFoundRefId()
public void setPageNotFoundRefId(String pageNotFoundRefId)
pageNotFoundRefId
- the reference id of the 'page not found' sitemap itempublic org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler, Exception exception)
exception
is instance of HstPageNotFoundException
,
then it tries to resolve the sitemap item path of the configured 'page not found' sitemap item
and forward request to the 'page not found' sitemap item path info.
If the 'page not found' sitemap item is not found, then it simply returns an empty ModelAndView
.
resolveException
in interface org.springframework.web.servlet.HandlerExceptionResolver
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public void setOrder(int order)
order
- order value of this objectprotected String resolvePageNotFoundPathInfo()
Copyright © 2019. All rights reserved.