Thanks Ben,
Works fine with revision 933.
--
Samuel
On Fri, May 23, 2008 at 7:39 PM, Ben Gunter <[EMAIL PROTECTED]> wrote:
> Hi, Samuel. I was able to reproduce the NPE you're getting. There's
> nothing wrong with your exception handler. I've fixed the issue in the
> trunk, and the fix will be in the final release. If you don't mind, please
> test this against the latest revision and let me know how it goes.
>
> As for the infinite loop, I have no idea how that could happen. I would
> have expected a stack overflow before an infinite loop. If it still happens
> against the latest revision, send along any information you can give me
> about that and I'll try to track down the cause.
>
> -Ben
>
> Samuel Santos wrote:
>
> Ben,
>
> I'm a little worried with the new Stripes RC1 release.
>
> All my handlers that return a ForwardResolution have stopped working. For
> now I will stick with a previous revision of Stripes beta, maybe the way to
> handle exceptions have changed since I implemented them, but it doesn't seem
> so.
>
> Here's one of my normal handlers:
> public Resolution handle(IdAlreadyExistException exception,
> HttpServletRequest request,
> HttpServletResponse response) {
> LOGGER.warn(exception.getMessage());
> resources = ResourceBundle.getBundle("StripesResources",
> request.getLocale());
> ActionBean bean = (ActionBean)
> request.getAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN);
> String sourcePage = bean.getContext().getSourcePage();
> Resolution resolution;
>
> if (bean != null && StringUtils.isNotBlank(sourcePage)) {
> bean.getContext().getValidationErrors().addGlobalError(
> new LocalizableError("error.IdAlreadyExistException"));
> resolution = new ForwardResolution(sourcePage);
> } else {
> request.setAttribute("error",
> resources.getString("error.IdAlreadyExistException"));
> resolution = new ForwardResolution("/WEB-INF/error.jsp");
> }
>
> return resolution;
> }
>
> It crashes on the forward and enters in an infinite loop, is this normal?
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
--
Samuel Santos
http://www.samaxes.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users