SlideShare una empresa de Scribd logo
1 de 42
Descargar para leer sin conexión
1   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Servlet 3.1
John Clingan, Principal Product Manager
 2   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
The following is intended to outline our general product direction.
      It is intended for information purposes only, and may not be
      incorporated into any contract. It is not a commitment to deliver
      any material, code, or functionality, and should not be relied upon
      in making purchasing decisions. The development, release, and
      timing of any features or functionality described for Oracle s
      products remains at the sole discretion of Oracle.




3   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Agenda

    •  Servlet 3.0 recap
    •  Servlet 3.1 Overview
    •  NIO API
    •  Protocol Upgrade
    •  Security
    •  Resources



4   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Servlet 3.0 recap
    •  Part of Java EE 6
    •  Focused on
          –  Ease-of-Development
          –  Pluggability
          –  Asynchronous support
          –  Dynamic registration of servlets, filters and listeners
          –  Security enhancements
    •  Adoption
          –  GlassFish 3.x, Tomcat 7, JBOSS, Caucho, IBM, Weblogic


5   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Servlet 3.0 recap
    Ease of Development
    •  Annotations to declare
          –  Servlets
          –  Filters
          –  Listeners
          –  Security
    •  Defaults for attributes of annotations




6   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example
    @WebServlet( urlPatterns = {“/foo”} )
    public class SimpleSample extends HttpServlet {

               public void doGet(HttpServletRequest req,
                                 HttpServletResponse res) {

               }
    }


7       Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Servlet 3.0 recap
    Pluggability
    •  Drag-and-drop model
    •  Web frameworks as fully configured libraries
    •  Contain “fragments” of web.xml
    •  META-INF/web-fragment.xml
    •  Extensions can register servlets, filters, listeners
       dynamically
    •  Extensions can also discover and process annotated
       classes
8   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Servlet 3.0 recap
    Using pluggability
    •  Bundle static resources and jsps in a jar that can be re-
       used
    •  Look for ready-to-use frameworks, libraries
    •  Re-factor your libraries into re-usable, auto-configured
       frameworks




9   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Agenda

     •  Servlet 3.0 recap
     •  Servlet 3.1 Overview
     •  NIO API
     •  Protocol Upgrade
     •  Security
     •  Resources



10   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
The content described in the following slides are subject to change
based on expert group discussions




11   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAVA EE 7 THEME: CLOUD / PAAS




Java EE 7 platform to be ready for the cloud




12   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Java EE 7 PaaS support

     •  Provide customers and users ability to leverage cloud
        environments
     •  Enable multi-tenancy
           –  One application instance per tenant
           –  Mapping to tenant done by container
           –  Isolation between applications
     •  Define metadata for services


13   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Servlet 3.1
     Feature set
     •  Align with Java EE 7 for cloud support
           –  For web container there will a virtual server mapping per tenant
           –  Ability to load custom web resources per tenant
           –  Use the services exposed in Java EE 7
     •  Scale
           –  Expose NIO2 API
     •  Support newer technologies that leverage http protocol for the
        initial handshake
           –  Support general upgrade mechanism for protocols like WebSocket
     •  Security enhancements

14   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Agenda

     •  Servlet 3.0 recap
     •  Servlet 3.1 Overview
     •  NIO API
     •  Protocol Upgrade
     •  Security
     •  Resources



15   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     Overview: NonBlocking IO
     •  Add two listeners: ReadListener, WriteListener
     •  Add two interfaces:
           –  AsyncIOInputSource with abstract classes ServletInputStream,
              ServletReader
           –  AsyncIOOutputSink with abstract classes ServletOutputStream,
              ServletWriter
     •  Add APIs to ServletRequest, ServletResponse



16   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     javax.servlet.ReadListener
     public interface ReadListener extends EventListener {

                  public void onDataAvailable(ServletRequest request);

                  public void onAllDataRead(ServletRequest request);

                  public void onError(Throwable t);
         }




17   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     javax.servlet.WriteListener
     public interface WriteListener extends EventListener {

                  public void onWritePossible(ServletResponse response);

                  public void onError(Throwable t);
         }




18   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     javax.servlet.AsyncIOInputSource
     public interface AsyncIOInputSource {

                  public int dataAvailable();

                  public boolean isFinished();

                  public isReady();
         }




19   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     ServletInputStream, ServletReader


                     InputStream                                                                   Reader




           ServletInputStream                                               AsyncIOInputSource   ServletReader




20   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     javax.servlet.AsyncIOOutputSink
     public interface AsyncIOOutputSink {

                  public boolean canWrite(int size);

                  public void complete();
         }




21   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     NIOOutputStream, NIOWriter


                  OutputStream                                                                     Writer




     ServletOutputStream                                                    AsyncIOOutputSink   ServletWriter




22   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     ServletRequest, ServletResponse
     •  ServletRequest
           –  Public ServletInputStream getServletInputStream()
           –  Public ServletReader getServletReader()
           –  public void addListener(ReadListener listener)
     •  ServletResponse
           –  Public ServletOutputStream getServletOutputStream()
           –  Public ServletWriter getServletWriter()
           –  public addListener(WriteListener listener)


23   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     Sample Usage
     public class NIOSampleServlet extends HttpServlet
          protected void doGet(HttpServletRequest request, HttpServletResponse response)
       {
             request.addListener(new ReadListener() {
                public void onDataAvailable(ServletRequest request) {
                  ServletInputStream nis = request.getServletInputStream();
                  try {
                       nis.read(new byte[nis.dataAvailable()]);
                       …
               }




24   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     Sample Usage (cont’d)

                              public void onAllDataRead(ServletRequest request) {
                                try {
                                   request.getServletInputStream().close();
                                   ….
                              }

                              public void onError(Throwable t) { … }
                       });

                final byte[] b = new byte[100];
                ….



25   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API
     Sample Usage (cont’d 2)
     •               response.addListener(new WriteListener() {
                         public void onWritePossible(ServletResponse response) {
                           AsyncIOOutputStream nos = response.getAsyncIOOutputStream();
                           try {
                                                 nos.write(b);
                                                 nos.complete();
                                                 …
                               }

                               public void onError(Throwable t) { … }
                        });
                 }
          }

26    Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Expose NIO API

     •  Discussion with expert group on alternate approach
     •  Use NIO 2 approach




27   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Program Agenda

     •  Servlet 3.0 recap
     •  Servlet 3.1 Overview
     •  NIO API
     •  Protocol Upgrade
     •  Security
     •  Resources



28   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Upgrade

 •  HTTP 1.1
 •  Connection
 •  Transition to some other, incompatible protocol
 •  For example,
    Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9




29   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Upgrade
     Example: WebSocket
 •  Protocol: IETF
 •  API: W3C (JavaScript)
 •  Bi-directional, full-duplex / TCP




30   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Upgrade
WebSocket Example
•  GET /chat HTTP/1.1            •  HTTP/1.1 101 Switching Protocols
   Host: server.example.com         Upgrade: websocket
   Upgrade: websocket               Connection: Upgrade
   Connection: Upgrade              Sec-WebSocket-Accept:
   Sec-WebSocket-Key:               s3pPLMBiTxaQ9kYGzzhZRbK
   dGhlIHNhbXBsZSBub25jZQ==         +xOo=
   Origin: http://example.com       Sec-WebSocket-Protocol: chat
   Sec-WebSocket-Protocol: chat,
   superchat
   Sec-WebSocket-Version: 13

 31   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Upgrade


     HTTP Request

                                                                            Servlet


                                                                                ….
                                                                                upgrade(…);   ProtocolHandler




32   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Agenda

     •  Servlet 3.0 recap
     •  Servlet 3.1 Overview
     •  NIO API
     •  Protocol Upgrade
     •  Security
     •  Resources



33   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Security Enhancement

     •  Made good progress in Servlet 3.0
     •  Continue from where we left off
     •  Include support for preventing against CSRF
     •  Provide an easy way to support denying all unlisted http
        methods
     •  Encoding / escaping support to prevent XSS



34   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Align with other Java EE JSRs

     •  Integrate with Concurrency Utilities for Java EE
           –  Utilize it Async programming model
     •  Align with CDI
     •  Align with Bean Validation
     •  Align with Jcache (JSR 107)




35   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Transparency
     •  High level of transparency for all Java EE JSRs
     •  Use java.net project to run our JSRs in the open
        –  One java.net project per specification
     •  Publicly viewable Expert Group mailing list archive
     •  Users observer list gets copies of all emails to the EG
     •  Download area
     •  JIRA for issue tracking
     •  Wiki and source repository at EG’s discretion
     •  JCP.org private mailing list for administrative / confidential info


36   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Agenda

     •  Servlet 3.0 recap
     •  Servlet 3.1 Overview
     •  NIO API
     •  Protocol Upgrade
     •  Security
     •  Resources



37   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Webtier related projects

     •  https://servlet-spec.java.net
     •  http://jcp.org/en/jsr/summary?id=340
     •  webtier@glassfish.java.net
           –  For users of GlassFish webtier




38   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Tokyo 2012
                                                                            April 4–6, 2012




39   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Q&A


40   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
41   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
42   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

Más contenido relacionado

La actualidad más candente

Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersBruno Borges
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reza Rahman
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowBruno Borges
 
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondOracle
 
Native REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gNative REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gMarcelo Ochoa
 
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ ApolloIntroduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollodejanb
 
Web Server/App Server Connectivity
Web Server/App Server ConnectivityWeb Server/App Server Connectivity
Web Server/App Server Connectivitywebhostingguy
 
Whats New in the Http Service Specification - Felix Meschberger
Whats New in the Http Service Specification - Felix MeschbergerWhats New in the Http Service Specification - Felix Meschberger
Whats New in the Http Service Specification - Felix Meschbergermfrancis
 
Don't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadDon't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadWASdev Community
 
Maximize the power of OSGi
Maximize the power of OSGiMaximize the power of OSGi
Maximize the power of OSGiDavid Bosschaert
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dumpejlp12
 
Servlets 3.0 - Asynchronous, Easy, Extensible @ Silicon Valley Code Camp 2010
Servlets 3.0 - Asynchronous, Easy, Extensible @ Silicon Valley Code Camp 2010Servlets 3.0 - Asynchronous, Easy, Extensible @ Silicon Valley Code Camp 2010
Servlets 3.0 - Asynchronous, Easy, Extensible @ Silicon Valley Code Camp 2010Arun Gupta
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuninglovingprince58
 
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12cDeveloping Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12cBruno Borges
 

La actualidad más candente (20)

Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
 
Introduction to-osgi
Introduction to-osgiIntroduction to-osgi
Introduction to-osgi
 
Grizzly 20080925 V2
Grizzly 20080925 V2Grizzly 20080925 V2
Grizzly 20080925 V2
 
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
 
Native REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gNative REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11g
 
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ ApolloIntroduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollo
 
Tomcatx performance-tuning
Tomcatx performance-tuningTomcatx performance-tuning
Tomcatx performance-tuning
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
Web Server/App Server Connectivity
Web Server/App Server ConnectivityWeb Server/App Server Connectivity
Web Server/App Server Connectivity
 
Whats New in the Http Service Specification - Felix Meschberger
Whats New in the Http Service Specification - Felix MeschbergerWhats New in the Http Service Specification - Felix Meschberger
Whats New in the Http Service Specification - Felix Meschberger
 
Don't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadDon't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 Instead
 
Maximize the power of OSGi
Maximize the power of OSGiMaximize the power of OSGi
Maximize the power of OSGi
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
 
Servlets 3.0 - Asynchronous, Easy, Extensible @ Silicon Valley Code Camp 2010
Servlets 3.0 - Asynchronous, Easy, Extensible @ Silicon Valley Code Camp 2010Servlets 3.0 - Asynchronous, Easy, Extensible @ Silicon Valley Code Camp 2010
Servlets 3.0 - Asynchronous, Easy, Extensible @ Silicon Valley Code Camp 2010
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuning
 
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12cDeveloping Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
 

Similar a Servlet 3.1

Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckEdward Burns
 
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)Shing Wai Chan
 
WebSockets - Realtime em Mundo Conectado
WebSockets - Realtime em Mundo ConectadoWebSockets - Realtime em Mundo Conectado
WebSockets - Realtime em Mundo ConectadoBruno Borges
 
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Codemotion Tel Aviv
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)jeckels
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_daviddTakashi Ito
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusEmily Jiang
 
GeekAustin DevOps
GeekAustin DevOpsGeekAustin DevOps
GeekAustin DevOpsMatt Ray
 
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterLambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterJAXLondon2014
 
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Simon Ritter
 
New and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileNew and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileEmily Jiang
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureJavaDayUA
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesArun Gupta
 
Introduction to java servlet 3.0 api javaone 2008
Introduction to java servlet 3.0 api javaone 2008Introduction to java servlet 3.0 api javaone 2008
Introduction to java servlet 3.0 api javaone 2008JavaEE Trainers
 
20100730 phpstudy
20100730 phpstudy20100730 phpstudy
20100730 phpstudyYusuke Ando
 
Lambdas & Streams
Lambdas & StreamsLambdas & Streams
Lambdas & StreamsC4Media
 

Similar a Servlet 3.1 (20)

Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
 
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
WebSockets - Realtime em Mundo Conectado
WebSockets - Realtime em Mundo ConectadoWebSockets - Realtime em Mundo Conectado
WebSockets - Realtime em Mundo Conectado
 
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
 
Java EE7
Java EE7Java EE7
Java EE7
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_davidd
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
GeekAustin DevOps
GeekAustin DevOpsGeekAustin DevOps
GeekAustin DevOps
 
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterLambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
 
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Lambdas And Streams in JDK8
Lambdas And Streams in JDK8
 
New and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileNew and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profile
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and Architecture
 
JDK8 Streams
JDK8 StreamsJDK8 Streams
JDK8 Streams
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
Introduction to java servlet 3.0 api javaone 2008
Introduction to java servlet 3.0 api javaone 2008Introduction to java servlet 3.0 api javaone 2008
Introduction to java servlet 3.0 api javaone 2008
 
20100730 phpstudy
20100730 phpstudy20100730 phpstudy
20100730 phpstudy
 
Lambdas & Streams
Lambdas & StreamsLambdas & Streams
Lambdas & Streams
 

Más de Arun Gupta

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdfArun Gupta
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Arun Gupta
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesArun Gupta
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerArun Gupta
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Arun Gupta
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open SourceArun Gupta
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using KubernetesArun Gupta
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native ApplicationsArun Gupta
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with KubernetesArun Gupta
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMArun Gupta
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Arun Gupta
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteArun Gupta
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Arun Gupta
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitArun Gupta
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeArun Gupta
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017Arun Gupta
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftArun Gupta
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersArun Gupta
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!Arun Gupta
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersArun Gupta
 

Más de Arun Gupta (20)

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using Firecracker
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open Source
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using Kubernetes
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native Applications
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with Kubernetes
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAM
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv Summit
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's Landscape
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
 

Último

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Último (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

Servlet 3.1

  • 1. 1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 2. Servlet 3.1 John Clingan, Principal Product Manager 2 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 3. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle. 3 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 4. Agenda •  Servlet 3.0 recap •  Servlet 3.1 Overview •  NIO API •  Protocol Upgrade •  Security •  Resources 4 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 5. Servlet 3.0 recap •  Part of Java EE 6 •  Focused on –  Ease-of-Development –  Pluggability –  Asynchronous support –  Dynamic registration of servlets, filters and listeners –  Security enhancements •  Adoption –  GlassFish 3.x, Tomcat 7, JBOSS, Caucho, IBM, Weblogic 5 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 6. Servlet 3.0 recap Ease of Development •  Annotations to declare –  Servlets –  Filters –  Listeners –  Security •  Defaults for attributes of annotations 6 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 7. Example @WebServlet( urlPatterns = {“/foo”} ) public class SimpleSample extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) { } } 7 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 8. Servlet 3.0 recap Pluggability •  Drag-and-drop model •  Web frameworks as fully configured libraries •  Contain “fragments” of web.xml •  META-INF/web-fragment.xml •  Extensions can register servlets, filters, listeners dynamically •  Extensions can also discover and process annotated classes 8 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 9. Servlet 3.0 recap Using pluggability •  Bundle static resources and jsps in a jar that can be re- used •  Look for ready-to-use frameworks, libraries •  Re-factor your libraries into re-usable, auto-configured frameworks 9 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 10. Agenda •  Servlet 3.0 recap •  Servlet 3.1 Overview •  NIO API •  Protocol Upgrade •  Security •  Resources 10 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 11. The content described in the following slides are subject to change based on expert group discussions 11 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 12. JAVA EE 7 THEME: CLOUD / PAAS Java EE 7 platform to be ready for the cloud 12 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 13. Java EE 7 PaaS support •  Provide customers and users ability to leverage cloud environments •  Enable multi-tenancy –  One application instance per tenant –  Mapping to tenant done by container –  Isolation between applications •  Define metadata for services 13 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 14. Servlet 3.1 Feature set •  Align with Java EE 7 for cloud support –  For web container there will a virtual server mapping per tenant –  Ability to load custom web resources per tenant –  Use the services exposed in Java EE 7 •  Scale –  Expose NIO2 API •  Support newer technologies that leverage http protocol for the initial handshake –  Support general upgrade mechanism for protocols like WebSocket •  Security enhancements 14 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 15. Agenda •  Servlet 3.0 recap •  Servlet 3.1 Overview •  NIO API •  Protocol Upgrade •  Security •  Resources 15 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 16. Expose NIO API Overview: NonBlocking IO •  Add two listeners: ReadListener, WriteListener •  Add two interfaces: –  AsyncIOInputSource with abstract classes ServletInputStream, ServletReader –  AsyncIOOutputSink with abstract classes ServletOutputStream, ServletWriter •  Add APIs to ServletRequest, ServletResponse 16 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 17. Expose NIO API javax.servlet.ReadListener public interface ReadListener extends EventListener { public void onDataAvailable(ServletRequest request); public void onAllDataRead(ServletRequest request); public void onError(Throwable t); } 17 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 18. Expose NIO API javax.servlet.WriteListener public interface WriteListener extends EventListener { public void onWritePossible(ServletResponse response); public void onError(Throwable t); } 18 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 19. Expose NIO API javax.servlet.AsyncIOInputSource public interface AsyncIOInputSource { public int dataAvailable(); public boolean isFinished(); public isReady(); } 19 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 20. Expose NIO API ServletInputStream, ServletReader InputStream Reader ServletInputStream AsyncIOInputSource ServletReader 20 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 21. Expose NIO API javax.servlet.AsyncIOOutputSink public interface AsyncIOOutputSink { public boolean canWrite(int size); public void complete(); } 21 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 22. Expose NIO API NIOOutputStream, NIOWriter OutputStream Writer ServletOutputStream AsyncIOOutputSink ServletWriter 22 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 23. Expose NIO API ServletRequest, ServletResponse •  ServletRequest –  Public ServletInputStream getServletInputStream() –  Public ServletReader getServletReader() –  public void addListener(ReadListener listener) •  ServletResponse –  Public ServletOutputStream getServletOutputStream() –  Public ServletWriter getServletWriter() –  public addListener(WriteListener listener) 23 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 24. Expose NIO API Sample Usage public class NIOSampleServlet extends HttpServlet protected void doGet(HttpServletRequest request, HttpServletResponse response) { request.addListener(new ReadListener() { public void onDataAvailable(ServletRequest request) { ServletInputStream nis = request.getServletInputStream(); try { nis.read(new byte[nis.dataAvailable()]); … } 24 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 25. Expose NIO API Sample Usage (cont’d) public void onAllDataRead(ServletRequest request) { try { request.getServletInputStream().close(); …. } public void onError(Throwable t) { … } }); final byte[] b = new byte[100]; …. 25 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 26. Expose NIO API Sample Usage (cont’d 2) •  response.addListener(new WriteListener() { public void onWritePossible(ServletResponse response) { AsyncIOOutputStream nos = response.getAsyncIOOutputStream(); try { nos.write(b); nos.complete(); … } public void onError(Throwable t) { … } }); } } 26 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 27. Expose NIO API •  Discussion with expert group on alternate approach •  Use NIO 2 approach 27 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 28. Program Agenda •  Servlet 3.0 recap •  Servlet 3.1 Overview •  NIO API •  Protocol Upgrade •  Security •  Resources 28 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 29. Upgrade •  HTTP 1.1 •  Connection •  Transition to some other, incompatible protocol •  For example, Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9 29 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 30. Upgrade Example: WebSocket •  Protocol: IETF •  API: W3C (JavaScript) •  Bi-directional, full-duplex / TCP 30 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 31. Upgrade WebSocket Example •  GET /chat HTTP/1.1 •  HTTP/1.1 101 Switching Protocols Host: server.example.com Upgrade: websocket Upgrade: websocket Connection: Upgrade Connection: Upgrade Sec-WebSocket-Accept: Sec-WebSocket-Key: s3pPLMBiTxaQ9kYGzzhZRbK dGhlIHNhbXBsZSBub25jZQ== +xOo= Origin: http://example.com Sec-WebSocket-Protocol: chat Sec-WebSocket-Protocol: chat, superchat Sec-WebSocket-Version: 13 31 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 32. Upgrade HTTP Request Servlet …. upgrade(…); ProtocolHandler 32 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 33. Agenda •  Servlet 3.0 recap •  Servlet 3.1 Overview •  NIO API •  Protocol Upgrade •  Security •  Resources 33 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 34. Security Enhancement •  Made good progress in Servlet 3.0 •  Continue from where we left off •  Include support for preventing against CSRF •  Provide an easy way to support denying all unlisted http methods •  Encoding / escaping support to prevent XSS 34 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 35. Align with other Java EE JSRs •  Integrate with Concurrency Utilities for Java EE –  Utilize it Async programming model •  Align with CDI •  Align with Bean Validation •  Align with Jcache (JSR 107) 35 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 36. Transparency •  High level of transparency for all Java EE JSRs •  Use java.net project to run our JSRs in the open –  One java.net project per specification •  Publicly viewable Expert Group mailing list archive •  Users observer list gets copies of all emails to the EG •  Download area •  JIRA for issue tracking •  Wiki and source repository at EG’s discretion •  JCP.org private mailing list for administrative / confidential info 36 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 37. Agenda •  Servlet 3.0 recap •  Servlet 3.1 Overview •  NIO API •  Protocol Upgrade •  Security •  Resources 37 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 38. Webtier related projects •  https://servlet-spec.java.net •  http://jcp.org/en/jsr/summary?id=340 •  webtier@glassfish.java.net –  For users of GlassFish webtier 38 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 39. Tokyo 2012 April 4–6, 2012 39 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 40. Q&A 40 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 41. 41 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 42. 42 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.