Threaded View

  1. #1
    Sencha User lucasguaru's Avatar
    Join Date
    May 2011
    Location
    Guarujá, Brazil
    Posts
    77
    Vote Rating
    2
    Answers
    9
    lucasguaru is on a distinguished road

      0  

    Default Answered: Java + Struts 2 + Ext - How to use failure method?

    Answered: Java + Struts 2 + Ext - How to use failure method?


    How can I handle and error on Struts 2 and send it to Ext in a way I can get it on failure?
    I tried using a specific jsp with exception-mapping but I was going to success.
    If I let the error come, the response text is and page from tomcat.
    I would like to receive in the same way but if the message was my error message.
    What I'm doing know is setting success false but I'm not confortable with that.

    Does anyone is using the failure method for the requests and can get the error message?

    Thanks

  2. Have you tried setting the status code for the response? If you return as 4xx or 5xx error it should go to the failure handler.

    http://en.wikipedia.org/wiki/HTTP_status_code

Thread Participants: 1