myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Andraschko (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Comment Edited] (MYFACES-4141) JSF 2.3 Spec Issue 1436 - MyFaces Implementation requires Server Push functionality
Date Sun, 10 Dec 2017 13:15:08 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-4141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16285235#comment-16285235
] 

Thomas Andraschko edited comment on MYFACES-4141 at 12/10/17 1:14 PM:
----------------------------------------------------------------------

ok, i understand it now but we have 2 different topics here:

1) Detect new resources in ajax requests and render them via "javax.faces.Resource"
    Thats the topic Leo and i were talking about - this is already implemented and fine

2) use servlet 4.0 push to notify the client async about resources, which will be required
AFTER the html was received by the browser.
    Thats a http2 feature to load resources even before rendering the view finished



    This feature is not implemented now but its actually quite easy to implement:
    1) upgrade to servlet4
    2) detect servlet4 runtime onthefly - MF 2.3 should still work fine on servlet3, just
this feature shouldn't be available
    3) if we are running on servlet4, get a pushbuilder and push each resource url via:
       request.getPushBuilder().path("myresourceurl.js").push();

The only question is: whats the best place to add this code?




was (Author: tandraschko):
ok, i understand it now but we have 2 different topics here:

1) Detect new resources in ajax requests and render them via "javax.faces.Resource"
    Thats the topic Leo and i were talking about - this is already implemented and fine

2) use servlet 4.0 push to notify the client async about resources, which will be required
AFTER the html was received by the browser.
    Thats a http2 feature to load resources even before rendering the view finished
    This feature is not implemented now but its actually quite easy to implement:
    1) upgrade to servlet4
    2) detect servlet4 runtime onthefly - MF 2.3 should still work fine on servlet3, just
this feature shouldn't be available
    3) if we are running on servlet4, get a pushbuilder and push each resource url via:
       request.getPushBuilder().path("myresourceurl.js").push();

The only question is: whats the best place to add this code?



> JSF 2.3 Spec Issue 1436 - MyFaces Implementation requires Server Push functionality
> -----------------------------------------------------------------------------------
>
>                 Key: MYFACES-4141
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4141
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-372
>    Affects Versions: 2.3.0-beta
>            Reporter: Paul Nicolucci
>
> The following spec issue does not look to be implemented in the MyFaces 2.3.0-beta: https://github.com/javaee/javaserverfaces-spec/issues/1436
> The following text was added to the JSF 2.3 specification section 2.2.6 "Render Response":
> If running on a container that supports Servlet 4.0 or later, after any dynamic component
manipulations have been
> completed, any resources that have been added to the UIViewRoot, such as scripts, images,
or stylesheets, and any
> inline images, must be pushed to the client using the Servlet Server Push API. All of
the pushes must be started
> before any of the HTML of the response is rendered to the client.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message