Ecommerce Error Page Bug?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Ecommerce Error Page Bug?

samhamilton
Hi, 

I would like a second opinion on what I think is a bug but not 100% sure. 

If you are using the ecommerce app and you force it to generate a 404 error page it defaults to the tomcat error page rather than using what I think it should be using - /error/error.jsp? 


Thanks
Sam

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ecommerce Error Page Bug?

Bilgin Ibryam-2
Hi Sam,

On Fri, Aug 26, 2011 at 7:21 AM, Sam Hamilton <[hidden email]> wrote:
> Hi,
> I would like a second opinion on what I think is a bug but not 100% sure.

I think it is a bug or actually a not yet implemented feature :)

> If you are using the ecommerce app and you force it to generate a 404 error
> page it defaults to the tomcat error page rather than using what I think it
> should be using - /error/error.jsp?
> You can test the 404 error out here
> - http://demo-trunk.ofbiz.apache.org/ecommerce/error/ and what I think is
> the expected error page code is

looking at the url , it doesn't contain /control/ and it is not
handled by any request handler.
If you need to return custom error page you have to do it tomcat way, by adding

 <error-page>
    <error-code>404</error-code>
    <location>/error/error.jsp</location>
  </error-page>

to web.xml

Cheers,
Bilgin

> here https://github.com/apache/ofbiz/blob/trunk/specialpurpose/ecommerce/webapp/ecommerce/error/error.jsp
> Thanks
> Sam
Reply | Threaded
Open this post in threaded view
|

Re: Ecommerce Error Page Bug?

samhamilton
Many thanks Bilgin - this now leads me to believe that there is a bug in the error handling code as the code you suggested also does not wok. 

Thanks
Sam 


On 1 Sep 2011, at 17:52, Bilgin Ibryam wrote:

Hi Sam,

On Fri, Aug 26, 2011 at 7:21 AM, Sam Hamilton <[hidden email]> wrote:
Hi,
I would like a second opinion on what I think is a bug but not 100% sure.

I think it is a bug or actually a not yet implemented feature :)

If you are using the ecommerce app and you force it to generate a 404 error
page it defaults to the tomcat error page rather than using what I think it
should be using - /error/error.jsp?
You can test the 404 error out here
http://demo-trunk.ofbiz.apache.org/ecommerce/error/ and what I think is
the expected error page code is

looking at the url , it doesn't contain /control/ and it is not
handled by any request handler.
If you need to return custom error page you have to do it tomcat way, by adding

<error-page>
   <error-code>404</error-code>
   <location>/error/error.jsp</location>
 </error-page>

to web.xml

Cheers,
Bilgin

here https://github.com/apache/ofbiz/blob/trunk/specialpurpose/ecommerce/webapp/ecommerce/error/error.jsp
Thanks
Sam


smime.p7s (6K) Download Attachment