Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...IndicThreads
Session Presented at 5th IndicThreads.com Conference On Java held on 10-11 December 2010 in Pune, India
WEB: http://J10.IndicThreads.com
------------
Java Platform, Enterprise Edition 6 (JavaEE 6) provides new capabilities that make it easier to develop and deploy enterprise and Web applications. It provides a simplified developer experience and improves on the developer productivity features introduced in JavaEE 5. It breaks the “one size fits all” approach in previous releases with Profiles and offers a comprehensive Web profile for lightweight, standards-based modern Web applications.The Web profile allows developers to build web applications quickly and prevents proliferation of custom web stacks for easier maintainability.
The platform enables extensibility by embracing open source libraries and frameworks such that they are treated as first class citizens of the platform. Several specifications like Contexts & Dependency Injection, Java Server Faces 2, Java API for RESTful Services, Java Persistence API 2, and Servlets 3 make the platform more powerful. All these specifications are implemented in GlassFish Open Source Edition 3 – a modular (OSGi based) light-weight, embeddable, extensible, and the open source reference implementation for Java EE 6. NetBeans, Eclipse, and IntelliJ provide extensive tooling for Java EE 6 and GlassFish Open Source Edition.
This tutorial session will help the attendees learn the latest APIs and develop a complete Java EE 6 application using NetBeans IDE. The attendees will understand the different tips & tricks such as code completion, templates, and wizards for a rapid application deployment. The techniques like session preservation and deploy-on-save are demonstrated to reduce the development lifecycle.
This session will provide a complete tour of using the Spring MVC framework to build Java Portlets. It will include an in-depth review of a sample portlet application developed using the latest features of Spring MVC, including Annotation-based Controllers. If you are writing Portlets and using Spring, this session is for you.
We'll begin by discussing the unique differences and challenges when developing Portlets instead of traditional Servlet webapps. Then we'll talk about the unique approach that Spring MVC takes towards Portlets that fully leverages the Portlet lifecycle, instead of masking it like many other frameworks. We'll take an extensive tour of a sample application so we can see all the unique pieces of the framework in action. Finally we'll conclude with discussion of the upcoming support for the Portlet 2.0 (JSR 286) specification that will be part of Spring 3.0.
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...IndicThreads
Session Presented at 5th IndicThreads.com Conference On Java held on 10-11 December 2010 in Pune, India
WEB: http://J10.IndicThreads.com
------------
Java Platform, Enterprise Edition 6 (JavaEE 6) provides new capabilities that make it easier to develop and deploy enterprise and Web applications. It provides a simplified developer experience and improves on the developer productivity features introduced in JavaEE 5. It breaks the “one size fits all” approach in previous releases with Profiles and offers a comprehensive Web profile for lightweight, standards-based modern Web applications.The Web profile allows developers to build web applications quickly and prevents proliferation of custom web stacks for easier maintainability.
The platform enables extensibility by embracing open source libraries and frameworks such that they are treated as first class citizens of the platform. Several specifications like Contexts & Dependency Injection, Java Server Faces 2, Java API for RESTful Services, Java Persistence API 2, and Servlets 3 make the platform more powerful. All these specifications are implemented in GlassFish Open Source Edition 3 – a modular (OSGi based) light-weight, embeddable, extensible, and the open source reference implementation for Java EE 6. NetBeans, Eclipse, and IntelliJ provide extensive tooling for Java EE 6 and GlassFish Open Source Edition.
This tutorial session will help the attendees learn the latest APIs and develop a complete Java EE 6 application using NetBeans IDE. The attendees will understand the different tips & tricks such as code completion, templates, and wizards for a rapid application deployment. The techniques like session preservation and deploy-on-save are demonstrated to reduce the development lifecycle.
This session will provide a complete tour of using the Spring MVC framework to build Java Portlets. It will include an in-depth review of a sample portlet application developed using the latest features of Spring MVC, including Annotation-based Controllers. If you are writing Portlets and using Spring, this session is for you.
We'll begin by discussing the unique differences and challenges when developing Portlets instead of traditional Servlet webapps. Then we'll talk about the unique approach that Spring MVC takes towards Portlets that fully leverages the Portlet lifecycle, instead of masking it like many other frameworks. We'll take an extensive tour of a sample application so we can see all the unique pieces of the framework in action. Finally we'll conclude with discussion of the upcoming support for the Portlet 2.0 (JSR 286) specification that will be part of Spring 3.0.
Java EE 6 and GlassFish v3: Paving the path for futureArun Gupta
This session presents the GlassFish™ Tools Bundle for Eclipse, which can be used for creating Java EE 6 applications and configuring, deploying, and monitoring the GlassFish application server.
Introduction
Framework Modules
Spring Dependencies
Dependency Injection
The IoC Container
Spring IoC Container and Beans
XML-based Configuration Metadata
XML-based Beans
Instantiation of Beans
Dependency Injection
Bean Scopes
Depends On & Lazy-initialized Beans
Customizing the Nature of a Bean
Using PropertyPlaceholderConfigurer
https://notebookbft.wordpress.com/
This talk introduces the role that Spring MVC and REST can play as a service-side endpoint model that can be connected to from mobile, rich, and desktop applications.
Java EE 6 and GlassFish v3: Paving the path for futureArun Gupta
This session presents the GlassFish™ Tools Bundle for Eclipse, which can be used for creating Java EE 6 applications and configuring, deploying, and monitoring the GlassFish application server.
Introduction
Framework Modules
Spring Dependencies
Dependency Injection
The IoC Container
Spring IoC Container and Beans
XML-based Configuration Metadata
XML-based Beans
Instantiation of Beans
Dependency Injection
Bean Scopes
Depends On & Lazy-initialized Beans
Customizing the Nature of a Bean
Using PropertyPlaceholderConfigurer
https://notebookbft.wordpress.com/
This talk introduces the role that Spring MVC and REST can play as a service-side endpoint model that can be connected to from mobile, rich, and desktop applications.
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 5...WebStackAcademy
Introduction
The server hands requests to a Container in which the servlet is deployed. The Container gives the servlet the HTTP request and response, and calls the servlet's method, such as doPost() or doGet(). It creates the HttpServletResponse and HttpServletRequest objects.
Process:
Container creates HttpServletRequest/HttpServletResponse objects
Container determines servlet based on URL-pattern, creates thread and calls service()
services calls doGet() or doPost()
servlet writes to response
service() completes, control returns to container
thread dies or returns to pool
The container provides:
web app communications support
lifecycle management
multithreading support
declarative security
support for JSPs
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
Course Description
#springframework, #spring, #udemy, #discount, #programming, #springmvc, spring, #udemycourse, #education
NEW udemy course related to the latest Java Spring MVC Framework 4 for developing WEB applications with popular and proven technologies such as AngularJS by Google and HTML5. (Lectures are divided in three main sections so you don't have to learn AngularJS Framework until you start the last section. The last section will teach you AngularJS by Google and the integration with Java Spring MVC Framework 4)
https://www.udemy.com/java-spring-mvc-framework-with-angularjs-by-google-and-html5
Moreover, this course is designed and created with the mindset of teaching you the latest web technologies in a short period of time with low training cost and high-quality content including real production quality code examples.
Therefore after attending this course, you will be ready to design and develop any commercial Java Spring MVC applications by learning the main principals, best practices, and most important concepts.
Furthermore, this is a fast track course and covers the most important concepts in AngularJS Framework, HTML5 and the latest Java Spring MVC Framework 4x with code examples and sample applications. You will be able to download source codes/slides/diagrams by attending this course and you can use those samples/codes in your applications as well. Therefore, it will be more than enough for you to develop Java Spring MVC applications if you attend this course.
The benefits of attending this udemy course are listed like as below;
You will earn a higher salary hence you will be able to use the latest and productive technologies and this course will also improve the way of your thinking in terms of programming by teaching you dependency injection principle used in Spring MVC and AngularJS
You will be more confident about commercial WEB programming for the following years and general programming concepts as well.
We will only use FREE Open Source Software tools during the development of components in this course.
You will learn the latest Java Spring MVC Framework with hands-on examples
You will learn the usage of AngularJS by Google for developing structured rich client side applications
You will understand the usage of latest useful basic HTML5 tags with code examples
You will gain experience of using CSS(Style Sheets) in web applications
Learn how to develop, test, run and debug Java Spring MVC applications
Learn how to integrate AngularJS with Java Spring MVC framework.
https://www.udemy.com/java-spring-mvc-framework-with-angularjs-by-google-and-html5
#springframework, #spring, #udemy, #discount, #programming, #springmvc, spring, #udemycourse, #education
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Introduction to java servlet 3.0 api javaone 2008
1. Java™ Servlet 3.0 API: What's new and exciting
Rajiv Mordani
Senior Staff Engineer, Sun Microsystems
TS-5415
2. Learn about the new features in the
Java™ Servlet 3.0 API
2008 JavaOneSM Conference | java.sun.com/javaone | 2
3. Agenda
Overview
Pluggability
Ease of Development
Async servlet support
Security
Others
Status
Summary
2008 JavaOneSM Conference | java.sun.com/javaone | 3
4. Overview
Java™ Servlet 3.0 API – JSR 315
Has about 20 members in the expert group with a good mix of
representation from the major Java™ EE vendors, web container
vendors and individual web framework authors
Main areas of improvements and additions are -
• Pluggability
• Ease of development
• Async servlet support
• Security enhancements
Note: Specification in early draft and things can change
• The good news is that the community still has time to provide feedback
2008 JavaOneSM Conference | java.sun.com/javaone | 4
5. Agenda
Overview
Pluggability
Ease of Development
Async servlet support
Security
Others
Status
Summary
2008 JavaOneSM Conference | java.sun.com/javaone | 5
6. Pluggability
Make it possible to use framework and libraries with no
additional configuration
Modularizing web.xml to allow frameworks / libraries to
have their own entities defined and self-contained within
the framework
Adding APIs to ServletContext to allow addition of
Servlets, Filters and Listeners to a web application
at application startup time.
Use of annotations to declare all the components within a
web application
2008 JavaOneSM Conference | java.sun.com/javaone | 6
7. Pluggability - Modularization of web.xml
Current users of framework need to edit their application's
web.xml to
• Define a Java™ Servlet provided by the framework (typically a
controller Java™ Servlet )
• Define Filters that the framework needs in order to be used within
a web application (logging for example or Filters to implement
security constraints)
• Define listeners so that appropriate action can be taken at different
points in the application / component's life cycle.
Monolithic web.xml can become complex to maintain as the
dependencies of the application increases
Each framework needs to document for the developer what
all must be declared in the web.xml
2008 JavaOneSM Conference | java.sun.com/javaone | 7
8. Pluggability – Modularization of web.xml
Java™ Servlet 3.0 specification introduces the concept of
modular web.xml
Each framework can define it's own web.xml and include it in
the jar file's META-INF directory
The developer needs to include the framework jar in the
application
At deployment the container is responsible for discovering
the web.xml fragments and processing them.
Introduce new element – web-fragment that can define
servlets, filters and listeners as child elements.
2008 JavaOneSM Conference | java.sun.com/javaone | 8
9. Pluggability - example new elements in
web.xml
<web-fragment>
<servlet>
<servlet-name>welcome</servlet-name>
<servlet-class>
WelcomeServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>welcome</servlet-name>
<url-pattern>/Welcome</url-pattern>
</servlet-mapping>
...
</web-fragment>
2008 JavaOneSM Conference | java.sun.com/javaone | 9
10. Pluggability – Configuration methods in
ServletContext
In addition to web.xml modularization methods added to the
ServletContext to declare and configure servlets and filters.
Can only be called at context initialization time.
Allows to
• Declare a new Servlet
• Define a url mapping for the Servlet declared
• Declare a Filter
• Define a url mapping for the Filter
Enables applications to load Servlets and filters at runtime
that are needed
2008 JavaOneSM Conference | java.sun.com/javaone | 10
11. Pluggability – APIs in ServletContext example
@ServletContextListener
public class MyListener {
public void contextInitialized
(ServletContextEvent sce) {
ServletContext sc = sce.getServletContext();
sc.addServlet("myServlet",
"Sample servlet",
"foo.bar.MyServlet",
null, -1);
sc.addServletMapping("myServlet",
new String[]
{"/urlpattern/*"});
}
}
2008 JavaOneSM Conference | java.sun.com/javaone | 11
12. Pluggability – APIs in ServletContext example
@ServletContextListener
public class MyListener {
public void contextInitialized
(ServletContextEvent sce) {
ServletContext sc = sce.getServletContext();
sc.addFilter("myFilter",
"Sample Filter",
"foo.bar.MyFilter",
null);
sc.addFilterMapping("myFilter",
new String[]
{"/urlpattern/*"},
“myServlet”,
DispatcherType.REQUEST,
false);
}
}
2008 JavaOneSM Conference | java.sun.com/javaone | 12
13. Agenda
Overview
Pluggability
Ease of Development
Async servlet support
Security
Others
Status
Summary
2008 JavaOneSM Conference | java.sun.com/javaone | 13
14. Ease of Development
Focus on ease of development in Java™ Servlet 3.0 API
Enhance Java™ Servlet APIs to use newer language features
Annotations for declarative style of programming
Generics for better compile time error checking and type safety
web.xml optional (was already optional for Java™ EE 5)
• Restricted to JSPs and static resources only
Better defaults / convention over configuration
2008 JavaOneSM Conference | java.sun.com/javaone | 14
15. Ease of Development – defining a servlet
Define a servlet using a @Servlet annotation
Must contain a url-mapping
All other fields optional with reasonable defaults –
• example the “name” of the servlet is the fully qualified class name if
none is specified.
• Can define the appropriate http methods using the annotations @GET,
@PUT, @POST, @DELETE, @HEAD
• @HttpMethod meta-annotation allows extensions
Can use the web.xml to override annotation values
2008 JavaOneSM Conference | java.sun.com/javaone | 15
17. Ease of development – Defining a servlet
@Servlet(urlMapping={“/foo”})
public class SimpleSample {
}
2008 JavaOneSM Conference | java.sun.com/javaone | 17
18. Code Sample
@Servlet(urlMapping={“/foo”, “/bar”},
name=”MyServlet”)
public class SampleUsingAnnotationAttributes {
@GET
public void handleGet(HttpServletRequest req,
HttpServletResponse res)
{
}
}
2008 JavaOneSM Conference | java.sun.com/javaone | 18
19. Ease of development – Defining a Filter
Define a Filter using a @ServletFilter annotation
Must contain a @FilterMapping annotation
All other fields optional with reasonable defaults
2008 JavaOneSM Conference | java.sun.com/javaone | 19
20. Code Sample
package samples;
import javax.servlet.http.annotation.*;
@ServletFilter
@FilterMapping(urlPattern=”/foo”)
public class SampleFilter {
public void doFilter(HttpServletRequest req,
HttpServletResponse res)
{
}
}
2008 JavaOneSM Conference | java.sun.com/javaone | 20
21. Ease of development – Defining a
ServletContextListener
Define a context listener using a
@ServletContextListener annotation
2008 JavaOneSM Conference | java.sun.com/javaone | 21
22. Ease of Developmnt – ServletContext
example
@ServletContextListener
public class MyListener {
public void contextInitialized
(ServletContextEvent sce) {
ServletContext sc = sce.getServletContext();
sc.addServlet("myServlet",
"Sample servlet",
"foo.bar.MyServlet",
null, -1);
sc.addServletMapping("myServlet",
new String[]
{"/urlpattern/*"});
}
}
2008 JavaOneSM Conference | java.sun.com/javaone | 22
23. Agenda
Overview
Pluggability
Ease of Development
Async servlet support
Security
Others
Status
Summary
2008 JavaOneSM Conference | java.sun.com/javaone | 23
24. Async servlet – Use cases
Comet style of application
Async Web proxy
Async Web services
2008 JavaOneSM Conference | java.sun.com/javaone | 24
25. Async servlet support – popular use case
Comet
Primer
• Rely on a persistent HTTP connection between server and client
• Two strategies
• Streaming - browser opens a single persistent connection to the server for
all Comet events each time the server sends a new event, the browser
interprets it.
• Long polling - a new request for each event (or set of events)
• Standardization efforts as part of the Bayeux protocol
Implementation specific APIs available today in the various
Java™ Servlet containers.
APIs added to Java™ Servlet 3.0 specification to enable Comet
style programming
Request can be suspended and resumed
2008 JavaOneSM Conference | java.sun.com/javaone | 25
26. Async servlet support - Suspending a request
Request can be suspended by the application
Allows the container to not block on a request that needs
access to a resource – for example access to a DataSource or
wait for a response from a call to a WebService.
When resumed the Request is re-dispatched through the
filters for processing.
• Results in an additional thread for handling the new request
The resume method on the request resumes processing
• Can be used to push timely events in multi-user applications
The complete method to indicate the completion of request
processing
Can query if a request is suspended, resumed or has
timed out.
2008 JavaOneSM Conference | java.sun.com/javaone | 26
27. Async servlet support – methods added to
ServletRequest
Methods added to ServletRequest for suspending, resuming
and querying for status -
• void suspend(long timeOutMs);
• void resume();
• void complete();
• boolean isSuspended();
• boolean isResumed();
• boolean isTimeout();
2008 JavaOneSM Conference | java.sun.com/javaone | 27
28. Async servlet support – Events on
RequestListener
Corresponding events fired for changes to request processing.
Notification for suspend, resume and complete available for
developers via the ServletRequestListener
Methods added to ServletRequestListener
• void requestSuspended(ServletRequestEvent rre);
• void requestResumed(ServletRequestEvent rre);
• void requestCompleted(ServletRequestEvent rre);
2008 JavaOneSM Conference | java.sun.com/javaone | 28
29. Async servlet support – methods added to
Response
Methods added to ServletResponse for disabling, enabling
and querying for status -
• void disable();
• void isDisabled();
• void enable();
2008 JavaOneSM Conference | java.sun.com/javaone | 29
30. Async servlet to web services call
2008 JavaOneSM Conference | java.sun.com/javaone | 30
31. Agenda
Overview
Pluggability
Ease of Development
Async servlet support
Security
Others
Status
Summary
2008 JavaOneSM Conference | java.sun.com/javaone | 31
32. Security
Ability to login and logout programmatically
Methods added to ServletRequest to force a login and
ability to logout
Still being discussed in the EG.
Proposal to add login and logout method to
• HttpServletRequest
• HttpServletRequestWrapper
• HttpSession (logout only)
2008 JavaOneSM Conference | java.sun.com/javaone | 32
33. Security – login and logout
Login method intended to allow an application or framework
to force a container mediated authentication from within an
unconstrained request context
Login requires access to the HttpResponse object to set
the www-authenticate header.
• Available through new methods added to the request to give access to
the corresponding response object
logout methods are provided to allow an application to reset
the authentication state of a request without requiring that
authentication be bound to an HttpSession
Still in discussion in the Expert Group and not closed upon.
2008 JavaOneSM Conference | java.sun.com/javaone | 33
34. Agenda
Overview
Pluggability
Ease of Development
Async servlet support
Security
Others
Status
Summary
2008 JavaOneSM Conference | java.sun.com/javaone | 34
35. Others – HttpOnly Cookie support
Added support for HttpOnlyCookies
Prevents access to the cookie from client side scripting code
Prevents cross-site scripting attacks.
Method added to Cookie to set and query if it is an
HttpOnly cookie
2008 JavaOneSM Conference | java.sun.com/javaone | 35
36. Others – Session tracking cookie
configuration
Ability to set the session tracking cookie configuration for the
corresponding ServletContext
Supports multiple Session tracking mode – COOKIE, URL, SSL
2008 JavaOneSM Conference | java.sun.com/javaone | 36
37. Pending discussion in the expert group
Miscellaneous items to be done for Java™ Servlet 3.0 API
• File upload
• Container wide init-params
• Clarifications from previous releases
• Enablement of JAX-RS / JSF 2.0 (if any changes needed)
2008 JavaOneSM Conference | java.sun.com/javaone | 37
38. Java EE profiles
Java EE 6 specification introducing notion of profiles
Targeting a web profile for Java EE 6
Web profile to be based on Servlets and JSPs
Still being discussed in the Java EE 6 expert group
Roberto solicited feedback from the community
Varying opinions of what should be in the profile
Still need to close on in the Java EE 6 expert group
2008 JavaOneSM Conference | java.sun.com/javaone | 38
41. EJB in a WAR file
Goal is to remove an artificial packaging restriction
• NOT to create a new flavor of EJB component
EJB component behavior is independent of packaging
Full EJB container functionality available
2008 JavaOneSM Conference | java.sun.com/javaone | 41
42. Agenda
Overview
Pluggability
Ease of Development
Comet
Security
Status
Summary
2008 JavaOneSM Conference | java.sun.com/javaone | 42
43. Status
Currently in Early Draft Review
Public Review in summer of this year
Proposed final draft and final release aligned with Java™ EE 6
Early access to bits of implementation to be available via
Project GlassFish
2008 JavaOneSM Conference | java.sun.com/javaone | 43
44. Agenda
Overview
Pluggability
Ease of Development
Comet
Security
Status
Summary
2008 JavaOneSM Conference | java.sun.com/javaone | 44
45. Summary
Lot of exciting things happening in the Java™ Servlet 3.0 API
• Pluggability for frameworks
• Ease of Development for developers
• Comet support to enable modern web 2.0 style applications
• Security enhancements to enable programmatic login / logout
• Miscellaneous improvements for better developer experience
Make the life of framework developers and users much easier
Implementation being done in open source as part of
GlassFish project
2008 JavaOneSM Conference | java.sun.com/javaone | 45
46. GlassFish Community
Open Source, Enterprise Ready & Extendable
•GlassFish V3 Tech Preview 2 Available now! • GlassFish Partner Initiative
•Modular OSGi architecture – easy to deploy,
Develop and Extend
•Expanding the ecosystem for
•GlassFish V2 – Production Ready partners.
● Fastest open source app server with
• Enterprise and Mission Critical
Clustering, High Availability, Load Balancing Support
sun.com/software/products/appsrvr
● Support for jMaki, Comet, Ajax, Ruby and
• GlassFish Unlimited Pricing
Groovy
•GlassFish ESB
•Fixed price, unlimited
● Core SOA functions now embedded in
deployments
GlassFish •Combine w/ MySQL Unlimited
•GlassFish Communications App Server • Tools Integration
● SIP servlet technology for converged
•NetBeans and Eclipse
services
glassfish.org
Always free to download, deploy and distribute
2008 JavaOneSM Conference | java.com.sun/javaone | 46
47. For More Information
Official JSR Page
• http://jcp.org/en/jsr/detail?id=315
JAX-RS – TS 5425
JSF 2.0 – TS 5979
Mailing list for webtier related issues -
webtier@glassfish.dev.java.net
Rajiv's blog
• http://weblogs.java.net/blog/mode
2008 JavaOneSM Conference | java.sun.com/javaone | 47