|
What are the types of JDBC Driver Models and explain
them?
There are two types of JDBC Driver Models and they are:
What are the steps involved for making a connection with a database or how do you connect to a database? a) Loading the driver : To load the driver, Class. forName()
method is used. Class. forName(”sun. jdbc. odbc. JdbcOdbcDriver”); When
the driver is loaded, it registers itself with the java. sql. DriverManager
class as an available database driver.
What type of driver did you use in project? JDBC-ODBC Bridge driver (is a driver that uses native(C language) libraries and makes calls to an existing ODBC driver to access a database engine). What are the types of statements in JDBC? Statement: to be used createStatement() method for executing single SQL statement PreparedStatement — To be used preparedStatement() method for executing same SQL statement over and over. CallableStatement — To be used prepareCall() method for multiple SQL statements over and over. What is servlet? Servlets are modules that extend request/response-oriented servers, such as java-enabled web servers. For example, a servlet might be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company’s order database. What is the difference between an applet and a servlet? a) Servlets are to servers what applets are to browsers.
What is the difference between doPost and doGet methods? a) doGet() method is used to get information, while doPost()
method is used for posting information.
What are the different servers available for developing and deploying Servlets? a) Java Web Server
Is it possible to communicate from an applet to servlet and how many ways and how? Yes, there are three ways to communicate from an applet
to servlet and they are:
Why should we go for interservlet communication? Servlets running together in the same server communicate
with each other in several ways. The three major reasons to use interservlet
communication are:
Is it possible to call servlet with parameters in the URL? Yes. You can call a servlet with parameters in the syntax as (?Param1 = xxx || m2 = yyy). What is the difference between TCP/IP and UDP? TCP/IP is a two-way communication between the client and the server and it is a reliable and there is a confirmation regarding reaching the message to the destination. It is like a phone call. UDP is a one-way communication only between the client and the server and it is not a reliable and there is no confirmation regarding reaching the message to the destination. It is like a postal mail. What is Domain Naming Service(DNS)? It is very difficult to remember a set of numbers(IP address) to connect to the Internet. The Domain Naming Service(DNS) is used to overcome this problem. It maps one particular IP address to a string of characters. For example, www. mascom. com implies com is the domain name reserved for US commercial sites, moscom is the name of the company and www is the name of the specific computer, which is mascom’s server. |
|
Do you have a Java Problem?
Java Books
Return to : Java Programming Hints and Tips All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|