There's more...

Server Push will only work under SSL. In other words, if you are using GlassFish 5 and try to run this recipe, your URL should be something like this:

https://localhost:8181/ch04-serverpush

If you miss it, the code will still work, but using HTTP/1.0. means that when the code asks for newPushBuilder, it will return null (not available):

if (pb != null) {
...
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.158.36