You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by matihost <ma...@o2.pl> on 2007/11/07 23:15:36 UTC

Re: Exception when tying to display a 404 error page.

> This error page is defined in my web.xml:
> 
> <error-page>
>    <error-code>404</error-code>
>    <location>/pages/errors/page404.jsp</location>
> </error-page>

You are using Tomcat web container. There is one issue regarding <form-login-page> element, but i assume there are the same reason for any url used in web.xml.

https://issues.apache.org/struts/browse/WW-2025

In other words you cannot use s2 action as entry point for it, and you cannot use jsp or anything else which contains s2 tags which use OGNL stack. You cannot use anything from s2 !!

What is worse, if you are using newest tomcat and JSP2.1 you cannot use also JSP EL because EL and OGNL use the same syntax.(#)

In other words, for pages used in web.xml the best solution i know is to use old "good one" servlets and jsp with scriptlets... It is hard to say if it is an error of struts 2. I would say it is very "sad" and unsuspected  result of s2 architecture.

-- 
Mateusz Nowakowski



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Exception when tying to display a 404 error page.

Posted by Josh Vickery <jo...@vickeryj.com>.
Why not redirect to the struts 2 action you want?

This is the jsp I use for error pages in tomcat:

<%response.sendRedirect("error.do");%>

where error.do points to a struts 2 action

Josh


On Nov 7, 2007 5:15 PM, matihost <ma...@o2.pl> wrote:
> > This error page is defined in my web.xml:
> >
> > <error-page>
> >    <error-code>404</error-code>
> >    <location>/pages/errors/page404.jsp</location>
> > </error-page>
>
> You are using Tomcat web container. There is one issue regarding <form-login-page> element, but i assume there are the same reason for any url used in web.xml.
>
> https://issues.apache.org/struts/browse/WW-2025
>
> In other words you cannot use s2 action as entry point for it, and you cannot use jsp or anything else which contains s2 tags which use OGNL stack. You cannot use anything from s2 !!
>
> What is worse, if you are using newest tomcat and JSP2.1 you cannot use also JSP EL because EL and OGNL use the same syntax.(#)
>
> In other words, for pages used in web.xml the best solution i know is to use old "good one" servlets and jsp with scriptlets... It is hard to say if it is an error of struts 2. I would say it is very "sad" and unsuspected  result of s2 architecture.
>
> --
> Mateusz Nowakowski
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org