Computer Knowledge

Java Enterprise and Web Technologies

2,279 Questions

Java enterprise and web technologies questions focus on J2EE architecture, web services like SOAP, and servlet functionalities. These topics frequently appear in IT officer and specialist scale examinations. Regular practice ensures familiarity with enterprise application components.

HttpServlet methodsSOAP and web servicesEJB architecture rolesJ2EE componentsJSP servlet callingUDDI concepts

Java Enterprise and Web Technologies Questions

Multiple choice technology web technology
  1. using <@include>

  2. using <jsp:include>

  3. using <@composite>

  4. using <jsp:composite>

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To build a composite JSP page dynamically at runtime, the standard action tag `` is used to merge the content of another resource into the current page.

Multiple choice technology programming languages
  1. App_Data

  2. App_Resources

  3. App_Code

  4. App_WebReferences

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In ASP.NET, placing a .wsdl or .xsd file in the App_Code folder automatically triggers the runtime to generate a corresponding proxy class or typed dataset, making it available to the application.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

ServletConfig is one per servlet, not per web application. Each servlet gets its own ServletConfig object during initialization containing its specific initialization parameters. For web application-wide configuration, you use ServletContext, which is shared across all servlets in the application.

Multiple choice technology programming languages
  1. A

  2. B

  3. C

  4. D

  5. E

  6. F

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Explanation

To run a packaged Java class, you must specify its fully qualified name. Running from /apps with the default classpath requires java com.company.application.MainClass. Alternatively, you can specify the classpath explicitly using -classpath /apps from any directory.

Multiple choice technology programming languages
  1. Message Processing

  2. Serialization

  3. Single Document Interface

  4. Multiple Document Interface

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

CObject is MFC's root base class that provides serialization support through the Serialize() method and DECLARE_SERIAL/IMPLEMENT_SERIAL macros. Message processing, SDI, and MDI are handled by derived classes like CWinApp, CFrameWnd, and CDocument, not by CObject itself.

Multiple choice technology web technology
  1. <hibernate-configuration>

  2. <hibernate-config>

  3. <hibernate-apps>

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The Hibernate configuration XML uses as its root element. This element contains which in turn contains property definitions and mapping resources. Alternative names like or are not valid Hibernate configuration elements.

Multiple choice technology web technology
  1. config.createSessionFactory()

  2. config.getSessionFactory()

  3. config.buildSessionFactory()

  4. config. SessionFactory.newInstance()

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Hibernate 3 and earlier, the standard way to obtain a SessionFactory from a Configuration object is by calling config.buildSessionFactory(). The other methods do not exist on the configuration object.

Multiple choice technology web technology
  1. Pass an instance of java.util.Properties to Configuration.setProperties().

  2. Place hibernate.properties in a root directory of the classpath.

  3. Set System properties using java -Dproperty=value.

  4. All the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Hibernate accepts configuration through all three methods: passing Properties directly to Configuration object, placing hibernate.properties in classpath root, or setting System properties via -D flags. This flexibility allows different deployment and configuration strategies.

Multiple choice technology platforms and products
  1. Build automation using Ant Script

  2. Integrating J2EE Application servers

  3. Plug-in development by the user

  4. Can be used as a J2EE application server

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Eclipse integrates with J2EE servers like Tomcat and WebLogic, supports Ant build automation, and has extensive plugin development capabilities (PDE). However, Eclipse itself is an IDE/framework, not a J2EE application server - it doesn't host servlets/JSPs directly like Tomcat or WebLogic.

Multiple choice technology platforms and products
  1. As transient work area for storing temporary data such as compiled JSPs.

  2. It must contain the web.xml file

  3. It contains deployment specific details

  4. All of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The .myeclipse folder serves as a temporary workspace for MyEclipse to store transient data like compiled JSPs during development. Option B is incorrect because web.xml belongs in WEB-INF, not this optional folder. Option C is incorrect because deployment details are stored elsewhere.

Multiple choice technology platforms and products
  1. .mymetadata file

  2. .myeclipse folder

  3. an ejb-jar.xml file

  4. An application.xml

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

MyEclipse generates a .mymetadata file when creating web application projects to store project-specific configuration and metadata. This file contains information about the project type, deployment settings, and other MyEclipse-specific attributes needed for the IDE to manage the project correctly.

Multiple choice technology platforms and products
  1. Tomcat

  2. Oracle

  3. BEA

  4. All of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

MyEclipse provides built-in support and plugins for numerous application servers including Apache Tomcat, Oracle WebLogic (formerly BEA), and many others. The IDE includes server adapters that allow deployment, debugging, and management of applications running on these servers directly from the development environment.

Multiple choice technology programming languages
  1. Java Programming Language

  2. Java Class file format

  3. Java Application Programming Interface

  4. Java Common Type System

  5. Java Virtual Machine

  6. Java Common Language Runtime

Reveal answer Fill a bubble to check yourself
A,B,C,E Correct answer
Explanation

The Java architecture is composed of the Java Programming Language, the Java Class file format, the Java API, and the Java Virtual Machine (JVM). Common Type System and CLR belong to the .NET framework.

Multiple choice technology programming languages
  1. To improve memory management.

  2. To achieve Platform independence

  3. To improve the Application performance

  4. If Java API is not available for platform specific operation

  5. For small applications

Reveal answer Fill a bubble to check yourself
C,D Correct answer
Explanation

Java Native Interface (JNI) is used to call platform-specific native libraries when a Java API is unavailable, or to write performance-critical code in C/C++ to optimize application execution speed.