Hello Iwao,
Thanks for answering.
In my web.xml I have <error-page /> elements to nearly all HTTP errors, this
doesn't change anything.
For issue #2 I've already tried the ERROR dispatcher but without success.
It seems that there isn't an elegant solution for this problem :(
Cheers,
Samuel
On Fri, Apr 4, 2008 at 7:02 AM, Iwao AVE! <[EMAIL PROTECTED]> wrote:
> Hi Samuel,
>
> Stripes does not throw 404 error automatically.
> The second url (/Home.action123) is not filtered by Stripes as you
> guessed.
>
> For the first url (/Home123.action), Stripes' DefaultExceptionHandler
> throws ServletException (status 500 IIRC).
> So you should add another <error-page /> element for error-code 500 to
> your web.xml.
>
> --
> For the issue #2, have you tried adding ERROR dispatcher to your JSP
> filter mapping?
>
> <filter-mapping>
> <filter-name>StripesSecurityFilter</filter-name>
> <url-pattern>*.jsp</url-pattern>
> <dispatcher>REQUEST</dispatcher>
> <dispatcher>INCLUDE</dispatcher>
> <dispatcher>ERROR</dispatcher>
> </filter-mapping>
>
> Regards,
> Iwao
>
> Samuel Santos wrote on 08.3.28 9:56 AM:
> > I detected that some issues still persist in the last Stripes version
> > (trunk) when working with Sitemesh.
> >
> > The best way to describe the issues is with some examples, which are
> > hereinafter.
> >
> > In Sitemesh's /decorators.xml/ file I exclude my error page:
> > <excludes>
> > <pattern>/WEB-INF/error.jsp*</pattern>
> > [...]
> > </excludes>
> >
> > I've configured Sitemesh and Stripes filters like:
> > [...]
> > <context-param>
> >
> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> > <param-value>StripesResources</param-value>
> > </context-param>
> >
> > [...]
> >
> > <filter>
> > <filter-name>Sitemesh</filter-name>
> >
> >
> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
> > </filter>
> >
> > <filter>
> > <description>
> > Provides essential configuration and request processing services
> > for the Stripes framework.
> > </description>
> > <display-name>Stripes Security Filter</display-name>
> > <filter-name>StripesSecurityFilter</filter-name>
> >
> >
> <filter-class>net.sourceforge.stripes.security.controller.StripesSecurityFilter</filter-class>
> > [...]
> > </filter>
> >
> > <filter-mapping>
> > <filter-name>Sitemesh</filter-name>
> > <url-pattern>*.action</url-pattern>
> > </filter-mapping>
> >
> > <filter-mapping>
> > <filter-name>StripesSecurityFilter</filter-name>
> > <url-pattern>*.jsp</url-pattern>
> > <dispatcher>REQUEST</dispatcher>
> > <dispatcher>INCLUDE</dispatcher>
> > </filter-mapping>
> >
> > <filter-mapping>
> > <filter-name>StripesSecurityFilter</filter-name>
> > <servlet-name>StripesDispatcher</servlet-name>
> > <dispatcher>REQUEST</dispatcher>
> > <dispatcher>FORWARD</dispatcher>
> > </filter-mapping>
> >
> > <servlet>
> > <servlet-name>StripesDispatcher</servlet-name>
> >
> >
> <servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class>
> > <load-on-startup>1</load-on-startup>
> > </servlet>
> >
> > <servlet-mapping>
> > <servlet-name>StripesDispatcher</servlet-name>
> > <url-pattern>*.action</url-pattern>
> > </servlet-mapping>
> >
> > [...]
> >
> > <error-page>
> > <error-code>404</error-code>
> > <location>/WEB-INF/error.jsp?httpError=404</location>
> > </error-page>
> > [...]
> > (I'm not mapping *.jsp files in Sitemesh but the result is exactly the
> > same.)
> >
> > Now, issue #1.
> > When some exceptions are throw, the error page is decorated by Sitemesh
> > despite the fact that I've excluded it in the /decorators.xml/ file.
> >
> > Example:
> > If I try to call an action that doesn't exist, let's say /Home123.action
> > I get the following error:
> > ERROR [DefaultExceptionHandler] Could not locate an ActionBean that is
> > bound to the URL [/Home123.action]. Commons reasons for this include
> > mis-matched URLs and forgetting to implement ActionBean in your class.
> > Registered ActionBeans are: [...]
> > and the page is decorator by Sitemesh, but if I call /Home.action123 I'm
> > forwarded to the error page with a 404 error and the page isn't
> > (correctly) decorated by Sitemesh.
> >
> > A solution for this but a very ugly workaround is to do:
> > <c:choose>
> > <c:when test="${empty requestScope.__sitemesh__filterapplied}">
> > [...]
> > </c:when>
> > <c:otherwise>
> > [...]
> > </c:otherwise>
> > </c:choose>
> > Any suggestion?
> >
> > Ok, now issue #2.
> > Taking the example of the 404 error. The error description showed in the
> > error page is in the wrong Locale, probably because the request isn't
> > being filtered by Stripes filter.
> > Another very ugly solution for this is to make the error description
> > external and include it with <c:import>, note the
> > <dispatcher>INCLUDE</dispatcher> in the *.jsp mapping.
> >
> > Any clean solutions for this?
> >
> > Cheers
> >
> > --
> > Samuel Santos
> > http://samaxes.com/
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
--
Samuel Santos
http://samaxes.com/
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users