Vous êtes sur la page 1sur 3

Java & J2EE Question Bank for Third Test:

1) Describe the steps of JDBC process with suitable exception


handling blocks.
2) What is ResultSet? How to set scroll option to ResultSet?
Explain with a sample java program..
3) Give Java syntax for the following..
i)Connecting a database using JDBC/ODBC brindge which has
url=jdbc:odbc:SDB username='scott' and password='tiger'
ii)counting the no of employees in research department.
iii)Running a query "select emp-age from emp over that
connected database
iv)Counting number of employees with condition emp-age >50.

4)Write a note on Database metadata object methods and


ResultSet metadata object methods.
5) What are transactions? Write a Java program to demonstrate
how to process a database transaction.

6) Explain four different types of JDBC drivers.


7) Briefly explain callable statement objects. Write a program to
call a store procedure using callable statement.
8) Explain the following with sample java program.
i) Callable Statement objects. ii) prepared statement.
9) What are Servlets? Write a java servlet to read the name from
the client page and say HELLO to the name as response.

10) Explain Servlet lifecycle with examples.


11) Define a cookie. Explain how cookies are created using java
servlet .
12) What is a cookie? List out the methods defined by a cookie
and write a program to add a cookie.
13) Write a program to describe parameters reading using
servlets.
14) Write a program using servlet which contains HTML page
to accept username and display the greeting message as
“’HELLO USER HOW ARE YOU”.
15) Briefly explain the following.
i) Servlet interface. ii)Generic Servlet Class. iii) Cookie Class.
iv) Session tracking..

16) Write a java servlet which reads two parameters from the
web page value1 and value2 which are of int type. Find the sum
of two values and return back to webpage

17) What is JSP? Explain the different types of JSP tags by


taking suitable examples.

18) Write the difference between JSP and Servlets.


.

19)What is Session? Explain how to create sessions using JSP.

20)List and Explain 3 methods that are automatically called in a


JSP requested and terminated normally.

21) Write a JSP program to create and read a cookie called


Employee that has a value of AN2356.

22) Explain two types of control statements used in JSP by


taking suitable examples.

23) Department has to set Grade for the java subject as follows.
Above 90-A Grade
80-89 B Grade
70-79 C Grade
Below 70 –Fail.
Rahul has to enter his marks for subject java in the interface
provided. Write a JSP program to accept the marks entered and
display his grade to the browser.

24)Explain the syntax of Deployment descriptor file used to


control the behavior of java Servlets.

Vous aimerez peut-être aussi