Vidya Pratishthan’s
Commerce &Science College, Indapur
Department Of B.Sc.(Computer science)
Class: -SYB.Sc(cs) Subject:- Object oriented Programming using java-II
Practical Assignment-4 Date:-27/2/2025
Q1. Write a JSP program to check whether a given number is prime or not.
Display the result in red color.
Q2.Write a JSP program to check whether given number is Perfect or not.
(Use Include directive).
Q3.Write a JSP program to calculate sum of first and last digit of a given
Number. Display sum in Red Color with font size 18.
Q4.Write a SERVLET program which counts how many times a user has
visited a web page. If user is visiting the page for the first time, display a
Welcome message. If the user is revisiting the page, display the number
of times visited. (Use Cookie)
Q5.Write a SERVLET application to accept username and password, search
them into database, if found then display appropriate message on the
Browser otherwise display error message.
Q6. Create a JSP page to accept a number from a user and display it in
Words: Example: 123 – One Two Three. The output should be in red
Color.
Q7.Write a JSP program which accepts UserName in a TextBox and greets
the user according to the time on server machine.
Q8.Write a JSP script to accept username and password from user, if they
are same then display “Login Successfully” message in Login.html file,
otherwise display “Login Failed” Message in Error.html file.
Q9. Write a JSP script to accept a String from a user and display it in reverse
order.
InCharge HOD
(Prof.Urmila Mahadik) (Prof.Shaikh S.Y)