the relative path of the resource, context.getRequestDispatcher(path): In
order to create it we need to give the absolute path of the resource.
What is the difference between ServletContext and PageContext?
ServletContext: Gives the information about the container. PageContext:
Gives the information about the Request
How many types of JDBC Drivers are present and what are they?
There are 4 types of JDBC Drivers
JDBC-ODBC Bridge Driver Native API Partly Java Driver Network
protocol Driver JDBC Net pure Java Driver
What is the query used to display all tables names in SQL Server (Query
analyzer)?
select * from information_schema.tables
How do you call a stored procedure from JDBC?
The first step is to create a CallableStatement object. As with Statement an
and PreparedStatement objects, this is done with an open onnection object.
A CallableStatement object contains a call to a stored procedure.
CallableStatement cs = con.prepareCall(”,call SHOW_SUPPLIERS-”);
ResultSet rs = cs.executeQuery();
How can you use PreparedStatement?
This special type of statement is derived from class Statement.If you need a
Statement object to execute many times, it will normally make sense to use a
PreparedStatement object instead. The advantage to this is that in most
cases, this SQL statement will be sent to the DBMS right away, where it will
be compiled. As a result, the PreparedStatement object contains not just an
SQL statement, but an SQL statement that has been precompiled. This
means that when the PreparedStatement is executed, the DBMS can just
run the PreparedStatement’s SQL statement without having to compile it
Do'stlaringiz bilan baham: |