This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 125012 - <error-page> in web.xml doesn't work with visualwebjsf
Summary: <error-page> in web.xml doesn't work with visualwebjsf
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ potingwu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-10 08:27 UTC by ludopaquet
Modified: 2009-11-02 11:17 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test.jsp (706 bytes, text/plain)
2008-01-10 08:28 UTC, ludopaquet
Details
Log file when the redirect process fails (4.20 KB, text/plain)
2008-01-12 09:48 UTC, ludopaquet
Details
Log file when the redirect process succeeds (without appbase.jar) (4.22 KB, text/plain)
2008-01-12 09:49 UTC, ludopaquet
Details
Attaching a Test Project that depicts the JSF issue with out any Visual Web artifacts (135.10 KB, application/octet-stream)
2008-02-25 23:04 UTC, Winston Prakash
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ludopaquet 2008-01-10 08:27:29 UTC
This jsp  doesn't redirect to the servlet ExceptionHandler (it redirects to the tomcat default page 500). You need to
remove appbase.jar and all jsf lines in web.xml to succeed.

Test.jsp contains :
<%
        try
                {
        String s=null;
        s.length();
        }
        catch(Exception e)
                {
           e.printStackTrace();
            throw new javax.faces.FacesException(e); 
        }
        %>
Comment 1 ludopaquet 2008-01-10 08:28:10 UTC
Created attachment 54901 [details]
Test.jsp
Comment 2 _ potingwu 2008-01-10 17:29:52 UTC
I don't know exactly how the error page redirect works. Winston is the one worked on this tack.

Winston, could you please look into it?

BTW, I don't think this is a P1, not a showstopper!

Comment 3 ludopaquet 2008-01-11 08:29:12 UTC
I mark it as P1 because I cannot release a real web application without a custom error page !
Comment 4 Winston Prakash 2008-01-11 15:55:39 UTC
Do you have your own custom error handler or still depend on com.sun.errorhandler.ExceptionHandler.
If so somehow I noticed that ErrorHandler library was not added to the project. You need to manually
add via project library nodes.
Comment 5 ludopaquet 2008-01-11 16:00:27 UTC
errorhandler.jar is added to my project. Even with a simple jsp error page it doesn't work.
Comment 6 Winston Prakash 2008-01-12 03:05:24 UTC
Could you please attach the complete log in your server log
Comment 7 ludopaquet 2008-01-12 09:48:26 UTC
Created attachment 54990 [details]
Log file when the redirect process fails
Comment 8 ludopaquet 2008-01-12 09:49:14 UTC
Created attachment 54991 [details]
Log file when the redirect process succeeds (without appbase.jar)
Comment 9 Winston Prakash 2008-01-12 15:54:39 UTC
Thanks for the attachments. I will look at it further
Comment 10 Jayashri Visvanathan 2008-01-13 18:26:10 UTC
Per the bug priority guidelines, I don't think this qualifies as a P1. Winston, if you agree, please downgrade to P2.
thanks
Comment 11 Winston Prakash 2008-01-14 03:04:19 UTC
I agree. It does not qualify as P1. Downgrading to P2.
I'm continue looking at the problem though.
Comment 12 Winston Prakash 2008-01-18 01:29:09 UTC
This seems like a JSF 1.2 issue.

I did some experiment.

If I have any jar with faces-config.xml then redirecting to error page it fails

If I remove the FacesSerlet from web.xml (even with jar with faces-config.xml ex. appbase)
it succeeds.

I'll work with Ryan Lubke (JSF RI eng) to find out, if this is a issue wit JSF 1.2
Comment 13 ludopaquet 2008-01-18 08:01:01 UTC
I noticed that it is also a bug of JSF 1.1 with netbeans 6.
Comment 14 Winston Prakash 2008-02-05 16:00:52 UTC
I'm still investigating the problem. Meanwhile here is a work around

Add the following to your web.xml

    <error-page>
        <error-code>500</error-code>
        <location>/error/ExceptionHandler</location>
    </error-page>
Comment 15 Winston Prakash 2008-02-25 23:03:11 UTC
I've filed a bug against JSF

https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=703

Comment 16 Winston Prakash 2008-02-25 23:04:52 UTC
Created attachment 57231 [details]
Attaching a Test Project that depicts the JSF issue with out any Visual Web artifacts
Comment 17 Mark Dey 2008-03-27 23:14:48 UTC
Workaround is available and issue seems to be with JSF. Lowering to P3 for the NetBeans release until new information indicates otherwise.
Comment 18 Peter Zavadsky 2008-09-17 22:35:39 UTC
As per the comment (the test attached without visualweb artifacts), this is not a visualweb issue. Passing to web.
Comment 19 _ potingwu 2008-09-18 00:02:35 UTC
It's a web/jsf placeholder issue and is depending on,
    https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=703
Comment 20 _ potingwu 2008-11-20 23:32:59 UTC
.
Comment 21 Quality Engineering 2009-11-02 11:17:11 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX