Book Image

Apache Geronimo 2.1: Quick Reference

Book Image

Apache Geronimo 2.1: Quick Reference

Overview of this book

Apache Geronimo is a robust, scalable, secure, and high-performing application server. But like all application servers, this power comes with a steep learning curve. This book can help you save your time and get working with Geronimo in matter of a few hours. This book is a quick-reference guide to Apache Geronimo that mitigates the starting pains that most developers have when they migrate to a new Application Server. It will help you to extend and amplify your existing development skills, empowering you to build new types of applications regardless of the platform or browser. The book will introduce you to the exciting features of Apache Geronimo Application Server. You will see how easily you can develop and deploy Java EE 5 applications on Geronimo. It covers everything from downloading the server to customizing it using custom GBeans. By following the practical examples in this book, you will be able to develop applications quickly using Geronimo Eclipse Plugin. The book covers Geronimo internals in detail, which helps you write custom services on Geronimo. Also, it helps you to gain a deep understanding of Geronimo plugin architecture and teaches you to extend your server functionality via plugins. By the end of the book, you will develop proficiency in Geronimo and Java EE 5 application development.
Table of Contents (21 chapters)
Apache Geronimo 2.1
Credits
About the Authors
About the Reviewer
Preface

Application security


So far we have seen how to create security realms in Geronimo that can authenticate users based on credentials stored in a variety of data stores. We will now see how these security realms can be used to secure web, EJB, and EAR applications running in Geronimo.

Configuring web application security

A web application's security is configured by creating security roles and security constraints in its Java EE specific deployment descriptor web.xml file. These security roles are mapped to principals in a server-specific deployment plan, geronimo-web.xml in the case of Geronimo, at application deployment time. The sample application used in this section consists of three JSPs &mdash one with unrestricted access, one accessible by the admin role, and another accessible by the user role. The deployment descriptor web.xml for this application is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="MyWebApp" version="2.5" ... >
<display-name>MyWebApp...