0
Assignment No. 03
 Spring 2015
CS506- Web Design and Development
Total Marks: 25
Due Date: 24/07/15
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit  if:
o        The assignment is submitted after due date.
o        The submitted assignment does not open or file corrupt.
o        The assignment is fully or partially copied from (other student or ditto copy from handouts or internet).
o        Student ID is not mentioned in the assignment File or name of file is other than student ID.

Uploading instructions

 
You have to upload only MS Word file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. Send following three things in a single Word File. (Servlet code, Deployment descriptor code and Screen shot of Web browser i.e. displaying required output).

Note: Use Apache Tomcat webserver and J2EE for development of Web Application (A video tutorial of installation and configuration of Apache Tomcat is given in course download section).  Following is the link.

Objective

The objective of this assignment is
o   Installation and configuration of Apache Tomcat web server
o   Creation of  web application by using Servlet
o   Understanding J2EE directory structure

Problem Statement:
You are required to develop a java Servlet program that read the Initialization Parameters (your name and VU ID) from deployment descriptor code (web.xml) and display it in the web browser.

Detailed Description:
Firstly install and configure the Apache Tomcat webserver on your system that will listen for client requests on Port No. 8080
For this purpose you have to set the following three environment variables.
·         JAVA_HOME variable
·         CATALINA_HOME variable
·         CLASSPATH variable

After installing the Apache Tomcat webserver, by setting the above three environment variable, you are required to test the Apache Tomcat Web Server, by typing the following URL in your browser

If you have correctly installed the web server then following page should be displayed in your web browser.
For creating the Web Application, firstly create the Standard Directory Structure of a J2EE that is required for creating Web Application. 
You are required to write a Servlet program that will read Initialization Parameters i.e. your name and your VUID from deployment descriptor code (web.xml) and display it in the web browser.
For creating a simple Web application you are required to perform the following steps on your system.

·         Install and configure the Apache Tomcat Webserver.
·         Create the Standard Directory Structure of J2EE.
·         Place all the required files in appropriated folders.
After performing the above three steps, when you type the following URL in web browser address bar.
As a result in web browser your name and VUID should be displayed as follows


Sample Output:
You have to send the following three things in assignment.
1.      Servlet program:
Write the Java Servlet source code file named, MyServlet by extending this class from HttpServlet. Your MyServlet program will read initial parameters (your name and VUID) from web.xml by overriding the init() method and ServletConfig object is used to read initialization parameters from Deployment Descriptor file (web.xml).
2.      Deployment Descriptor:
Write the code of XML file that define the two string initial parameters (your name and VUID)
To define the initial parameters <init-param> tag is used in .xml file. For each parameter you will need to define separate <init-param> tag that have two sub tags <param-name> and <param-value>, which contain the name and values of the parameter respectively.
3.      Screen shot of web browser:
A screen shot of web browser. It should display your name and VUID. Secondly following URL should be displayed in the address bar of Web Browser window.
At the end of URL there should be your VUID, as described above.
Note: You can get the screen shot of any active window by pressing Alt+PrtScn key.
Note: you are required to send above three things in a single Word File. i.e. (Servlet code, Deployment descriptor code and Screen shot of Web browser i.e. displaying required output).
Deadline: Your assignment must be uploaded/submitted at or before.24/07/15. No assignment would be accepted through email. For any query about the assignment, contact at cs506@vu.edu.pk





For video help watch
Soolution:




Post a Comment

Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.

Friday, July 24, 2015

cs506 assignment 3 solution

Assignment No. 03
 Spring 2015
CS506- Web Design and Development
Total Marks: 25
Due Date: 24/07/15
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit  if:
o        The assignment is submitted after due date.
o        The submitted assignment does not open or file corrupt.
o        The assignment is fully or partially copied from (other student or ditto copy from handouts or internet).
o        Student ID is not mentioned in the assignment File or name of file is other than student ID.

Uploading instructions

 
You have to upload only MS Word file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. Send following three things in a single Word File. (Servlet code, Deployment descriptor code and Screen shot of Web browser i.e. displaying required output).

Note: Use Apache Tomcat webserver and J2EE for development of Web Application (A video tutorial of installation and configuration of Apache Tomcat is given in course download section).  Following is the link.

Objective

The objective of this assignment is
o   Installation and configuration of Apache Tomcat web server
o   Creation of  web application by using Servlet
o   Understanding J2EE directory structure

Problem Statement:
You are required to develop a java Servlet program that read the Initialization Parameters (your name and VU ID) from deployment descriptor code (web.xml) and display it in the web browser.

Detailed Description:
Firstly install and configure the Apache Tomcat webserver on your system that will listen for client requests on Port No. 8080
For this purpose you have to set the following three environment variables.
·         JAVA_HOME variable
·         CATALINA_HOME variable
·         CLASSPATH variable

After installing the Apache Tomcat webserver, by setting the above three environment variable, you are required to test the Apache Tomcat Web Server, by typing the following URL in your browser

If you have correctly installed the web server then following page should be displayed in your web browser.
For creating the Web Application, firstly create the Standard Directory Structure of a J2EE that is required for creating Web Application. 
You are required to write a Servlet program that will read Initialization Parameters i.e. your name and your VUID from deployment descriptor code (web.xml) and display it in the web browser.
For creating a simple Web application you are required to perform the following steps on your system.

·         Install and configure the Apache Tomcat Webserver.
·         Create the Standard Directory Structure of J2EE.
·         Place all the required files in appropriated folders.
After performing the above three steps, when you type the following URL in web browser address bar.
As a result in web browser your name and VUID should be displayed as follows


Sample Output:
You have to send the following three things in assignment.
1.      Servlet program:
Write the Java Servlet source code file named, MyServlet by extending this class from HttpServlet. Your MyServlet program will read initial parameters (your name and VUID) from web.xml by overriding the init() method and ServletConfig object is used to read initialization parameters from Deployment Descriptor file (web.xml).
2.      Deployment Descriptor:
Write the code of XML file that define the two string initial parameters (your name and VUID)
To define the initial parameters <init-param> tag is used in .xml file. For each parameter you will need to define separate <init-param> tag that have two sub tags <param-name> and <param-value>, which contain the name and values of the parameter respectively.
3.      Screen shot of web browser:
A screen shot of web browser. It should display your name and VUID. Secondly following URL should be displayed in the address bar of Web Browser window.
At the end of URL there should be your VUID, as described above.
Note: You can get the screen shot of any active window by pressing Alt+PrtScn key.
Note: you are required to send above three things in a single Word File. i.e. (Servlet code, Deployment descriptor code and Screen shot of Web browser i.e. displaying required output).
Deadline: Your assignment must be uploaded/submitted at or before.24/07/15. No assignment would be accepted through email. For any query about the assignment, contact at cs506@vu.edu.pk





For video help watch
Soolution:




No comments:

Post a Comment