Homework 5
Exercise 1: Create your own customized JSP tag.

The Server I used for homweork 5 was crestone.uccs.edu

Made Changes to ~/.bashrc

=================================================================
Added To PATH: 
/users/server/students/cs526/public_html/java/j2sdk1.4.1_01/bin
/users/server/students/cs526/public_html/tomcat/jakarta-ant-1.5.1/bin

JAVA_HOME=/users/server/students/cs526/public_html/java/j2sdk1.4.1_01
ANT_HOME=/users/server/students/cs526/public_html/tomcat/jakarta-ant-1.5.1

export USERNAME JAVA_HOME ANT_HOME BASH_ENV PATH
==================================================================


After installing tomcat, the following changes were made to:	
	"conf/server.xml"
	
	Port Number: Last 3 digits of SSN = 283
	Server shutdown Port: 8285 (default = 8005)
	Coyote HTTP Connector Port: 8283 (default = 8080)
	Coyote AJP Connector Port: 8289 (default = 8009)

Click here to view modified server.xml

Added "manger" and "admin" role to 
	"conf/tomcat-users.xml"
	
Click here to view modified tomcat-users.xml

Started Tomcat Server:
cd /users/server/students/gawillia/public_html/cs526/tomcat/jakarta-tomcat-4.1.12/bin
./startup.sh
	
Created my own customized JSP tag as per Homework Instructions:
View or Download Source Code in:
/users/server/students/gawillia/public_html/cs526/tomcat/jakarta-tomcat-4.1.12/webapps/cs526/
-------------------------------------------------------
hw5/build.xml
hw5/src/edu/uccs/cs526/Hw5.java
hw5/web/hw5.jsp
hw5/web/WEB-INF/hw5-taglib.tld
hw5/web/WEB-INF/web.xml
hw5/web/WEB-INF/lib/mysql-connector-java-2.0.14-bin.jar
-------------------------------------------------------

Compiled and installed the application:
Ant Output:
----------------------------------------------------
[gawillia@crestone hw5]$ ant
Buildfile: build.xml

prepare:
    [mkdir] Created dir: /.automount/cs/root/usr2/students/gawillia/public_html/
cs526/tomcat/jakarta-tomcat-4.1.12/webapps/cs526/hw5/build
    [mkdir] Created dir: /.automount/cs/root/usr2/students/gawillia/public_html/
cs526/tomcat/jakarta-tomcat-4.1.12/webapps/cs526/hw5/build/WEB-INF
    [mkdir] Created dir: /.automount/cs/root/usr2/students/gawillia/public_html/
cs526/tomcat/jakarta-tomcat-4.1.12/webapps/cs526/hw5/build/WEB-INF/classes
     [copy] Copying 4 files to /.automount/cs/root/usr2/students/gawillia/public
_html/cs526/tomcat/jakarta-tomcat-4.1.12/webapps/cs526/hw5/build

compile:
    [javac] Compiling 1 source file to /.automount/cs/root/usr2/students/gawilli
a/public_html/cs526/tomcat/jakarta-tomcat-4.1.12/webapps/cs526/hw5/build/WEB-INF
/classes

BUILD SUCCESSFUL
Total time: 5 seconds
[gawillia@crestone hw5]$ ant install
Buildfile: build.xml

prepare:

compile:

install:
  [install] OK - Installed application at context path /cs526hw5

BUILD SUCCESSFUL
Total time: 5 seconds
[gawillia@crestone hw5]$
----------------------------------------------------

Login to Tomcat manager: http://crestone.uccs.edu:8283/manager/html
Username: tomcat Password: tomcat

Screen Shots:

Removed password from Hw5.java and performed Ant Cleanup. Ant Output: ---------------------------------------------------- [gawillia@crestone hw5]$ ant clean Buildfile: build.xml clean: [delete] Deleting directory /.automount/cs/root/usr2/students/gawillia/public _html/cs526/tomcat/jakarta-tomcat-4.1.12/webapps/cs526/hw5/build BUILD SUCCESSFUL Total time: 5 seconds [gawillia@crestone hw5]$ ---------------------------------------------------- Shutdown Tomcat Server: cd /users/server/students/gawillia/public_html/cs526/tomcat/jakarta-tomcat-4.1.12/bin ./shutdown.sh

Exercise 2: XML/DTD/XSL
purchase.xml
purchase.dtd
purchase.xsl
Check validity of an XML document
checkxml.sh output:
----------------------------------------------------
[gawillia@cs xml4j_2_0_6]$ ./checkxml.sh ../purchase.xml
../purchase.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml:stylesheet type="text/xsl" href="purchase.xsl" ?>
<purchase>
        <customerName>CCL</customerName>
        <customerID>111222333</customerID>
        <item>
                <productID>309121544</productID>
                <unitPrice>5000</unitPrice>
                <subTotal>500000000000</subTotal>
        </item>
        <item>
                <productID>309121538</productID>
                <unitPrice>200</unitPrice>
                <subTotal>200777777770</subTotal>
        </item>
        <totalAmount>700777777770</totalAmount>
</purchase>
----------------------------------------------------