Java Assignment 1
Java Assignment 1
DEPT TABLE:
Field Type Null Key Default
Deptno int(2) NO PRI 0
Dname varchar(14) YES (NULL)
Loc varchar(13) YES (NULL)
STUDENT TABLE:
Field Type Null Key Default
Rno int(2) NO PRI 0
Sname varchar(14) YES (NULL)
City varchar(20) YES (NULL)
State Varchar(20) YES (NULL)
EMP_LOG TABLE:
Field Type Null Key Default
Emp_id int(5) NO (NULL)
Log_date Date YES (NULL)
New_salary Int(10) YES (NULL)
Action Varchar(20) YES (NULL)
• Write a Java program to fetch data from web.xml to Servlet using ServletConfig.
• Write a Java program to fetch data from web.xml to Servlet using ServletCotext.
• Write a Java program to submit student information (fname, lname, email, mobile,
gender, password) using jsp form to servlet. Fetch data at servlet and print all the
data in console.
• Write above Java program and print fetched data on another jsp using expression
language.
• Write a Java program to fetch all the data from database table and print on jsp page
using JSTL SQL tag library.
• Write a Java program to validate jsp form server side.
First Name: Only Alphabets Last Name: Only Alphabets Mobile: Only 10 Numbers
Email: Standard Email Id
Password: Minimum One 1 Upper, Minimum 1 Lower, Minimum 1 Digit, Minimum
1 Special Character from @, #, $, %, _, & I2. Write CRUD operation using jsp only.
• Write a jsp/servlet CRUD operation for following.
Student:
a. Int id;(primary key, Auto Increment)
b. String fname, lname, email, mobile, gender, password;
c. Need to use bootstrap responsive template for the same.
d. Use client side validation to for all data input.
e. Use regular expression for email for standard email input.
f. Use regular expression for password like(Test@123)
g. Use server side validation (Filter) same as client side validation.
h. All the inserted data should be show in show.jsp with edit and delete functionality.
i. Store all the deleted record in table named deleted data.
• Write a Java dynamic application “Message Passing System “using MVC and
JDBC.
User:
Int uid ;( primary key, auto increment)
String fname, lname, email, mobile; Message:
Int uid;
String from, to, msg;
Create one registration form to register user.
i. Do client and server side validation. o Use AJAX to register with unique
email id.
ii. After successful registration confirmation email should be sent to user’s
email id with one OTP.
iii. Verify OTP and then and then allowed to login to the user. o After
successful login user can edit their profile.
iv. Also one user can send some msg to another user using their email id.
v. When another user logged in they are able to see msg sent by a particular
user and also can reply.
vi. Logout button is there to invalidate session.
vii. Also take care when user logged out and press back button on browser then
it should be in logged out mode.
• W.A.J.P to insert below data from jsp to MySQL database using “. cfg.cml” and “.
hbm.xml” file. Variable id must be primary key and auto increment
Int id
String first name, last name, email, mobile, password, gender
• W.A.J.P using above configuration with annotation and also show login jsp after
data insert or registration.
• Write above Java program for after successful registration student can login and if
login credentials are correct then show student’s home page with his/her detail.
• Write above Java program for after successful login student can able to view and
edit his/her profile with logout option. Also need to upload and show student’s
picture on his/her profile’s home page.
All the Questions Below Need to Perform Using Some Bootstrap
Design Templates “
• Write a program to establish One to One Relationship between given 2 classes and
perform a CRUD operation.
Student:
Int studentId; String studentName; Address; Address: Int addressId;
String street, city, state, zip code;
• Write a program to establish one to many and Many to One relationship between
given 2 classes and perform a CRUD operation.
Cart:
int cartId; double total;
String name; Set<Item> items;
Items:
Int id;
String itemId;
Double itemTotal;
Int quantity;
Cart cart;
• Write a program to establish many to many relationships between given 2 classes
and perform a CRUD operation.
Reader:
Int readerId;
String email, firstName, lastName;
Set<Subscription> subscriptions; Subscription: Int subscriptionId;
String subscriptionName; Set<Reader> readers;
Module – 5 (Rest Framework)
• Write a program to demonstrate the setter based dependency injection.
• Write a program to demonstrate the constructor based dependency injection.
• Write a program to demonstrate the object based dependency injection and also
implement inner bean concept in your spring beans configuration file.
• Write a program to collect 5 student information using spring collection(List) in
spring bean configuration file.
Student:
Int id;
String fname, lname, email, mobile.
things.
1. Add user with validation.
2. On clicking Query display single user data.
3. Update is for changes in user data.
4. Delete data.
5. Use bootstrap for UI part.