#Assignent 1 JSP
#Assignent 1 JSP
Question 1:
Create a simple calculator application using servlet.
Question 2:
Create a servlet for a login page. If the username and password are correct
then it says message “Hello” else a message “login failed”.
Question 3:
Using Request Dispatcher Interface create a Servlet which will validate the
password entered by the user, if the user has entered "Servlet" as password,
then he/she will be forwarded to Welcome Servlet else the user will stay on
the index.html page and an error message will be displayed.
Question 4:
Create a servlet that uses Cookies to store the number of times a user has
visited servlet.
Question 5:
Create a servlet demonstrating the use of session creation and destruction.
Also check whether the user has visited this page first time or has visited
earlier also using sessions.
Question 6:
Create a Servlet application to upload and download a file.
Question 7:
Write a servlet application to print the current date and time.
Question 8:
Write a servlet application to establish communication between html and
servlet page using hyperlink.
Question 9:
Write an application to auto refresh a page in servlet.
Question 10:
For this assignment you have to develop a simple servlet application.
Construct a simple HTML form for registration to an email service. The fields
in the form are
1. First name
2. Middle name
3. Last name
4. Desired login
5. Password
6. Confirm Password
7. Location
8. Education
9. Phone number
The fields 1,3,4,5 and 6 are compulsory for registration others are optional.
1. The First name, middle name and last name fields should contain only alphabets
2. Passwords should contain alphabets and alteast one numbers and special character.
Passwords should contain atleast 6 characters
On pressing the submit button the form should pass the data to a servlet which
check the restrictions and returns a successful registration message in case
all restrictions are fulfilled otherwise display back a appropriate
error message.
The checking of restrictions should be done on servlet side not in the form
itself. Also, use of Java script is not allowed.