• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Exception Handling

 
mnadeem chishti
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using Spring framework to develop my webapplicaiton. As exception is thrown in my controllers my application gets crashed and there is white page is displayed. I want to configure some error page on application level which must be displayed whatever and whereever the exception is thrown on back.
please can i have some idea ???
 
tanvir alam
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use the following bean..

<bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="exceptionMappings">
<props>
<prop key="java.lang.Exception">myError</prop>
</props>
</property>
</bean>


here myError is the logical view name of the errorPage
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic