J2EE Technical Interview Questions For Freshers

What is J2EE? J2EE is the abbriviation of Java 2 Enterprise Edition.It is an environment for developing and deploying enterprise applicati...

What is J2EE?
J2EE is the abbriviation of Java 2 Enterprise Edition.It is an environment for developing and deploying enterprise applications in JAVA.specification for J2EE is defined by Sun Microsystems.J2EE has a set of services, application programming interfaces (APIs), and protocols,for developing n-tiered, web-based applications or non-web-based applications

What are the four components of J2EE application?
  • Application clients components. 
  • Servlet and JSP technology are web components.
  • Business components (JavaBeans). 
  • Resource adapter components
What are types of J2EE clients? 
Applets Application clients Java Web Start-enabled clients, by Java Web Start technology. Wireless clients, based on MIDP technology.

What is a J2EE component?
 A J2EE component is a software unit that is assembled into a J2EE application with related classes and files and it can communicate with other J2EE components Following are the example of J2EE Componet: a)Application clients and applets are client components. b)Java Servlet and JavaServer Pages technology components are web components c)Enterprise JavaBeans components (enterprise beans) are business components

What is a J2EE module?
A J2EE module has one or more J2EE components of the same container type along with one deployment descriptor of that type.

 What is a Java applet? 
An applet is a J2EE component that run on the client. In other words An applet is a program written in the Java language that can be included in an HTML page,like an image.

What is a Java application Client?
An application Client is a J2EE component that run on the client. An application is used to contain a full-function client non Web-based Java application that connects to the J2EE resources defined in the server

What is a Java servlet? 
 Java servlet is a J2EE component that run on the Server. In other words A Java servlet runs in a Web server or application server and provides server-side processing like accessing a database and/or e-commerce transactions etc.

What is a JavaServer Pages (JSP)? 
A JavaServer Pages (JSP) is a J2EE component that run on the Server. In other words Java Server Page (JSP) is a technology for providing the content or appearance of Web pages by using servlets, small programs etc specified in the Web pages.

What is Enterprise JavaBeans(EJB)?
 Enterprise JavaBeans(EJB) is the J2EE component that defines a component architecture for multi-tier client/server systems. (EJB) components (enterprise beans) are business components that run on the server.

What are considered as a web component?
 Java Servlet and Java Server Pages technology components are web components. Servlets are Java programming language that dynamically receive requests and make responses. JSP pages execute as servlets but allow a more natural approach to creating static content.

What is JSF? 
JavaServer Faces (JSF) is a user interface (UI) designing framework for Java web applications. JSF provide a set of reusable UI components, standard for web applications.JSF is based on MVC design pattern. It automatically saves the form data to server and populates the form date when display at client side

What is Hibernate?
 Hibernate is a open source object-relational mapping and query service. In hibernate we can write HQL instead of SQL which save developers to spend more time on writing the native SQL. Hibernate has more powerful association, inheritance, polymorphism, composition, and collections. It is a beautiful approach for persisting into database using the java objects. Hibernate also allows you to express queries using java-based criteria .

Difference between save and saveorupdate
 save() – This method in hibernate is used to stores an object into the database. It insert an entry if the record doesn’t exist, otherwise not. saveorupdate () -This method in the hibernate is used for updating the object using identifier. If the identifier is missing this method calls save(). If the identifier exists, it will call update method.

What the Core interfaces are of hibernate framework?
  • Session Interface 
  • SessionFactory Interface 
  • Configuration Interface 
  • Transaction Interface Query and 
  • Criteria Interface
What is "application configuration resource file" ? 
An XML file used to configure resources for a JavaServer Faces application, to define navigation rules for the application, and to register converters, validators, listeners, renderers, and components with the application.

 What is "archiving" ? 
The process of saving the state of an object and restoring it.

 What is "asant" ?
 A Java-based build tool that can be extended using Java classes. The configuration files are XML-based, calling out a target tree where various tasks get executed.

What is authorization constraint ? 
An authorization rule that determines who is permitted to access a Web resource collection.

What is B2B ? 
B2B stands for Business-to-business

Define connection pooling?
Connection pooling is a mechanism reuse the connection.which contains the number of already created object connection. So whenever there is a necessary for object, this mechanism is used to directly get objects without creating it.

What is HQL?
HQL stands for Hibernate Query Language. Hibernate allows to the user to express queries in its own portable SQL extension and this is called as HQL. It also allows the user to express in native SQL.

What are the Collection types in Hibernate ? 
set, List, Array, Map, Bag

Differentiate between .ear, .jar and .war files.
 .jar files: These files are with the .jar extenstion. The .jar files contains the libraries, resources and accessories files like property files. .
war files: These files are with the .war extension. The .war file contains jsp, html, javascript and other files for necessary for the development of web applications.
.ear files: The .ear file contains the EJB modules of the application.

What is Struts? 
Struts framework is a Model-View-Controller(MVC) architecture for designing large scale applications. Which is combines of Java Servlets, JSP, Custom tags, and message. Struts helps you to create an extensible development environment for your application, based on published standards and proven design patterns. Model in many applications represent the internal state of the system as a set of one or more JavaBeans.The View is most often constructed using JavaServer Pages (JSP) technology.The Controller is focused on receiving requests from the client and producing the next phase of the user interface to an appropriate View component. The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings.

What is ActionErrors? 
ActionErrors object that encapsulates any validation errors that have been found. If no errors are found, return null or an ActionErrors object with no recorded error messages.The default implementation attempts to forward to the HTTP version of this method. Holding request parameters mapping and request and returns set of validation errors, if validation failed; an empty set or null

What is ActionForm? 
ActionForm is a Java bean that associates one or more ActionMappings. A java bean become FormBean when extend org.apache.struts.action.ActionForm class. ActionForm object is automatically populated on the server side which data has been entered by the client from UI. ActionForm maintains the session state for web application.

What is action mapping?
In action mapping we specify action class for particular url ie path and diffrent target view ie forwards on to which request response will be forwarded.The ActionMapping represents the information that the ActionServlet knows about the mapping of a particular request to an instance of a particular Action class.The mapping is passed to the execute() method of theAction class, enabling access to this information directly.

What is servlet?
 Servlets is a server side components that provide a powerful mechanism for developing server side programs. Servlets is a server as well as platform-independent and Servlets are designed for a various protocols. Most commonly used HTTP protocols. Servlets uses the classes in the java packages javax.servlet, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession;. All servlets must implement the Servlet interface, which defines life-cycle methods.

Servlet is pure java object or not? 
Yes, pure java object.

What are the phases of the servlet life cycle?
 The life cycle of a servlet consists of the following phases:

  • Servlet class loading 
  • Servlet instantiation 
  •  the init method 
  • Request handling (call the service method) 
  • Removal from service (call the destroy method)
What must be implemented by all Servlets?
The Servlet Interface must be implemented by all servlets

What is bean-managed persistence ?
The mechanism whereby data transfer between an entity bean's variables and a resource manager is managed by the entity bean.

What is binding (XML) ?
Generating the code needed to process a well-defined portion of XML data

What is build file ? 
The XML file that contains one or more asant targets. A target is a set of tasks you want to be executed. When starting asant, you can select which targets you want to have executed. When no target is given, the project's default target is executed.

What is certificate authority ?
A trusted organization that issues public key certificates and provides identification to the bearer.

What is client-certificate authentication ?
 An authentication mechanism that uses HTTP over SSL, in which the server and, optionally, the client authenticate each other with a public key certificate that conforms to a standard that is defined by X.509 Public Key Infrastructure.

What is comment ?
 In an XML document, text that is ignored unless the parser is specifically told to recognize it.



Related

Interview Questions 1915230860169315845

Post a Comment

Follow Us

Hot in week

Recent

Comments

Side Ads

item