Just to confirm, the revision I was using was around the 870 (Freddy's bug
fix http://article.gmane.org/gmane.comp.java.stripes.user/7230).
On Thu, May 22, 2008 at 3:23 AM, Samuel Santos <[EMAIL PROTECTED]> wrote:
> After updating Stripes source code from CVS (to try a bug fix
> http://article.gmane.org/gmane.comp.java.stripes.user/7776) some of my
> handlers have stopped to work.
>
> This one for example:
> public Resolution handle(CanNotChangeUserException exception,
> HttpServletRequest request,
> HttpServletResponse response) throws MalformedURLException,
> ServletException {
> LOGGER.warn(exception.getMessage());
> resources = ResourceBundle.getBundle("StripesResources",
> request.getLocale());
> Resolution resolution;
>
> // get referer URL and convert it to context-relative path
> URL referer = new URL(request.getHeader("referer"));
> String path = referer.getFile();
> String contextPath = request.getContextPath();
> if (contextPath.length() > 0) {
> if (!path.startsWith(contextPath + "/")) {
> throw new MalformedURLException();
> }
> path = path.replace(contextPath, "");
> }
>
> // create action bean and context
> Configuration config = StripesFilter.getConfiguration();
> MyActionBeanContext context = (MyActionBeanContext)
> config.getActionBeanContextFactory()
> .getContextInstance(request, response);
> ActionBean bean = config.getActionResolver().getActionBean(context,
> path.substring(0, path.indexOf("?")));
> String sourcePage = bean.getContext().getSourcePage();
>
> if (bean != null && StringUtils.isNotBlank(sourcePage)) {
> bean.getContext().getValidationErrors().addGlobalError(
> new LocalizableError("error.CanNotChangeUserException."
> + exception.getOperation()));
> resolution = new
> RedirectResolution(bean.getClass()).flash(bean).addParameter("id",
> bean.getContext().getRequest().getParameter("id"));
> } else {
> request.setAttribute("error",
> resources.getString("error.CanNotChangeUserException."
> + exception.getOperation()));
> resolution = new ForwardResolution("/WEB-INF/error.jsp");
> }
>
> return resolution;
> }
>
> It was working fine, but now the error message never appears.
> I was using a revision prior to 900, don't know which one exactly...
>
> Regards
>
> --
> Samuel Santos
> http://www.samaxes.com/
--
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