0% found this document useful (0 votes)
167 views

Java EE Tutorial

http://wiki4.caucho.com/Java_EE_Tutorial_covering_JSP_2.2,_and_Servlets_3.0 This tutorial focuses on using Servlet's and JSP the right way. Servlet and JSP have evolved over the years, and now there is often more than one way to do things. For example, this tutorial uses EL and JSTL not JSP scriptlets, it uses JSPs in a Model 2/MVC style not in a model 1 style, etc. Consider it a tutorial that focuses only on the best practices and not the legacy ways to do things. There are other tutorials on this subject, but this tutorial is going to be different in that it is going to put all code into github, and you can follow along with Eclipse. Also instead of focusing on JSF, we are going to focus on JSP and Servlets as the main view technology. Java EE, JSP and Servlets have added a lot of features that are in other frameworks, making those other frameworks less relevant then they were before Java EE garnered these extra abilities. Even is you decide to use JSF, Struts, Stripes, Spring MVC, JSF, etc., this tutorial should help you have a better understanding of the JSP/Servlets core that they build on. We are going to start by building a simple bookstore. We will progressively add more features to the bookstore and as we do we will use more of Java EE/CDI, JSP and Servlets. For this tutorial, I am going to use Resin 4.0.x, but you could use any Java EE 6 Web Profile compliant application server.

Uploaded by

billdigman
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views

Java EE Tutorial

http://wiki4.caucho.com/Java_EE_Tutorial_covering_JSP_2.2,_and_Servlets_3.0 This tutorial focuses on using Servlet's and JSP the right way. Servlet and JSP have evolved over the years, and now there is often more than one way to do things. For example, this tutorial uses EL and JSTL not JSP scriptlets, it uses JSPs in a Model 2/MVC style not in a model 1 style, etc. Consider it a tutorial that focuses only on the best practices and not the legacy ways to do things. There are other tutorials on this subject, but this tutorial is going to be different in that it is going to put all code into github, and you can follow along with Eclipse. Also instead of focusing on JSF, we are going to focus on JSP and Servlets as the main view technology. Java EE, JSP and Servlets have added a lot of features that are in other frameworks, making those other frameworks less relevant then they were before Java EE garnered these extra abilities. Even is you decide to use JSF, Struts, Stripes, Spring MVC, JSF, etc., this tutorial should help you have a better understanding of the JSP/Servlets core that they build on. We are going to start by building a simple bookstore. We will progressively add more features to the bookstore and as we do we will use more of Java EE/CDI, JSP and Servlets. For this tutorial, I am going to use Resin 4.0.x, but you could use any Java EE 6 Web Profile compliant application server.

Uploaded by

billdigman
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Java

EE Servlet 3.0 and JSP 2.2

Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

Open%Source,%Reliable%and%Lightweight% Java%EE%Applica;on%Server%

RESIN PRO

Web Profile

Health System

Cloud Support

Thursday, May 3, 12

Java EE Servlet and JSP tutorial


The following will be covered:
Servlet 3.0 JSP Java EE 6 Web Prole

Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

Java EE tutorial focused on Servlets and Java Server Pages (No JSF)
Focus on Servlet's and JSP the right way Servlet and JSP evolved Uses EL and JSTL not JSP scriptlets JSPs in a Model 2/MVC style No Model 1 Focus is on best prac8ces and not the legacy ways to do
things

Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

Java EE Servlets/JSP versus frameworks


Ideas from Spring MVC, Struts, Tiles, WebWork made it into
Servlets/JSP and Java EE Servlet/JSP/Java EE

Frameworks oTen duplicate same func8onality in core


JSP tag les versus Tiles Standard valida=on versus Struts/Spring MVC valida=on Interna=onaliza=on

It is ok to use those frameworks, but you should have a good


understanding what is in the specica8on too

Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

Tools
For now Eclipse for Java EE IDE and Resin You can use any Java EE 6 compliant applica8on server for
most if not all of this tutorial

You can also use other IDEs Later tutorials will support maven as well as Eclipse

Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

Tutorial style
Not going to list every op8on of every tag, congura8on, etc. Not going to teach you something you are suppose to avoid anyway or
that is deprecated (JSP scriptlets)

Build something real enough to ensure that things actually work and we
don't miss something common or important out of domain

Don't build something too real so that the concepts are hard to tease Provide cook books on how to do common tasks like I18n, le uploads,
working with JDBC etc.

IDE, Performance tes8ng, Debugging, etc. from the start!


Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

Items that are in scope for this series (no par8cular order)

Eclipse WTP JSP Unied EL Tag les Servlet Filters Servlet 3 extension points JSP EL JDBC JPA

File uploads JDBC / RDBMS CDI Session replica8on Cloud deployment I18n JavaScript Ajax HTML 5

Valida8on (standard, and JavaScript) WebSockets/Long polling Load Balancing HTTP Caching Performance tuning Maven JCache / Memcached / NoSQL Clustering / Load balancing

Quercus Rewrite rules JMX Health

Server monitoring SOA JMS REST etc.

Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

Out of scope
JSF (maybe later, but not before we really explore the core) Spring Struts Seam NetBeans Any framework above and beyond Java EE 6 that has
signicant overlap with Java EE 6 is out of scope

Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

So far....
Cook books and Tutorials
Building a simple Listing in JSP:
covers model 2, Servlets,

JSP intro. Java EE Servlet tutorial- Adding create, update and delete to the bookstore listing: covers more interactions Java EE Servlet tutorial: Using JSPs to create header, footer area, formatting and basic CSS for bookstore. Java EE Servlet tutorial: Adding MySQL and JDBC to bookstore example.

Caucho Home | Contact Us | Caucho Blog | Wiki | Applica8on Server Thursday, May 3, 12

You might also like