Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
139 views

Advanced Java Manual

This document outlines experiments for an Advanced Java Programming course, including experiments on JDBC, servlets, JSPs, design patterns, RMI, and networking. The experiments cover connecting to databases with JDBC, writing servlets that communicate with HTML pages and use different request methods, using JSP standard actions and expression language, implementing common design patterns in Java like singleton and factory, creating an RMI application to retrieve database results, and writing basic client-server applications with TCP sockets. References for further reading on servlets, JSPs, Java programming, and design patterns are also provided.

Uploaded by

Akash Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

Advanced Java Manual

This document outlines experiments for an Advanced Java Programming course, including experiments on JDBC, servlets, JSPs, design patterns, RMI, and networking. The experiments cover connecting to databases with JDBC, writing servlets that communicate with HTML pages and use different request methods, using JSP standard actions and expression language, implementing common design patterns in Java like singleton and factory, creating an RMI application to retrieve database results, and writing basic client-server applications with TCP sockets. References for further reading on servlets, JSPs, Java programming, and design patterns are also provided.

Uploaded by

Akash Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

B Tech 5th Semester (Information Technology)

IT-317 Advanced Java Pr


SOFTWARES:
Installation of JDK(1.7)
Eclipse IDE
Apache tomcat Server(7),
MySQL database
EXPERIMENT 1: (JDBC)
1. Write a java program that will connect to Microsoft Access database.
2. Write a java program that will connect to MySQL database
3. Write a JDBC Application to select values from table using prepared statement
4. Write a JDBC Application to find out all the tables in the database
5. Write a JDBC Application reading dates and null values from data base
6. Write a JDBC Application for SQL Procedure execution with both IN and OUT parameter
using callable statement.
7. Write a JDBC Application for SQL function execution using callable statement
EXPERIMENT 2: (SERVLETS)
1. Write a Servlet Program to print Hello World using HttpServlet class.(This program will
help to make the infrastructure required to compile & run the servlets/jsps programs ) Optional:
This program can be written using (i) By implementing Servlet interface (ii) By extending
GenericServlet class (iii) By extending HttpServlet class.
2. Write a Servlet program that will communicate with a HTML page. i.e. The servlet will take a
parameter from the HTML page(by form tag ) and process(print) that parameter. (HTMLServlet communication)
3. Write a Servlet program that will interact with a HTML page & a Model class. i.e. The servlet
will take a parameter from the HTML page(by form tag ) and process that parameter with the
help of the Model class. ({HTML, Model class }-to- Servlet communication )
4. Write a Servlet program that will interact with a HTML page, a Model class & a JSP page.
i.e. The servlet will take a parameter from the HTML page(by form tag ) and process that
parameter with the help of the Model class and forward the result to the JSP page for displaying.
({HTML, Model class , JSP}-to- Servlet communication) (complete MVC pattern)
5. Write a Servlet program that will demonstrate the usage of the following methods on a request
object: (i) getHeader() (ii) getMethod() (iii) getIntHeader() (iv) getCookies (v) getSession()
EXPERIMENT 3: ( MORE SERVLETS)
1. Write a Servlet program that will download the JAR file.
2. Write a Web Application that will demonstrate the usage of redirect the request Vs
dispatch the request .
3. Write a Web Application that will demonstrate the usage of : (i) servlet init parameters (ii)
context init parameters.

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.

Head First Servlets and JSP.


Deitel & Deitel, Java How to Programming, 3rd Edition ,Pearson Education.
Java Tutorials on: www.oracle.com.
Head First Design Patterns in java.

You might also like