Advanced Java Manual
Advanced Java Manual
4. Write a Servlet program that will demonstrate the usage of the ServletContextListener
Optional: The Servlet program can be written for various other listeners such as: (i)
ServletRequestListener (ii) ServletRequestAttributeListener (iii) ServletContextAttributeListene
(iv) HttpSessionListener (v) HttpSessionAttributeListener etc
5. Write a Servlet program that will demonstrate the usage of session handling.
EXPERIMENT 4: ( JSPs-1)
1. Write a JSP program that will demonstrate the simple usage of the following jsp elements:
(i) scriptlet (ii) expression (iii) declaration.
2. Write a JSP program that displays how many times its been accessed? (i) By using only
scriptlet (ii) By using declaration
3. Write a JSP program that will demonstrate the simple usage of the page directive with
import attribute.
4. Write a JSP program that will demonstrate how to configure the init parameters to a jsp.
5. Write a JSP program that will demonstrate the usage of overriding the jspInit() method.
6. Write a JSP program that will demonstrate the usage of setting/getting attributes from the
following implicit objects: (i) application (ii) request (iii) pageContext
7. Write a JSP program that will demonstrate the usage of <scripting-invalid> & <el-ignored>
tags.
8. Write a JSP program that will demonstrate the usage of the page directive with isELIgnored
attribute.
EXPERIMENT 5: ( JSPs-2)
1. Write a JSP program that will demonstrate the usage of the <jsp:useBean> ,
<jsp:getProperty> & <jsp:setProperty> standard actions with various attributes such as id,
class , scope, type, param.
2. Write a JSP program that will demonstrate the usage of Expression Language(EL) with both
operators . and [].
3. Write a JSP program that will get cookies and context init parameter using ELs implicit
objects cookie & initParam.
4. Write a JSP program that will simulate roll dice using EL function call. The following steps
are needed for this program:
Step I: Write a Java class with a public static method.
Step II: Write a Tag Library Descriptor (TLD) file.
Step III: Put a taglib directive in your JSP.
Step IV: Use EL to invoke the function .
5. Write a JSP program that will demonstrate the usage of Expression Language (EL) with
Arithmetic, logical and Relational operators.
6. Write a JSP program that will demonstrate the usage of include directive.
7. Write a JSP program that will demonstrate the usage of <jsp:include> standard action.
8. Write a JSP program that will demonstrate the usage of <jsp:forward> standard action.
EXPERIMENT 6: ( JSPs-3)
1. Write a JSP program that will demonstrate the usage of following tags from the JSTL:
(i) <c:forEach> (ii) <c:if> (iii) <c:set> (iv) <c:import> (v) <c:url>
2. Write a web application that will demonstrate the configuration of error pages in DD by using
<error-page> tag.
3. Write a JSP program that will demonstrate the usage of the page directive with isErrorPage
attribute.
4. Write a JSP program that will demonstrate the usage of an extra implicit object excepton
with a error page.
5. Write a JSP program that will demonstrate the usage of the a tag library that is not from the
JSTL.
EXPERIMENT 7: (Design Patterns in java)
1. Write a program to implement the Singleton Design Pattern .
(i) By Eager Initialization
(ii) By Lazy Initialization
2. Write a program to implement the Factory Design pattern & Abstract Factory Design Pattern.
3. Write a program to implement the Adaptor Design Pattern .
4. Write a program to implement the Decorator Design Pattern.
EXPERIMENT 8: (RMI)
1. Write a Program for RMI Application
2. Write an RMI Application for invoking the data base to retrieve the results.
EXPERIMENT 9: (NETWORKING)
1. Write a Client/Server Application using stream sockets
2. Write a Client /Server Application using datagram sockets
REFERENCES:
1.
2.
3.
4.