SE 452 Component Based Enterprise Computing
Demos of Examples
The demos are hosted on flyweight.cti.depaul.edu.
The servlet engine is Tomcat 3.2.3. The port number is 9080.
The operating system is RedHat Linux 7.1. Java version is Sun J2SDK
Intel/Linux 1.3. Other software used:
To run the demos on your local host, you have to change all the references
to flyweight.cti.depaul.edu:9080 in
the URL's to localhost:8080 or
127.0.0.1:8080
-
Tomcat default home page
-
Hello servlet
-
Login servlet
Invoke: http://flyweight.cti.depaul.edu:9080/se452servlets/login.html
Code: forms/Login.java
-
Retrieving parameters
-
Registration servlet
Invoke:
http://flyweight.cti.depaul.edu:9080/se452servlets/reg3.html
Code: forms/Parameters3.java
-
Retrieving HTTP request info
Invoke: http://flyweight.cti.depaul.edu:9080/se452servlets/loginRequest.html
Code: forms/LoginRequest.java
-
Retrieving HTTP request headers
Invoke: http://flyweight.cti.depaul.edu:9080/se452servlets/requestHeaders
Code: se452examples/RequestHeader.java
-
Registration servlet, sending compressed contents
Invoke:
http://flyweight.cti.depaul.edu:9080/se452servlets/compressedReg.html
Code: forms/CompressedReg.java
-
HTTP Basic Authentication
Invoke:
http://flyweight.cti.depaul.edu:9080/se452servlets/authenticate
Code: se452examples/Authenticate.java
-
Java Expo web app, version 1
Invoke:
http://flyweight.cti.depaul.edu:9080/se452servlets/javaExpo
You can invoke the actions through the menus on the left bar.
-
Login. Try one of these user
names and passwords.
-
Register. Notice that there are some required
fields in the registration form. Omit one or more of these, see what
happens. Then fill in all the fields.
-
Logout.
Code: expo/JavaExpoBase.java
Code: expo/JavaExpo.java
Code: expo/JavaExpoLogin.java
Code: expo/JavaExpoLogout.java
Code: expo/JavaExpoRegister.java
-
-
Oscar 2001, Best Pictures
Invoke:
http://flyweight.cti.depaul.edu:9080/se452servlets/oscar.html
This servlet requires a database, which has to be created and intialized
first. The servlet works without change on different platforms with differnet
databases. It has been tested on:
-
Linux with Cloudscape 3.6
-
Windows with Access 97/2000
Steps to run this servlet:
-
Linux with Cloudscape
-
Create database.
-
Copy the file db.cloudscape.properties to
<your doc root>/WEB-INF/classes/db.properties
-
Change directory to <your doc root>/WEB-INF/classes/
-
Make sure that the Cloudscape .jar files are
in the classpath.
-
Run java db.OscarDB
-
Install cloudscape.jar in Tomcat.
-
Copy the file cloudscape.jar to the directory
<tomcat home>/lib/
-
Start Tomcat.
-
Invoke the servlet.
-
Windows 9x/NT/2000 with Access 97/2000
-
Set up ODBC data source.
-
Start Control Panel.
-
Double click on ODBC Data Sources (32 bit).
-
On ODBC Data Source Administrator panel, click on Add.
-
On Create New Data Source panel, select Microsoft Access Driver
(*.mdb), and click on Finish.
-
On ODBC Text Setup panel, fill in the Data Source Name. For
this servlet, the name should be Oscar.
Click on Create for a new database (or Select for an existing database).
-
On New Database panel, choose a file name, e.g,. Oscar.mdb.
Click on OK.
-
Back to ODBC Text Setup panel, click on OK.
-
Make sure that the new data source name appears in the ODBC Data Source
Administrator panel, and click on OK.
-
Create database.
-
Copy the file db.access.properties to
<your doc root>\WEB-INF\classes\db.properties
-
Change directory to <your doc root>\WEB-INF\classes\
-
Make sure that the Cloudscape .jar files are
in the classpath.
-
Run java db.OscarDB
-
Start Tomcat.
-
Invoke the servlet.
-
Windows with Cloudscape
-
Similar to using Cloudscape on Linux.
Code: db/Oscar.java
Code: db/OscarDB.java
-
Java Expo web app, version 2
Invoke: http://flyweight.cti.depaul.edu:9080/se452servlets/javaExpo2
You can invoke the actions through the menus on the left bar.
-
Login. Try one of these user
names and passwords. Enable
direct login.
-
Logout. Do not disable direct login.
-
Login again. You will not be prompted for user name and password. You are directly logged
in.
-
Logout again. This time, disable direct
login.
-
Login one more time. You will be prompted for user name and password.
-
Register. Fill out the registration form.
Submit the form.
-
Select presentations. After registration is confirmed, click
on the "Select presentation" button. A list of available presentations
will appear. Use the "add" and "remove" buttons in
front of each presentation to add or remove a presentation from the list
of presentations that you plan to attend.
Code: expo2/JavaExpoBase.java
Code: expo2/JavaExpo.java
Code: expo2/JavaExpoLogin.java
Code: expo2/JavaExpoLogout.java
Code: expo2/JavaExpoRegister.java
Code: expo2/JavaExpoPresentations.java
Code: expo2/menus.cfg
Code: expo2/passwd.cfg
Code: expo2/presentations.dat
-
Java Server Page examples
-
Java Server Page login examples
Mike Gehard (mgehard@cs.depaul.edu)
Updated on 08/15/2001