ICEfaces
  1. ICEfaces
  2. ICE-4303

error-page directive not working with netbeans projects

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.8RC2
    • Fix Version/s: 1.8.2
    • Component/s: Tool Integrations
    • Labels:
      None
    • Environment:
      Netbeans 6.5.1

      Description

      the error-page directive in web.xml doesn't seem to work with Netbeans 6.5.1 and icefaces 1.8.RC2. I was expecting it to start to work after correction of ICE-4078.
      Here is the description of the problem. I have a simple project that throw an exception upon the pressure of a button. I would expect to be able to intercept the exception with the error page directive and decide on what page to land. Instead the browser goes to a standard http500 page.
      Reading the forums (http://www.icefaces.org/JForum/posts/list/5057.page,http://www.icefaces.org/JForum/posts/list/7986.page,http://www.icefaces.org/JForum/posts/list/7986.page) it seems that the JSF stack specification itself has some problem with the error-page directive given the JSF lifecycle. I admit I haven't understood exactly what is the problem. I've found example projects with icefaces but without netbeans. These projects need a redirect JSP page I'm not sure this technique is possible using netbeans. Anyway notice that with the woodstock faces stack this behaviour works.
      I'm attaching a non working project made with icefaces and a working one with woodstock.

        Issue Links

          Activity

          Hide
          Frank Ye added a comment -

          The Error should be resolved partly by,
          http://jira.icefaces.org/browse/ICE-4257, could you try with the trunk?

          Show
          Frank Ye added a comment - The Error should be resolved partly by, http://jira.icefaces.org/browse/ICE-4257 , could you try with the trunk?
          Hide
          Raffaele Spazzoli added a comment -

          I tried 1.8.0 and still doesn't work. I can't try directly from the source.
          thanks
          Raffaele

          Show
          Raffaele Spazzoli added a comment - I tried 1.8.0 and still doesn't work. I can't try directly from the source. thanks Raffaele
          Hide
          Frank Ye added a comment -

          Could try it with jsf1.2_12.

          Show
          Frank Ye added a comment - Could try it with jsf1.2_12.
          Hide
          Alberto Mozzone added a comment -

          I have the same problem too: ICEFaces does not redirect to the error page.
          This behavior occurs independently of the development environment, because I use Eclipse and the application is deployed in Apache Tomcat 5.5.
          We're already using JSF 1.2_12 (bundled with ICEFaces 1.8.0).

          I'm going to update to ICEFaces 1.8.1: maybe the problem is solved.

          Raffaele: did you find a solution or workaround?

          Thanks

          Show
          Alberto Mozzone added a comment - I have the same problem too: ICEFaces does not redirect to the error page. This behavior occurs independently of the development environment, because I use Eclipse and the application is deployed in Apache Tomcat 5.5. We're already using JSF 1.2_12 (bundled with ICEFaces 1.8.0). I'm going to update to ICEFaces 1.8.1: maybe the problem is solved. Raffaele: did you find a solution or workaround? Thanks
          Hide
          Alberto Mozzone added a comment -

          The problem is not solved in 1.8.1.
          Any workarounds ?
          None of those found in the pages of the forum works.

          Show
          Alberto Mozzone added a comment - The problem is not solved in 1.8.1. Any workarounds ? None of those found in the pages of the forum works.
          Hide
          Ted Goddard added a comment -

          The attached project WebApplication1.zip contains manual modifications to provide the correct version of wyswyg-appbase.jar with the ICEfaces-specific changes. This may be a plugin bug (perhaps re-assign to Liming).

          The attached WebApplication1.war was built via the above NetBeans project and shows the configured error page when deployed manually to Tomcat6. When deployed to GlassfishV2, however, the browser is incorrectly redirected to the server error page as reported. Since the customer does not indicate which server is required, the recommendation is to use Tomcat in this case.

          Show
          Ted Goddard added a comment - The attached project WebApplication1.zip contains manual modifications to provide the correct version of wyswyg-appbase.jar with the ICEfaces-specific changes. This may be a plugin bug (perhaps re-assign to Liming). The attached WebApplication1.war was built via the above NetBeans project and shows the configured error page when deployed manually to Tomcat6. When deployed to GlassfishV2, however, the browser is incorrectly redirected to the server error page as reported. Since the customer does not indicate which server is required, the recommendation is to use Tomcat in this case.
          Hide
          Ted Goddard added a comment -

          Please test on Tomcat 6 and report on your results.

          Show
          Ted Goddard added a comment - Please test on Tomcat 6 and report on your results.
          Hide
          Ken Fyten added a comment -

          Liming, please review and test Ted's suggested fix and determine if this is a plugin config. bug.

          Show
          Ken Fyten added a comment - Liming, please review and test Ted's suggested fix and determine if this is a plugin config. bug.
          Hide
          Liming Wu added a comment -

          Load project WebApplication1 from attachemenet #3 WebApplication1.zip

          Once project is loaded noticed broken library references:
          1. Broken reference wyswyg-appbase.jar
          2. missing library:jsf-1-2_09

          Remove these references by Project Properties -> Library
          Add Add Library -> JSF 1.2_12 RI_Run-Time (required on Tomcat)

          The error page is properly handled w/o problem.

          On GlassFish v2. it doesn't work. I thought it is related to Netbeans' rave viewhandler and lifecycleListener.

          I created same project without design time. I still can replicate this problem. I think this is an issue related to core on GlassFish v2.1

          Show
          Liming Wu added a comment - Load project WebApplication1 from attachemenet #3 WebApplication1.zip Once project is loaded noticed broken library references: 1. Broken reference wyswyg-appbase.jar 2. missing library:jsf-1-2_09 Remove these references by Project Properties -> Library Add Add Library -> JSF 1.2_12 RI_Run-Time (required on Tomcat) The error page is properly handled w/o problem. On GlassFish v2. it doesn't work. I thought it is related to Netbeans' rave viewhandler and lifecycleListener. I created same project without design time. I still can replicate this problem. I think this is an issue related to core on GlassFish v2.1
          Hide
          Liming Wu added a comment -

          Created plain ICEfaces project and Sun RI project on eclipse targeted to GF 2.1 with JSF v1.2_13.
          On SUN RI project, there is no problem with
          <error-page><error-code>500</error-code><location>/faces/errorPage.jsp</location>
          <!-- here errorPage.jsp is jsf page -->

          But on ICEfaces project,
          <error-page><error-code>500</error-code><location>/errorPage.iface</location>
          doesn't work

          Even though it doesn't work, I don't think it is a major issue as it is recommended to use static html page for error page (jsf error page may introduce its error as well)

          Show
          Liming Wu added a comment - Created plain ICEfaces project and Sun RI project on eclipse targeted to GF 2.1 with JSF v1.2_13. On SUN RI project, there is no problem with <error-page><error-code>500</error-code><location>/faces/errorPage.jsp</location> <!-- here errorPage.jsp is jsf page --> But on ICEfaces project, <error-page><error-code>500</error-code><location>/errorPage.iface</location> doesn't work Even though it doesn't work, I don't think it is a major issue as it is recommended to use static html page for error page (jsf error page may introduce its error as well)
          Hide
          Ken Fyten added a comment -

          The issue is caused by using older JSF 1.2 runtime libs on Glassfish 2.1 server. Upgrading the JSF version to 1.2_12+ should resolve.

          Show
          Ken Fyten added a comment - The issue is caused by using older JSF 1.2 runtime libs on Glassfish 2.1 server. Upgrading the JSF version to 1.2_12+ should resolve.

            People

            • Assignee:
              Unassigned
              Reporter:
              Raffaele Spazzoli
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: