ICEfaces
  1. ICEfaces
  2. ICE-694

"jsp:directive.include" under sub folders

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6DR#6, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC

      Description

      When put pages under some sub-folder, the <jsp:directive.include /> can not
      find file properly, unless the file attribute indicates a location from root.

      Also, in this case, we have to add another servlet mapping like:
          <servlet-mapping>
              <servlet-name>Persistent Faces Servlet</servlet-name>
              <url-pattern>/test/xmlhttp/*</url-pattern>
          </servlet-mapping>
      to make default css image/style gets loaded.

        Activity

        Hide
        Ken Fyten added a comment -

        Target v1.1.

        Show
        Ken Fyten added a comment - Target v1.1.
        Hide
        Ted Goddard added a comment -

        Assigning to Ken to assign to QA to create a simple test case.

        Show
        Ted Goddard added a comment - Assigning to Ken to assign to QA to create a simple test case.
        Hide
        Ken Fyten added a comment -

        Mandeep, please create a simple test case for this and test using ICEfaces 1.5.3, and also 1.6 DR#3.

        Show
        Ken Fyten added a comment - Mandeep, please create a simple test case for this and test using ICEfaces 1.5.3, and also 1.6 DR#3.
        Hide
        Mandeep Hayher added a comment -

        Problem continues to exist on ICEFaces 1.5.3 & 1.6 DR#3.
        The files of interest have following location in "ice1.6-jira694" application:

        ice1.6-jira694\web\index.jsp
        ice1.6-jira694\web\sub1\sub2\welcome.jspx
        ice1.6-jira694\web\sub1\sub2\sub3\sub4\welcomepage.jspx

        index.jsp forwards to welcome.jspx
        welcome.jspx includes welcomepage.jspx

        Please find the source code and war file in attachment.

        Show
        Mandeep Hayher added a comment - Problem continues to exist on ICEFaces 1.5.3 & 1.6 DR#3. The files of interest have following location in "ice1.6-jira694" application: ice1.6-jira694\web\index.jsp ice1.6-jira694\web\sub1\sub2\welcome.jspx ice1.6-jira694\web\sub1\sub2\sub3\sub4\welcomepage.jspx index.jsp forwards to welcome.jspx welcome.jspx includes welcomepage.jspx Please find the source code and war file in attachment.
        Hide
        Ted Goddard added a comment -

        If the file is a relative path

        <jsp:directive.include file="sub3/sub4/welcomepage.jspx"/>

        JspPageToDocument will prepend the RequestServletPath. Initial testing shows that this allows the page to be parsed, but ICEfaces resources are not correctly loaded;

        <script language="javascript" src="../../xmlhttp/1180481388195/ice-extras.js"></script>

        is resolving to

        http://localhost:8080/xmlhttp/1180481388195/ice-extras.js

        Show
        Ted Goddard added a comment - If the file is a relative path <jsp:directive.include file="sub3/sub4/welcomepage.jspx"/> JspPageToDocument will prepend the RequestServletPath. Initial testing shows that this allows the page to be parsed, but ICEfaces resources are not correctly loaded; <script language="javascript" src="../../xmlhttp/1180481388195/ice-extras.js"></script> is resolving to http://localhost:8080/xmlhttp/1180481388195/ice-extras.js
        Hide
        Ted Goddard added a comment -

        Marking this bug as resolved; the JSP inclusion processing has been fixed and tested.

        However, the specific test case with this bug makes use of jsp:forward to a page in a subfolder:

        <jsp:forward page="/sub1/sub2/welcome.iface"/>

        This hides the actual path from ICEfaces, causing problems with resource resolving. ICEfaces thinks the path to the page is

        /webapp//sub1/sub2/welcome.iface

        but the browser sees only /webapp/, hence the relative URL

        ../../xmlhttp/1180565170608/icefaces-d2d.js

        does not resolve correctly.

        If the test case is invoked with

        http://localhost:8080/ice1.6_jira_694/sub1/sub2/welcome.iface

        however, it now works correctly.

        A separate JIRA will be created for the forwarding issue.

        Show
        Ted Goddard added a comment - Marking this bug as resolved; the JSP inclusion processing has been fixed and tested. However, the specific test case with this bug makes use of jsp:forward to a page in a subfolder: <jsp:forward page="/sub1/sub2/welcome.iface"/> This hides the actual path from ICEfaces, causing problems with resource resolving. ICEfaces thinks the path to the page is /webapp//sub1/sub2/welcome.iface but the browser sees only /webapp/, hence the relative URL ../../xmlhttp/1180565170608/icefaces-d2d.js does not resolve correctly. If the test case is invoked with http://localhost:8080/ice1.6_jira_694/sub1/sub2/welcome.iface however, it now works correctly. A separate JIRA will be created for the forwarding issue.
        Hide
        Ted Goddard added a comment -

        Issue need not be marked private.

        Show
        Ted Goddard added a comment - Issue need not be marked private.

          People

          • Assignee:
            Unassigned
            Reporter:
            Lon Hu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: