ICEfaces
  1. ICEfaces
  2. ICE-3753

connectionLostRedirectURI and sessionExpiredRedirectURI redirection doesn't include the AppContext if the URI starts with '/'

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      Just-ice with facelets

      Description

      When the URI specified for the redirection event starts with '/' the AppContext is not beign prepended to the url, making the redirection url relative to the application server and not to the application it self.
      Example:
      connectionLostRedirectURI = '/login.iface'
      Current url when the event fires: http://server/AppContext/path1/path2/index.iface
      Redirected url: http://server/login.iface

      The redirected url should be: http://server/AppContext/login.iface

      To solve this problem I have made some changes to the file status.js to correctly prepend the AppContext if the url given starts with a '/'. You can find this file and the icefaces-d2d.js with this change included(generated by the ant build of the bridge subproject) in forum thread http://www.icefaces.org/JForum/posts/list/0/10297.page

      Those changes where made over the source release 1.7.2 available to download from the home site.

        Activity

        Hide
        Simon Paredes added a comment -

        Hi guys,

        Are you planning to put this in, in some future release? Because this fix is really usefull for those who need to use redirect, instead of forward, to a subpath url. Without this fix, the functionality given by connectionLost and sessionRedirect is useless.

        Please, comment on this.
        Thanks.
        InJeNiErO

        Show
        Simon Paredes added a comment - Hi guys, Are you planning to put this in, in some future release? Because this fix is really usefull for those who need to use redirect, instead of forward, to a subpath url. Without this fix, the functionality given by connectionLost and sessionRedirect is useless. Please, comment on this. Thanks. InJeNiErO
        Hide
        Mircea Toma added a comment -

        Resolve configured absolute paths in the realm of the web application.

        Show
        Mircea Toma added a comment - Resolve configured absolute paths in the realm of the web application.
        Hide
        Simon Paredes added a comment -

        Hi,

        What do you mean with this:
        "Resolve configured absolute paths in the realm of the web application"

        If this means something like this:

        <web-app>
        <context-param>
        <param-name>com.icesoft.faces.sessionExpiredRedirectURI</param-name>
        <param-value>'/AppContext/login.jspx'</param-value>
        </context-param>
        </web-app>

        Then you are not considering that the other parameters that are being configured here are relative to the "server/AppContext" path. Example:

        <filter-mapping>
        <filter-name>sessionExpiredFilter</filter-name>
        <url-pattern>/faces/*</url-pattern>
        </filter-mapping>

        <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>

        Why not doing things simple to the end-user by appending the AppContext if the url start with "/"?, just like the rest of the configuration does?

        Show
        Simon Paredes added a comment - Hi, What do you mean with this: "Resolve configured absolute paths in the realm of the web application" If this means something like this: <web-app> <context-param> <param-name>com.icesoft.faces.sessionExpiredRedirectURI</param-name> <param-value>'/AppContext/login.jspx'</param-value> </context-param> </web-app> Then you are not considering that the other parameters that are being configured here are relative to the "server/AppContext" path. Example: <filter-mapping> <filter-name>sessionExpiredFilter</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> Why not doing things simple to the end-user by appending the AppContext if the url start with "/"?, just like the rest of the configuration does?
        Hide
        Deryk Sinotte added a comment -

        That's what has been done. The DOMResponseWriter, which is responsible for determining and writing out the dynamic parts of the JavaScript bridge, has been changed to use the ViewHandler.getResourceURL when calculating the location of the resource, taking the context into consideration and pre-pending it as necessary.

        Show
        Deryk Sinotte added a comment - That's what has been done. The DOMResponseWriter, which is responsible for determining and writing out the dynamic parts of the JavaScript bridge, has been changed to use the ViewHandler.getResourceURL when calculating the location of the resource, taking the context into consideration and pre-pending it as necessary.
        Hide
        Simon Paredes added a comment -

        Hi,

        Thanks for you quick answer.

        That's a good news!!, I think, it wasn't clear that the problem was solved from the previous message.

        In which version will be applied?.

        Thank you.

        Show
        Simon Paredes added a comment - Hi, Thanks for you quick answer. That's a good news!!, I think, it wasn't clear that the problem was solved from the previous message. In which version will be applied?. Thank you.
        Hide
        Deryk Sinotte added a comment -

        It should be coming out in 1.8.2 which is currently scheduled for early September (I've updated the case to reflect this). It's been applied to the trunk so it's available from the public repository so you can always check it out yourself, build it, and confirm that it fixes your issue. Might be worthwhile so that we can make adjustments before 1.8.2 if necessary.

        Show
        Deryk Sinotte added a comment - It should be coming out in 1.8.2 which is currently scheduled for early September (I've updated the case to reflect this). It's been applied to the trunk so it's available from the public repository so you can always check it out yourself, build it, and confirm that it fixes your issue. Might be worthwhile so that we can make adjustments before 1.8.2 if necessary.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Simon Paredes
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: