11. What is AWT?
1. Java AWT (Abstract Window Toolkit) is an API to develop GUI or window-based applications in java.
2. Java AWT components are platform-dependent i.e. components are displayed according to the view of operating system. AWT is heavyweight i.e. its components are using the resources of OS.
3. The java.awt package provides classes for AWT api such as TextField, Label, TextArea, RadioButton, CheckBox, Choice, List etc.
12. Mention the purpose of connection interface.
1. A Connection is the session between java application and database.
2. The Connection interface is a factory of Statement, PreparedStatement, and DatabaseMetaData
3. i.e. object of Connection can be used to get the object of Statement and DatabaseMetaData.
4. The Connection interface provide many methods for transaction management like commit(), rollback() etc
Follow www.youtube.com/coderbaba
1. Java AWT (Abstract Window Toolkit) is an API to develop GUI or window-based applications in java.
2. Java AWT components are platform-dependent i.e. components are displayed according to the view of operating system. AWT is heavyweight i.e. its components are using the resources of OS.
3. The java.awt package provides classes for AWT api such as TextField, Label, TextArea, RadioButton, CheckBox, Choice, List etc.
12. Mention the purpose of connection interface.
1. A Connection is the session between java application and database.
2. The Connection interface is a factory of Statement, PreparedStatement, and DatabaseMetaData
3. i.e. object of Connection can be used to get the object of Statement and DatabaseMetaData.
4. The Connection interface provide many methods for transaction management like commit(), rollback() etc
Follow www.youtube.com/coderbaba
1.What is meant by session tracking?
Session Tracking is a way to maintain state (data) of a user.
It is also known as session management in servlets.
Session Tracking is a way to maintain state (data) of a user.
It is also known as session management in servlets.
2.What is the use of Java web servers?
It is a computer where the web content can be stored.
In general web servers can be used to host the web sites but there also
used some other web servers also such as FTP, email, storage, gaming etc.
Examples of Web Servers are: Apache Tomcat and Resin.
It is a computer where the web content can be stored.
In general web servers can be used to host the web sites but there also
used some other web servers also such as FTP, email, storage, gaming etc.
Examples of Web Servers are: Apache Tomcat and Resin.
3.What are the uses of Servlet?
Servlets execute within the address space of a Web server.
It is not necessary to create a separate process to handle each client request.
Servlets are platform-independent because they are written in Java.
Servlets execute within the address space of a Web server.
It is not necessary to create a separate process to handle each client request.
Servlets are platform-independent because they are written in Java.
4.How will you communicate between two applets?
java.applet.AppletContext class provides the facility of communication between applets.
We provide the name of the applet through the HTML file.
It provides the getApplet() method that returns the object of Applet.
Syntax:
public Applet getApplet(String name)
{
}
java.applet.AppletContext class provides the facility of communication between applets.
We provide the name of the applet through the HTML file.
It provides the getApplet() method that returns the object of Applet.
Syntax:
public Applet getApplet(String name)
{
}
5.What is JDBC? How do you connect to the database?
JDBC is an acronym for Java Database Connectivity.
It’s an advancement for ODBC ( Open Database Connectivity ).
JDBC is a standard API specification developed in order to move data
from frontend to backend. This API consists of classes and interfaces written in Java.
It basically acts as an interface (not the one we use in Java) or channel
between your Java program and databases i.e it establishes a link between the two so that a programmer could send data from Java code and store it in the database for future use.
JDBC is an acronym for Java Database Connectivity.
It’s an advancement for ODBC ( Open Database Connectivity ).
JDBC is a standard API specification developed in order to move data
from frontend to backend. This API consists of classes and interfaces written in Java.
It basically acts as an interface (not the one we use in Java) or channel
between your Java program and databases i.e it establishes a link between the two so that a programmer could send data from Java code and store it in the database for future use.
6.What's the difference between servlet and applets?
applets:
Applets are executed on client-side i.e applet runs within a Web browser on the client machine.
Important methods of applet include init(), stop(), paint(), start(), destroy().
servlets:
Servlets on other hand executed on the server-side i.e servlet runs on the web Page on server.
Lifecycle methods of servlet are init( ), service( ), and destroy( ).
applets:
Applets are executed on client-side i.e applet runs within a Web browser on the client machine.
Important methods of applet include init(), stop(), paint(), start(), destroy().
servlets:
Servlets on other hand executed on the server-side i.e servlet runs on the web Page on server.
Lifecycle methods of servlet are init( ), service( ), and destroy( ).
7.What are the four drivers available in JDBC?
Type-1 driver or JDBC-ODBC bridge driver.
Type-2 driver or Native-API driver.
Type-3 driver or Network Protocol driver.
Type-4 driver or Thin driver.
Type-1 driver or JDBC-ODBC bridge driver.
Type-2 driver or Native-API driver.
Type-3 driver or Network Protocol driver.
Type-4 driver or Thin driver.
9.What is Java media framework?
The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology
The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology
10.What is Servlet interface?
This interface is for developing servlets. A servlet is a body of Java code that is loaded into and runs inside a servlet engine, such as a web server.
The Servlet interface defines methods to initialize a servlet, to receive and respond to client requests, and to destroy a servlet and its resources.
This interface is for developing servlets. A servlet is a body of Java code that is loaded into and runs inside a servlet engine, such as a web server.
The Servlet interface defines methods to initialize a servlet, to receive and respond to client requests, and to destroy a servlet and its resources.
Java Interview Question
1.What is servlet chaining? Explain.
2.Describe the basic concepts of servlet life cycle.
3.Write short notes on JDBC drivers.
4.What is server side include? Explain
5.Describe the life cycle methods of servlet with a neat diagram.
6.What are the advantages and disadvantages of the Get method?
7.Describe briefly on the servlet interface.
8.What are the advantages of using servlet than using CGI? Explain.
9.Explain applet and servlet communication with example.
10.How to create servlet filter elements?
11.Explain the usage of JDBC in servlet with an example
12.What are the uses of servlet? Explain.
13.What are the types of statements in JDBC? Explain with examples.
1.What is servlet chaining? Explain.
2.Describe the basic concepts of servlet life cycle.
3.Write short notes on JDBC drivers.
4.What is server side include? Explain
5.Describe the life cycle methods of servlet with a neat diagram.
6.What are the advantages and disadvantages of the Get method?
7.Describe briefly on the servlet interface.
8.What are the advantages of using servlet than using CGI? Explain.
9.Explain applet and servlet communication with example.
10.How to create servlet filter elements?
11.Explain the usage of JDBC in servlet with an example
12.What are the uses of servlet? Explain.
13.What are the types of statements in JDBC? Explain with examples.
1.Explain session management in servlet.
2.Explain connection establishment of JDBC.
3.Explain applet and servlet communication with example.
4.Explain in detail about servlet architecture with necessary diagrams.
5.Explain the life cycle of servlets.
6.Write an Airline Reservation Program using JDBC and servlet.
7.Explain briefly about applet to servlet communication with an example.
8.Explain briefly the session tracking API with HTTP session objects.
9.Explain briefly session tracking with servlet.
10.Explain HTTP GET and HTTP POST requests.
11.Write a servlet code to display Name, ISBN number, prize data of book stored in database, (use form).
12.How session tracking can be achieved in servlets?
2.Explain connection establishment of JDBC.
3.Explain applet and servlet communication with example.
4.Explain in detail about servlet architecture with necessary diagrams.
5.Explain the life cycle of servlets.
6.Write an Airline Reservation Program using JDBC and servlet.
7.Explain briefly about applet to servlet communication with an example.
8.Explain briefly the session tracking API with HTTP session objects.
9.Explain briefly session tracking with servlet.
10.Explain HTTP GET and HTTP POST requests.
11.Write a servlet code to display Name, ISBN number, prize data of book stored in database, (use form).
12.How session tracking can be achieved in servlets?
What are the three types of EJB?
✦ Entity beans
✦ Session beans
✦ Message-driven beans
✦ Entity beans
✦ Session beans
✦ Message-driven beans
Q-Define WAR file.
A war (web archive) File contains files of a web project. It may have servlet, xml,
jsp, image, html, css, js etc. files.It reduces the time duration for transferring files
A war (web archive) File contains files of a web project. It may have servlet, xml,
jsp, image, html, css, js etc. files.It reduces the time duration for transferring files
Q.Define java beans.
A JavaBean is a Java class that should follow the following conventions:
It should have a no-arg constructor.
It should be Serializable.
It should provide methods to set and get the values of the properties, known as getter and setter methods.
A JavaBean is a Java class that should follow the following conventions:
It should have a no-arg constructor.
It should be Serializable.
It should provide methods to set and get the values of the properties, known as getter and setter methods.
Q.How should system exceptions be handled from an enterprise bean?
A system exception indicates a problem with the services that support an application.
If it encounters a system-level problem, enterprise bean should throw a javax.ejb.EJBException. Because the EJBException is a subclass of the RuntimeException, you do not have to specify it in the throws clause of the method declaration.
If a system exception is thrown, the EJB container might destroy the bean instance.
Therefore, a system exception cannot be handled by the bean’s client program, but instead requires intervention by a system administrator.
An application exception signals an error in the business logic of an enterprise bean.
A system exception indicates a problem with the services that support an application.
If it encounters a system-level problem, enterprise bean should throw a javax.ejb.EJBException. Because the EJBException is a subclass of the RuntimeException, you do not have to specify it in the throws clause of the method declaration.
If a system exception is thrown, the EJB container might destroy the bean instance.
Therefore, a system exception cannot be handled by the bean’s client program, but instead requires intervention by a system administrator.
An application exception signals an error in the business logic of an enterprise bean.
Q.How can nested transactions be implemented with enterprise bean?
Java EE does not support nested transactions. The only thing it supports is suspending a transaction, running an unrelated transaction, and the resuming the first transaction.
To accomplish that, you would need to call another EJB that uses the RequiresNew transaction attribute. Note that the inner transaction can complete even if the message receipt rolls back, which means if the messaging
engine crashes, the second transaction might be run again. Alternatively, you could change the EJB to use bean-managed transactions, which would have a similar effect.
Java EE does not support nested transactions. The only thing it supports is suspending a transaction, running an unrelated transaction, and the resuming the first transaction.
To accomplish that, you would need to call another EJB that uses the RequiresNew transaction attribute. Note that the inner transaction can complete even if the message receipt rolls back, which means if the messaging
engine crashes, the second transaction might be run again. Alternatively, you could change the EJB to use bean-managed transactions, which would have a similar effect.
1.What are the relationships and responsibilities of EJB? Explain.
2. Differentiate stateless and stateful session bean.
3.What is enterprise java bean query language? Give some examples.
4.Explain array function and hash function with example.
5.What are the control structures available in Perl?
6.Explain with examples.
7.What is meant by bean astonization? Explain.
8.What is introspection? Explain.
9.Distinguish between stateful and stateless session beans.
10. Explain enterprise bean lifecycle methods in detail.
11.Explain Container -Managed Persistence with an example.
12.Write short notes on EJB session bean and entity bean.
13.Explain the functions and scope of Perl.
14.How does EJB support asynchronous communication with clients?
15.Discuss about file operation in Perl.
16.Explain EJB requirements.
17.Write the features of the application server in EJP.
18.Explain how the EJB interacts with other beans.
2. Differentiate stateless and stateful session bean.
3.What is enterprise java bean query language? Give some examples.
4.Explain array function and hash function with example.
5.What are the control structures available in Perl?
6.Explain with examples.
7.What is meant by bean astonization? Explain.
8.What is introspection? Explain.
9.Distinguish between stateful and stateless session beans.
10. Explain enterprise bean lifecycle methods in detail.
11.Explain Container -Managed Persistence with an example.
12.Write short notes on EJB session bean and entity bean.
13.Explain the functions and scope of Perl.
14.How does EJB support asynchronous communication with clients?
15.Discuss about file operation in Perl.
16.Explain EJB requirements.
17.Write the features of the application server in EJP.
18.Explain how the EJB interacts with other beans.
1.Explain the architecture of EJB with a neat diagram.
2.Describe the control structures and operators of Perl with suitable examples.
3.Describe the roles, relationship and responsibilities of EJB with a neat diagram.
4. Explain the functions and scope of Perl with suitable examples.
5.What are the two subtypes of entity bean? Explain the two types in detail.
6.Explain EJB architecture.
7.Explain life cycle of a session bean in detail.
8.Describe the implementation and future direction of EJB.
9.Write a program to develop an Enterprise JavaBean for library operations.
10.Describe the functions of different types of client views available in EJB.
11.What is an EJB Client? Explain EJB deployment model.
12. Explain arithmetic and string functions used in PERL.
2.Describe the control structures and operators of Perl with suitable examples.
3.Describe the roles, relationship and responsibilities of EJB with a neat diagram.
4. Explain the functions and scope of Perl with suitable examples.
5.What are the two subtypes of entity bean? Explain the two types in detail.
6.Explain EJB architecture.
7.Explain life cycle of a session bean in detail.
8.Describe the implementation and future direction of EJB.
9.Write a program to develop an Enterprise JavaBean for library operations.
10.Describe the functions of different types of client views available in EJB.
11.What is an EJB Client? Explain EJB deployment model.
12. Explain arithmetic and string functions used in PERL.