Book Image

Java EE 5 Development using GlassFish Application Server

By : David R Heffelfinger
Book Image

Java EE 5 Development using GlassFish Application Server

By: David R Heffelfinger

Overview of this book

<p>GlassFish is a free, open-source Java EE 5-compliant application server that is quickly gaining massive popularity.<br /><br />This book explains GlassFish installation and configuration, and then moves on to Java EE 5 application development, covering all major Java EE 5 APIs.<br /><br /><span style="font-weight: bold;">Chapter 1</span> provides an overview of Glassfish, including how to install it, configure it, and verify the installation.<br /><br /><span style="font-weight: bold;">Chapter 2</span> covers how to develop server-side web applications using the Servlet API. &nbsp;<br /><br /><span style="font-weight: bold;">Chapter 3</span> explains how to develop web applications using JavaServer Pages (JSPs), including how to develop and use JSP custom tags.<br /><br /><span style="font-weight: bold;">Chapter 4</span> discusses how to develop Java EE applications that interact with a relational database system through the Java Persistence API (JPA) and through the Java Database Connectivity API (JDBC).<br /><br style="font-weight: bold;" /><span style="font-weight: bold;">Chapter 5</span> explains how to use the JSP Standard Tag Library (JSTL) when developing JavaServer Pages.<br /><br /><span style="font-weight: bold;">Chapter 6</span> covers how to develop applications using the JavaServer Faces (JSF) component framework to build web applications.<br /><br /><span style="font-weight: bold;">Chapter 7</span> explains how to develop messaging applications though the Java Messaging Service (JMS) API.<br /><br /><span style="font-weight: bold;">Chapter 8</span> covers securing J2EE applications through the Java Authentication and Authorization Service (JAAS).<br /><br /><span style="font-weight: bold;">Chapter 9</span> discusses how to develop Enterprise Java Beans that adhere to the EJB 3 specification.<br /><br /><span style="font-weight: bold;">Chapter 10</span> explains how to develop and deploy web services that conform to the JAX-WS 2.1 specification.<br /><br /><span style="font-weight: bold;">Chapter 11</span> covers frameworks that build on top of the Java EE 5 specification, including Seam, Facelets, and Ajax4Jsf.<br /><br /><span style="font-weight: bold;">The appendices</span> cover some of the advanced features of the GlassFish server.</p>
Table of Contents (18 chapters)
Java EE 5 Development using GlassFish Application Server
Credits
About the Author
About the Reviewers
Preface
IDE Integration

Processing HTML Forms


Servlets are rarely accessed by typing their URL directly in the browser. The most common use for servlets is to process data entered by users in an HTML form. In this section, we illustrate this process.

Before digging into the servlet code and HTML markup, let's take a look at the web.xml file for this new application.

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>FormHandlerServlet</servlet-name>
<servlet-class>
net.ensode.glassfishbook.formhandling.FormHandlerServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FormHandlerServlet</servlet-name>
<url-pattern>/formhandlerservlet</url-pattern>
</servlet-mapping>
<welcome-file-list...