CGS4854 Assignment 1
Due Thursday, 1/21.
You are to create a service oriented web site. You will be adding features
throughout the semester. The type of service that you provide is your choice.
For example, the site that was developed in the book kept track of a user's
hobby and aversion. Try to be creative in picking your site. There are already
enough book sellers on the web and one site that keeps track of hobbies is
enough. Choose a service that interests you.
Create a Web Application using NetBeans
-
Create a new web application in NetBeans, named your-username (replace
your-username with your user name).
-
Use the secure web.xml file.
-
Edit the tomcat users file so that
you can access your app.
-
Create a welcome page named index.jsp. Be sure it uses the
strict DOCTYPE.
-
Validate the JSP at http://www.w3c.org.
-
Restrict access to this web site to you and me (this is controlled by the
secure web.xml file)
-
Add a paragraph of at least four sentences that describes service that you
are providing.
-
Create a JSP similar to FormInitialised.jsp. Instead of the Hobby property
that is used in the book, use two properties of your choice. These
properties should be useful in the web site that you are developing.
-
Do not use first name and last name. Be creative.
-
Think of a web site that you would like to create and pick two properties
that are specific to that type of service. Imagine that you will be selling
things on your site that have many different prices.
-
Add a paragraph of at least two sentences that explains what the user must
do on this page and why they are doing it. This paragraph must be different
from the one in the index page.
-
Validate the JSP at http://www.w3c.org.
-
In the index.jsp page, add a relative hypertext link to your
JSP.
Configure the Tomcat server
-
Connect to ocelot
- Change the permission on the
~
folder to 705.
-
Edit the
.cshrc
file that is located in your home directory.
Add the following statement to the end of the file. Be sure to hit enter at the end of the line.
umask 072
- Log out and then log in again. This will implement the change you just made. From now on, all your folders and files should be created with the correct permissions.
-
Create and
validate your webapps
folder on ocelot and request your student host. You may use winscp to create the webapps. Use these step-by-step instructions to create the ROOT web app using winscp. Do similar steps to create the manager web app, but be sure to use the web.xml file for the manager.
-
Access the Tomcat server by using the student host that I send you:
http://student99.cgs4854.cs.fiu.edu:8008/
-
Access the manager application through the student host that I send you:
http://student99.cgs4854.cs.fiu.edu:8008/manager/html
Deploy the Web Application
-
In NetBeans, select Clean and Build to recreate all the files in your web
application. This will also create the WAR file for the web application.
-
Connect to
ocelot.aul.fiu.edu
using winscp (or another secure
shell telnet program). Your username is your panther mail and the password
is first initial, followed by panther id, followed by last initial.
-
Navigate to the cgs4854 directory on ocelot.
-
Navigate to the directory on your local machine that contains your NetBeans
project, then open the dist folder.
-
Copy the WAR file from your local machine to the cgs4854 directory
on ocelot. Do not copy the WAR file to the webapps folder.
-
Right click the name of the WAR file in the remote window of winscp. Select
Custom Commands and then Run. If the name of the war file is MyApp.war, then
enter the following command into the command box and hit enter. Replace
your-user-name with your user name. Replace MyApp.war with the name
of your war file.
unzip -o your-user-name.war -d webapps/your-user-name
Modify index.jsp in the ROOT Web Application
-
In winscp, navigate to the
cgs4854/webapps/ROOT
folder.
-
Create a file named index.jsp.
-
Enter all the HTML tags for a standard page.
-
Use the strict DOCTYPE.
-
Validate the page at http://www.w3c.org.
-
Add a relative hypertext link to your username web application. Remember
that
/
on Tomcat means webapps/ROOT
in the file
system and /username
means webapps/username
in
the file system.
-
Add a relative hypertext link to the manager application. The absolute
link to the manager is
http://student99.cgs4854.cs.fiu.edu:8008/manager/html
-
Add a paragraph of at least four sentences that describes your web site.
This paragraph must be different from the other two that you have created.
Access the Web Application
-
You should now be able to access the ROOT web application with
http://student99.cgs4854.cs.fiu.edu:8008/
-
From this page, you should have a link to the root of your username web
application.
-
After clicking the link, you should have a link to the JSP for this assignment.
-
You can also access the manager with
http://student99.cgs4854.cs.fiu.edu:8008/manager/html
-
Try stopping the username web application, then try to access the application
from the web. You will receive an error.
-
Next, try starting the username web application, then try to access the
application from the web. You should now have access.
Handing in the assignment
-
To hand in the assignment, zip your cgs4854 directory and upload
it via the web:
Submitting
homework on-line via the Web.
-
Please use the following command to compress your cgs4854 folder.
Change to your root directory on ocelot and issue the command
zip -r username cgs4854 -x \*.jar \*.zip \*.war
Replacing username with your user name.
-
If you have any other archived files in your directory, like .rar, or .ZIP,
or .WAR, please remove them before zipping.
-
Check the size of the ZIP file, it should be less than 1 MB. If it is not,
then you probably have another ZIP file stored in the ZIP archive. Delete
it and re-zip.
-
Use my uploading program from ocelot to upload the file.
~downeyt/cs/public/webftp/webftp.pl
-
Upload the file as binary.
-
Be sure that all your files and subdirectories are included in the zip
file.
After uploading, do not modify your files on ocelot until after your assignment
has been graded.