0% found this document useful (0 votes)
40 views2 pages

JT Practical List

This document outlines a practical list of 6 Java programming labs aimed at introducing students to key Java technologies including: 1. Netbeans IDE, object-oriented programming concepts, and JDBC for database connectivity. 2. Advanced JDBC methods and basic servlet programming. 3. Additional servlet programming concepts like request parameters and hit counters. 4. Servlet request delegation, JSP scripting elements, and building login and file download applications. 5. Building applications with servlets and JSPs to display lists and perform file downloads. 6. Using JSP actions like <jsp:useBean>, listeners for hit counting, and request logging.

Uploaded by

Bhaumik Joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

JT Practical List

This document outlines a practical list of 6 Java programming labs aimed at introducing students to key Java technologies including: 1. Netbeans IDE, object-oriented programming concepts, and JDBC for database connectivity. 2. Advanced JDBC methods and basic servlet programming. 3. Additional servlet programming concepts like request parameters and hit counters. 4. Servlet request delegation, JSP scripting elements, and building login and file download applications. 5. Building applications with servlets and JSPs to display lists and perform file downloads. 6. Using JSP actions like <jsp:useBean>, listeners for hit counting, and request logging.

Uploaded by

Bhaumik Joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Java Technology

Practical List

Last updated on 21/01/2019

Lab Aim Hours


1 Introduction to Netbeans IDE and JDBC 2
1. Create a Java application consisting of the following components:
a. Student class with private data members: int id, String name, double cpi. Default
constructor, parameterized constructor, getter-setter methods and toString method.
b. DemoStudent class has main method to create various Student objects
 Using command-line-argument
 Taking input from user at runtime
2. Write a Java application to fetch student registration information (like firstName, lastName,
branch, username and password) from database using JDBC. (Using Statement object)

2 Working with JDBC and Servlets 2


1. Write a Java application to fetch records of student registration and practice the use of the
following methods of ResultSet interface: absolute(), afterLast(), beforeFirst(), first(),
isFirst(), isLast(), last(), previous(), next(), relative()
2. Write a servlet that displays a hello message on the browser.
3 Working with Servlets 2
1. Write a servlet to display the initialization (servlet and context) parameters.
2. Write a servlet to display the request headers.
3. Write a servlet which registers and displays the number of hits made by clients since that
servlet has been deployed.
4 Working with Servlets (delegating the request) and JSP 2
1. Write a Java web application for a login module which contains the following components:
 index.html : for getting input from the user.
 ValidateServlet.java : a servlet class for validating the user. If it is a valid user
(validate from database using PreparedStatement), it will forward the request to the
welcome servlet. If user is not validated then it displays Error message along with the
response from index.html.
 WelcomeServlet.java : a servlet class for displaying the welcome message.

2. Write a Java web application to search a word or phrase on Google search engine. The
application should have following components:
 Search.html: It contains a textbox to accept search word or phrase from user.
 SearchOnGoogleServlet.java: It should redirect the search query to Google search
engine.
3. Write a Java web application to demonstrate usage of JSP Scripting Elements (Scriptlet,
Expression, Delaration) and JSP implicit objects (out, request, response.)
Use method post to submit a feedback form (html) (Full Name, Email, Subject,
Message)to a jsp page and let jsp page preview the same as confirmation page with
additional text “Feedback received. Thank you.”.
5 Working with Servlets and JSP 2
1. Write a web based Java application which allows the user to download a file from the list of
available files. The application has two components as follow:
 FileList.html: It displays a list of files to the user to choose a file to download.
 FileDownloadServlet: It takes the user‟s choice for a file to be downloaded and sends
that file in response to the user.
2. Given a design goal below, write a web based application using the following standard
actions: jsp:useBean (with attributes:„id‟, „scope‟, „type‟, and „class‟), jsp:getProperty to
display final results.
Components identified as follow.: Movie.java, Genre.html, ControllerServlet and
DisplayMovieList.jsp
 Movie.java provides a bean/class data members, accessors, mutators, toString, default
and parameterized constructor as required.
 Genre.html provides a list of movie genres to the user to choose from. Send the chosen
genre as request parameter to ControllerServlet.
 ControllerServlet contains a list of movies according to genre. Set a request scope
attribute “mymovies” with the array of movies of the chosen genre. Forward the request
to DisplayMovieList.jsp
 DisplayMovieList.jsp displays the names of movies by getting them from the attribute
“mymovies”.
6 Working with JSP and Listeners 2
1. Write a web based java application containing a JSP which performs the simple arithmetic
calculation for given arguments and operator. Write your JSP code using jsp:useBean
action tag.
2. Write a web based Java application which registers and displays the number of hits made by
clients since that application has been started by container. [Use ServletContextListener] .
3. Write a web based Java application which logs the request creation and its destruction.

You might also like