In our application we will have a single JSP named admin.jsp in the admin folder,
this JSP will only be accessible after the user enters a valid username/password
<%@page contentType="text/html" pageEncoding="UTF-8"%> <!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html;
Had this been a real admin page, you would have been able
to administer the system from here!
GlassFish Specific Security Configuration
The configuration presented in the previous section is part of the Java EE
specification, and, as such, must take place regardless of what application server
we are using to deploy our application. Application server vendors may optionally
require additional steps. In this section we will cover the steps needed to deploy
on GlassFish, the Java EE application server bundled with NetBeans; consult your
application server documentation for additional security configuration information.
When deploying our application to GlassFish, we need to modify glassfish -web.
xml , a GlassFish-specific deployment descriptor. We can create this deployment
descriptor by going to File | New , selecting the GlassFish category and the
GlassFish Descriptor file type.