Gujarat Technological University
Gujarat Technological University
With effective
Syllabus for Master of Computer Applications, 2nd Semester from academic
Subject Name: Java Web Technologies year 2020-21
Subject Code: 629408
1. Learning Objectives:
To learn and work with the web components of Java EE. i.e. the Servlet
specification.
Student will be able to learn MVC architecture and develop dynamic web
application using Java Servlet and Java Server Pages technology.
3. Contents:
Weightage
Unit Course Content Percentage
Unit I Servlet Basics, Handling the Client Request: Form Data, HTTP 20%
Request Headers
Servlet Basics, Basic Servlet structure, Servlets Generating text/html
content, Packaging Servlets, The servlet life-cycle. Handling Client
Request Form Data, Reading Form Data from Servlets, Handling
Client Request: Reading Request Headers, Understanding HTTP/1.1
Request Headers: Changing the page according to how the user got
there and accessing the Standard CGI Variables.
Unit II Server Response, HTTP Status Codes, HTTP Response Headers, 20%
Handling Cookies and Session Tracking
Specifying Status Codes, HTTP / 1.1 Status Codes, Using
Redirections, HTTP Response Headers: Setting Response Headers
from Servlets, Understanding HTTP / 1.1 Response Headers, Using
Servlets to Generate JPEG Images, Handling Cookies: Remembering
Usernames and Passwords, Deleting Cookies, Sending and Receiving
Cookies, Using Cookie Attributes, Differentiating Session Cookies
from Persistent Cookies, Using Cookies to Remember User
Preferences, Session Tracking: Need for Session Tracking, Session
Tracking API, Encoding URLs Sent to the Client and accumulating a
List of User Data.
Unit III Listeners and Filters 10%
Using ServletContextListener, HttpSessionListener, Understanding of
all the other Listeners viz. ServletRequestListener,
ServletContextAttributeListener, ServletRequestAttributeListener,
HttpSessionAttributeListener.
Using Filters for pre and post processing of request.
Unit IV Overview of Java Server Pages, Java Code with JSP Scripting, 20%
JSP Page Directives, Files and Applets in JSP and Java Beans
Components in JSP
JSP Basic Syntax, HTML Text, HTML comments, Template Text,
JSP Comment, JSPExpression, JSP Scriptlet, JSP Declaration, JSP 08
Directives, JSP Action, JSP Expression Language Element, Custom
Tag (Custom Action), Escaped Template Text, Using JSP Scripting
Elements, Using Predefined Variables, XML syntax for Expressions,
Scriptlets, Declarations and Directives, Using Scriptlets, Using
Declarations, Using Page Directive, Using Standard Actions
Tags<jsp:plugin>, <jsp:forward>, <jsp: include>,
Page no. 1 of 4
GUJARAT TECHNOLOGICAL UNIVERSITY
With effective
Syllabus for Master of Computer Applications, 2nd Semester from academic
Subject Name: Java Web Technologies year 2020-21
Subject Code: 629408
4. Text Book(s):
Marty Hall, Larry Brown, “Core Servlets and Java Server Pages Volume – 1”,
Pearson Education, 2nd ed. (2004)
Marty Hall, Larry Brown, Yaakov Chaikin, “Core Servlets and Java Server Pages
Volume – 2”, Pearson Education, 2nd ed. (2004)
5. Reference Books:
Black Book “Java server programming” J2EE, 1st ed., Dream Tech Publishers, 2008.
Subrahmanyam Allamaraju, Cedric Buest, Professional Java Server Programming,
Wiley Publication
Pravin Jain, The Class of Java, Pearson
Christian Bauer, Gavin King , Java Persistence with Hibernate, MANNING
Giulio Zambon, Beginning JSP, JSF and Tomcat, Apress
Cay S. Horstmann, “Core Java , Volume I – Fundamentals”, Pearson
Education , 10th Edition, 2017
Cay S. Horstmann, “Core Java , Volume II – Advanced Features”,
Pearson Education , 10th Edition, 2017
Cay Horstmann and Gary Cornell, Core Java, Volume II: Advanced Features, Pearson
Publication
James Keogh ,Complete Reference J2EE, McGraw-Hill publication
Web Resources
http://docs.oracle.com/javaee/6/tutorial/doc/bnafd.html
Page no. 2 of 4
GUJARAT TECHNOLOGICAL UNIVERSITY
With effective
Syllabus for Master of Computer Applications, 2nd Semester from academic
Subject Name: Java Web Technologies year 2020-21
Subject Code: 629408
(only 8.1, 8.3, 8.4, 8.6, 8.7, 8.11), Chapter 9 (only 9.1, 9.3, 9.5, 9.7)
III 2 Chapters 5, 6
IV 1 Chapters 10 (only 10.6), 11, 12, 13, 14
V 1 Chapters 15, 16, 17
VI 2 Chapters 3 (3.1 to 3.5), 4 (4.1 to 4.5)
7. Accomplishments
Students will understand advanced concepts related to MVC architecture, web services,
servlet, spring and Hibernate. Students will be able to develop dynamic web applications
using Java technology without need of other's help.
Practical List
1. Write a Servlet to display “Hello World” on browser.
2. Write a Servlet to display all the headers available from request.
3. Write a Servlet to display parameters available on request.
4. Write a Servlet to display all the attributes available from request and context.
5. Write a Servlet which displays a message and also displays how many times the
message has been displayed (how many times the page has been visited).
6. Assume that we have got three pdf files for the MCA-1 Syllabus, MCA-2 Syllabus
and MCA-3 Syllabus respectively, now write a Servlet which displays the appropriate
PDF file to the client, by looking at a request parameter for the year (1, 2 or 3).
7. Assume that the information regarding the marks for all the subjects of a student in
the last exam are available in a database, develop a Servlet which takes the
enrollment number of a student as a request parameter and displays the marksheet for
the student.
8. Develop a Servlet which looks for cookies for username and password, and forwards
to a home.jsp in case the cookies are valid and forwards to login.jsp, in case the
cookies are not found or the cookies are not valid.
9. Write a servlet to implement Session tracking using all four methods.
10. Develop a Servlet to authenticate a user, where the loginid and password are available
as request parameters. In case the authentication is successful, it should setup a new
session and store the user's information in the session before forwarding to home.jsp,
which displays the user's information like full name, address, etc.
11. Write a simple JSP page to display a simple message (It may be a simple html page).
12. Write a JSP page, which uses the include directive to show its header and footer.
13. Create a listener that notifies (through System. Out) whenever a user adds a product
to a shopping cart (i.e. adds an object to the session object) or removes it again. Hint:
check out the class HttpSessionAttributeListener. Make it print the name and price of
the object (hint: access the session through the HttpBindingEvent object). Also, let
the listener print the total price of all objects saved in the session so far (one way to
accomplish this could be to keep a collection of all objects saved to the session – or
just their keys – in the listener or an associated class).
14. Create a servlet filter that logs all access to and from servlets in an application and
prints the following to System. Out:
1. the time the request was received
1. the time the response was sent
1. how much time it took to process the request
Page no. 3 of 4
GUJARAT TECHNOLOGICAL UNIVERSITY
With effective
Syllabus for Master of Computer Applications, 2nd Semester from academic
Subject Name: Java Web Technologies year 2020-21
Subject Code: 629408
1) Develop an interest calculation application in which user will provide all information in
HTML form and that will be processed by servlet and response will be generated back to
the user.
2) Develop an application to demonstrate how the client (browser) can remember the last
time it visited a page and displays the duration of time since its last visit. (Hint: use
Cookie)
3) Develop an application to keep track of one user across several servlet invocations
within the same browser session.
4) Develop an application to write a "page-composite" JSP that includes other pages or
passes control to another page. (Hint: Use <jsp:include> or <jsp:forward>).
5) You want to reduce the amount of Java coding in your JSP using a JavaBean
component. (Hint: Use <jsp:useBean> with the name of your bean).
6) Write a JSP page which uses tags available from the standard tag library JSTL.
7) Update the JSP page from above exercise to use tags available from the standard tag
library JSTL.
8) Develop a JSP Page to display the personal information and result information of the
student in two different tabular formats.
9) Create the filter that can add the time at which above jsp file called with appropriate
message.
10) Design a Listener that loads the name of company as an init-parameter in context.
Use this name on the JSP – product.jsp and contactus.jsp of the website. (HINT:
Implement ServletContextListener interface)
11) Create a filter to maintain the log of suspicious access of a particular JSP.
Access to the JSP on Sundays is suspicious.
Also design the JSP for the application. The JSP should display the details about sales
history of the company for past 7 years.
The output should be shown in excel format.
12) Design an application where a user enters username and password, and requests for a
servlet. Use filter to validate the password use database. If password is valid servlet is
given as response, otherwise give appropriate message through filter.
13) Develop a program to perform the database driven operation like insert, Delete,
Update and select. To perform the above operations, create one table named Employee.
Field Name Field Type
EmpId Integer
Empname Varchar
Emp_desig Varchar
Emp_J_Date Varchar
Emp_Salary Numeric
14) Write a Java application to invoke a stored procedure using a CallableStatement. For
this a stored procedure called increment Salary may be developed to increase all the
employees salary by a percentage specified in the parameter.
15) Write a Servlet which uses the concept of Request forwarding & including external
source in the current servlet context.
16) Write a JSP Page to which uses Session Tracking for online shopping.
Page no. 4 of 4