Computer Knowledge

Java Enterprise and Web Technologies

2,183 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. Message

  2. Stream,IXMLSerializable

  3. Message,Stream

  4. Message,Stream or an IXMLSerializable

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

In WCF, only Message, Stream, and types implementing IXMLSerializable can be used as parameters for streaming operations. These types support streaming because they can be read and written sequentially without buffering the entire message.

Multiple choice technology
  1. Starting the car

  2. Authentication

  3. Audit trails

  4. Adjusting room temperature

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

Java Ring is a smart card technology that can be programmed for various applications. All listed uses are theoretically possible implementations - authentication (most common), audit trails (security logging), starting cars (ignition systems), and adjusting room temperature (smart home integration). The question asks what it CAN be used for, not just typical uses.

Multiple choice technology architecture
  1. Action Servlet

  2. Action Controller

  3. JSP

  4. All of the above

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

In MVC architecture, the Action Controller is responsible for handling user requests and updating the model state. It processes input, executes business logic, and modifies model data as needed. The Action Servlet handles request routing, JSP is for presentation, and neither directly performs model updates. The controller layer is specifically designed for this coordination role.

Multiple choice technology architecture
  1. Request

  2. Cookie

  3. Application context

  4. Global Session

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

Global Session provides application-wide data persistence across all pages and requests for a specific user. Request scope only lasts for a single HTTP request, Cookie has size limitations and security concerns, and Application context is shared across all users rather than being session-specific.

Multiple choice technology architecture
  1. Action Controller

  2. Action Servlet

  3. JSP

  4. PageHandler

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

The PageHandler component is responsible for validating user input in the PS Framework architecture. Action Controller manages flow control, Action Servlet handles request dispatching, and JSP is for presentation - none of these are primarily responsible for input validation.

Multiple choice technology architecture
  1. Action Servlet

  2. Action Controller

  3. JSP

  4. PS.xml

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

The Action Controller is where business services are invoked in the PS Framework's MVC architecture. Action Servlet handles request routing, JSP manages presentation, and PS.xml contains configuration - only the Controller orchestrates business logic.

Multiple choice technology architecture
  1. Web.xml

  2. Metadata.xml

  3. InitializationWebapp.properties

  4. Config.xml

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

InitializationWebapp.properties is where the PS Framework expects entries for ps.xml location so that the Action Servlet can locate and load the configuration during application startup. Web.xml is for servlet configuration, and the other files are not standard initialization mechanisms.

Multiple choice technology architecture
  1. getApplicationID()

  2. getSecurityLevel()

  3. getSessionBehaviour()

  4. None of the above

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

getApplicationID() is the minimum required method override for ActionServlet in the PS Framework, as it uniquely identifies the application within the system. getSecurityLevel() and getSessionBehaviour() are optional overrides for specific customization needs.

Multiple choice technology architecture
  1. Client Modules

  2. Web App Modules

  3. EJB Modules

  4. All the above

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

EAR (Enterprise Archive) files in Java EE can contain multiple module types including web application modules (WAR files), EJB modules (JAR files with enterprise beans), and client application JARs. This modular structure allows packaging complete enterprise applications with all their components.

Multiple choice technology web technology
  1. Asyncronous Java eXtensible Language

  2. Asyncronous Java XML

  3. Asyncronous JavaScript XML

  4. Asyncronous J2EE XML

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

AJAX stands for Asynchronous JavaScript and XML, a set of web development techniques used to create asynchronous web applications. Distractors are incorrect as they substitute JavaScript with Java or J2EE, which are different languages and platforms, or use 'eXtensible Language' instead of 'and XML'.

Multiple choice technology
  1. Embedding of Java code in HTML pages

  2. Platform independence

  3. Creation of database-driven Web applications

  4. Server-side programming capabilities

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

JSP's primary advantage over Servlets is allowing Java code to be embedded directly in HTML using scriptlets and expressions. In Servlets, HTML must be embedded within Java strings using out.println(), making HTML-heavy pages cumbersome. JSP reverses this; HTML is the primary content with Java interspersed where needed.

Multiple choice technology
  1. jspInit(), _jspService() & jspDestroy()

  2. init(), service(), destroy()

  3. both 1&2

  4. none

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

JSP pages are translated into Servlets, and the lifecycle methods reflect this. jspInit() is called once when the JSP is first loaded (like init()). _jspService() handles each request (like service()). jspDestroy() is called when the JSP is unloaded (like destroy()). Options in B are Servlet lifecycle methods, not JSP-specific.

Multiple choice technology
  1. View

  2. Model

  3. Controller

  4. none

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

In MVC architecture, JSP serves as the View layer, responsible for presenting data to users. JSP's strength is templating and rendering HTML with dynamic content. Servlets typically act as Controllers (handling request processing), and JavaBeans/POJOs serve as Models (data and business logic).

Multiple choice technology
  1. Parsing JSP using an XML Parser.

  2. Converting JSP into static Html content.

  3. Generating Servlet Code for the Jsp

  4. none

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

JSP translation is the process where the web container converts JSP pages into Java Servlet source code. This happens automatically - the first time a JSP is accessed, it's translated to a Servlet, compiled to bytecode, and then executed. Subsequent requests use the compiled Servlet directly. Options A and B describe parsing or static content generation, not the translation process.