Site hosted by Angelfire.com: Build your free website today!
  
CIS 404 - Advanced Java - Assignments - Sudip Shrestha
Week1-Homework
Homework For Applications, Layouts, and Components.
This Database Browser UI is a swing application. The homework statement can be found here.
Week2-Homework
Database Hookup Project.
The Database Browser from previous project is hooked up to the provided -Week2-Database. The homework statement can be found here. Use 'MyDSN' for your DSN name when setting an ODBC System Data Source Name for a MS Access file.
Week3-Homework
Servlets Programming.
This servlet reads the http parameter (it must be a web site) and reads the contents of the web-site and sends it to the browser, while it writes the site name to a text file and also reads it back from the browser as well. type something like this on the browser "http://localhost:8080/servlet/ServletsSiteReader?site=http://www.yahoo.com". The homework statement can be found here.
Week4-Homework
Servlets Programming.
This is a Servlet that posts to itself and saves the data to a random access file. The Servlet is a Guest Book that reads and writes data to r.a. file in a sequence of bytes at the current position of the file pointer. It writes data to the text file in a prefixed size of byte array. Make sure that all the three files in this zipped bundle are in the same directory, i.e. at /Tomcat4/webapps/ROOT/Web-inf/classes/. The homework statement can be found here.
Week5-Homework
Servlets Programming.
Slight modification on Previous assignment. 'formPost2' servlet is remapped to /lesson5. Put the web.xml file in WEB-INF directory. Server.xml goes int conf directory of Tomcat4: Here, configuration parameters for a new virtual directory called less5 is created. After putting the 'formPost2.class' file with 'HTMLdata.txt' and 'LocalString.properties' (in the zip file) in the classes directory under /Tomcat4/webapps/ROOT/Web-inf/, call the servlet with the following mapped address: "http://localhost:8080/lesson5". The homework statement can be found here.
Week6-Homework
Servlets Programming.
Previous Assignment modified so that data is saved to a MS ACCESS Database. The DSN name is java and should be mapped to database 'javadb2000.mdb'. This servlet creates a table named "GUESTBOOK" in the datbase, if not already created. Download the .war file and call it with an address such as: "http://localhost:8080/shresthaSudip/servlet/formPost3". The servlet will insert the data into the database-table as well as the display all the data from it. The war file contains the source 'formPost3.java' inside 'classes' directory as well. The homework statement can be found here.
Week7-Homework
Java Server Pages and ODBC Connection.
Previous Assignment modified such that the Guestbook now uses a JSP page to save the data to the database with DSN name of 'java'. Either use the Access file provided with this .war file and map it with the DSN name of 'java', or create a new table with a name 'GUESTBOOK05' in your existing Access file of DSN name 'java'. Download the .war file to /Tomcat4/webapps/ directory and type the following url at the address bar of the browser. "http://localhost:8080/shresthaSudip/formPost5.jsp".
Additionally, there is a another jsp file that saves the data to the text file using Random Access API. For this one, type "http://localhost:8080/shresthaSudip/formPost5.jsp".
The homework statement can be found here.
Week8-Homework
Java Server Pages and ODBC Connection using Java Beans.
Previous Assignment modified so that the JSP provides the interface, and it uses java beans for the logic. The sessions directory under /Tomcat4/Webapps/shresthaSudip/WEB_INF/classes/ contains 'connectODBC class' which processes the formPost6.jps file. Again, the DSN has to be 'java' and the table name is 'GUESTBOOK06'. The database provided with the .war file has a .mdb file with a table with such a name.
Download the .war file to /Tomcat4/webapps/ directory and type the following url at the address bar of the browser. "http://localhost:8080/shresthaSudip/formPost6.jsp".
The homework statement can be found here.
Week9-Homework
Java Server Pages and ODBC Connection using JSP Taglibs.
Previous Assignment once again modified so that the JSP uses the dbTags for ODBC connection and utlity Tags for verification of the form input parameters. Again, the DSN has to be 'java' and the table name is 'GUESTBOOK07'. The database provided with the .war file has a .mdb file with a table with such a name.
Download the .war file to /Tomcat4/webapps/ directory and type the following url at the address bar of the browser. "http://localhost:8080/shresthaSudip/formPost7.jsp".
The homework statement can be found here.
Week10-Homework
Java Server Pages and ODBC Connection using JSP Taglibs With Custom Tags.
Previous Assignment once once again modified so that custom Tags are used to send appropriate messages to the .jsp page if invalid form inputs are obtained. Again, the DSN has to be 'java' and the table name is 'GUESTBOOK08'. The database provided with the .war file has a .mdb file with a table with such a name.
Download the .war file to /Tomcat4/webapps/ directory and type the following url at the address bar of the browser. "http://localhost:8080/shresthaSudip/formPost8.jsp".
The homework statement can be found here.
Week11-Homework                  3 MySQL databases-zipped bundle
ODBC Connection to MySQL databases.
Previous Assignment once once again modified so that the data is saved to a MySQL database named "java".
Also, Duke's Bookstore is modified so that it reads the books' list from a MySQL database named "bookDetails", and saves the customer order to another MySQL database named "custOrder".
Make sure to download the accompanied database files and extract to your X:\mysql\data\ folder: it consists three databases, i.e. java, bookDetails, custOrder.
Download the .war file to /Tomcat4/webapps/ directory,
and type the following url at the address bar of the browser: "http://localhost:8080/shresthaSudip/formPostF.jsp". for guest book and,
"http://localhost:8080/shresthaSudip/bookstore.html". for bookstore
The homework statement can be found here.