Java Reference
In-Depth Information
Running the Duke's Tutoring Case Study Application
This section describes how to build, package, deploy, and run the Duke's Tutoring applic-
ation.
Setting Up GlassFish Server
Before running the Duke's Tutoring application, set up the security realm used by Duke's
Tutoring with users and groups. The user names and passwords set in this security realm
are used to log in to the administration interface of Duke's Tutoring.
Duke's Tutoring's security realm maps members of the
Administrator
entity to the
Administrator
role used in the security constraint annotations in
AdminBean
.
To Create the JDBC Realm in GlassFish Server
Create the
tutoringRealm
JDBC security realm in GlassFish Server.
Before You Begin
Make sure GlassFish Server is started as described in
“
Starting and
Stopping the GlassFish Server
”
on page
41
,
and Java DB is started as
described in “
Starting and Stopping the Java DB Server
”
on page
43
.
1. In a terminal window, go to:
tut-install
/examples/case-studies/dukes-tutoring/dukes-
tutoring-war/
2. Enter the following command:
ant create-tutoring-realm
This target creates a JDBC realm using the
jdbc/tutoring
JDBC resource,
which will be created when
dukes-tutoring-war
has been deployed.
Running Duke's Tutoring
You can use either NetBeans IDE or Ant to build, package, deploy, and run Duke's Tutor-
ing.