Results 1 to 3 of 3

Thread: How do I get the model inside HandlerExceptionResolver in Annotation Based Controller

  1. #1
    Join Date
    Aug 2008
    Posts
    3

    Default How do I get the model inside HandlerExceptionResolver in Annotation Based Controller

    Hi, I'm using Annotation Based controller. How do i get the model of the controller inside the HandlerExceptionResolver.resolveException ????

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    What is it that you want to do exactly? There is no generic way on retrieving the Model because there doesn't have to be one. In most cases the exception gets thrown BEFORE the ModelAndView object can get constructed so no proper Model and/or View object is available.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Aug 2008
    Posts
    3

    Default

    When the exception is thrown the ModelAndView was already created.

    Here is what I'm trying to do:
    When an un-handled exception happens and is thrown by the controller, the HandlerExceptionResolver.resolveException will send a notification to the application development team containing the session,request and exception data. Only data I could not get is the Model.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •