Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1-EDR
    • Fix Version/s: 2.1
    • Component/s: OTHER
    • Labels:
      None
    • Environment:

      Operating System: ALL
      Platform: ALL

    • Issuezilla Id:
      162

      Description

      >>>>> On Mon, 10 Apr 2006 22:54:11 -0500, Stan Silvert <stan.silvert@JBOSS.COM>
      said:

      SS> OK, I hope this is just because my head is still spinning from today's
      SS> RedHat events. But it looks like JSF 1.2 is incompatible with Portlet
      SS> 1.0.

      SS> The problem is with the "Faces ELResolver for JSP". To register this
      SS> resolver, I have to call JspFactory.getJspApplicationContext() and pass
      SS> in the ServletContext. The problem with that is that portlets don't
      SS> have access to the ServletContext. They have the PortletContext
      SS> instead. PortletContext provides most of the same methods, but it
      SS> doesn't implement ServletContext.

      Well, strictly speaking this problem is that JSP 2.1 is not compatible
      with Portlet 1.0.

      This could be fixed in the JSF-Portlet integration library by having a
      ServletContext be declared in the jsf-portlet.tld.

      This listener could either install the ELResolver directly, or it could
      save away the ServletContext for later use when installing the
      ELResolver.

      In any case, I have filed a bug on JSP 2.1:

      Ed

        Activity

        Hide
        jluehe added a comment -

        The javadocs of javax.portlet.PortletContext have this:

        There is one context per "portlet application" per Java Virtual
        Machine. (A "portlet application" is a collection of portlets,
        servlets, and content installed under a specific subset of the server
        URL namespace, such as /catalog. They are possibly installed via a
        .war file.) **As a web application, a portlet application also has a
        servlet context. The portlet context leverages most of its
        functionality from the servlet context of the portlet application.**

        Is there any way an encapsulated servlet context could be exposed by its
        portlet context wrapper?

        Show
        jluehe added a comment - The javadocs of javax.portlet.PortletContext have this: There is one context per "portlet application" per Java Virtual Machine. (A "portlet application" is a collection of portlets, servlets, and content installed under a specific subset of the server URL namespace, such as /catalog. They are possibly installed via a .war file.) **As a web application, a portlet application also has a servlet context. The portlet context leverages most of its functionality from the servlet context of the portlet application.** Is there any way an encapsulated servlet context could be exposed by its portlet context wrapper?
        Hide
        Ed Burns added a comment -

        >>>>> On Sat, 15 Apr 2006 08:17:12 -0500, Stan Silvert <stan.silvert@JBOSS.COM>
        said:

        EB> Well, strictly speaking this problem is that JSP 2.1 is not compatible
        EB> with Portlet 1.0.

        SS> I agree that it needs to be fixed in JSP. But JSP 2.1 doesn't claim
        SS> compatibility with Portlet 1.0. JSF 1.2 does.

        EB>
        EB> This could be fixed in the JSF-Portlet integration library by having a
        EB> ServletContext be declared in the jsf-portlet.tld.
        EB>
        EB> This listener could either install the ELResolver directly, or it
        SS> could
        EB> save away the ServletContext for later use when installing the
        EB> ELResolver.

        SS> Check with the Portlet team. I don't think we can rely on that.
        SS> Correct me if I am wrong, but portlet containers don't technically have
        SS> to be implemented in terms of servlets. What's more, a ServletContext
        SS> listener might not be instantiated in the correct context. It really
        SS> needs to be implemented in terms of the PortletContext.

        Show
        Ed Burns added a comment - >>>>> On Sat, 15 Apr 2006 08:17:12 -0500, Stan Silvert <stan.silvert@JBOSS.COM> said: EB> Well, strictly speaking this problem is that JSP 2.1 is not compatible EB> with Portlet 1.0. SS> I agree that it needs to be fixed in JSP. But JSP 2.1 doesn't claim SS> compatibility with Portlet 1.0. JSF 1.2 does. EB> EB> This could be fixed in the JSF-Portlet integration library by having a EB> ServletContext be declared in the jsf-portlet.tld. EB> EB> This listener could either install the ELResolver directly, or it SS> could EB> save away the ServletContext for later use when installing the EB> ELResolver. SS> Check with the Portlet team. I don't think we can rely on that. SS> Correct me if I am wrong, but portlet containers don't technically have SS> to be implemented in terms of servlets. What's more, a ServletContext SS> listener might not be instantiated in the correct context. It really SS> needs to be implemented in terms of the PortletContext.
        Hide
        kchung added a comment -

        From JSP point of view, the ServletContext argument in
        JspFactory.getJspApplicationContext() is used only as a key for creeating or
        retrieving a JspApplicationContext, and as such, it can be any Object instance.
        The only remainding issue is in the method addELResolver. The Javadocs for it says
        "It is illegal to register an ELResolver after the application has received
        any request from the client. If an attempt is made to register an ELResolver
        after that time, an IllegalStateException is thrown."

        No sure if this implies the need for a ServletContext.

        Show
        kchung added a comment - From JSP point of view, the ServletContext argument in JspFactory.getJspApplicationContext() is used only as a key for creeating or retrieving a JspApplicationContext, and as such, it can be any Object instance. The only remainding issue is in the method addELResolver. The Javadocs for it says "It is illegal to register an ELResolver after the application has received any request from the client. If an attempt is made to register an ELResolver after that time, an IllegalStateException is thrown." No sure if this implies the need for a ServletContext.
        Hide
        jluehe added a comment -

        I don't think the requirement for throwing an IllegalStateException requires a
        ServletContext.

        Right now, the impl saves an attribute with name "jspx.1st.request" and value
        "true" in the ServletContext upon receiving the first request, and checks for
        the presence of this context attribute before adding any ELResolvers, but this
        information does not necessarily need to be stored as an attribute in a
        ServletContext.

        Show
        jluehe added a comment - I don't think the requirement for throwing an IllegalStateException requires a ServletContext. Right now, the impl saves an attribute with name "jspx.1st.request" and value "true" in the ServletContext upon receiving the first request, and checks for the presence of this context attribute before adding any ELResolvers, but this information does not necessarily need to be stored as an attribute in a ServletContext.
        Hide
        jluehe added a comment -

        -> Kin-Man

        Show
        jluehe added a comment - -> Kin-Man

          People

          • Assignee:
            kchung
            Reporter:
            Ed Burns
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: