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. req.getSession()

  2. req.getSession(true)

  3. req.getSession(false)

  4. req.createSession()

  5. req.createSession(true)

  6. req.createSession(false)

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

getSession() (no-arg) and getSession(true) both create a new session if one doesn't exist. getSession(false) returns null if no session exists, without creating one. The createSession() methods do not exist in the HTTPServletRequest API.

Multiple choice technology web technology
  1. sendURL()

  2. redirectURL()

  3. sendRedirect()

  4. getRequestDispatcher()

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

sendRedirect(String url) is the correct method on HttpServletResponse to redirect the client to a different URL. This sends a temporary redirect (HTTP 302) to the browser. getRequestDispatcher() is for server-side forwards, not redirects.

Multiple choice technology web technology
  1. Only jspInit() can be overridden

  2. Only jspDestroy() can be overridden

  3. Only _jspService() can be overridden()

  4. Both jspInit() and jspDestroy() can be overridden

  5. jspInit(), jspDestroy() and _jspService() can all be overridden

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

JSP lifecycle includes jspInit() for initialization and jspDestroy() for cleanup, both of which can be overridden by developers. The _jspService() method is generated by the container and cannot be overridden - it's where your JSP code ultimately executes.

Multiple choice technology web technology
  1. <my:tag value"x"/>

  2. <my:tag value="x"></my:tag>

  3. <my:tag><jsp:attribute name="value">${userName}</jsp:attribute></my:tag>
  4. <my:tag value="x"><%="This is an EMPTY tag"%></my:tag>

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

A tag is considered empty only if it has no body content. Option D contains a scriptlet (<%=...%>) which produces output, giving it body content. Options A, B, and C are truly empty - A uses self-closing syntax, B has no content between tags, and C uses jsp:attribute for setting attributes.

Multiple choice technology
  1. Gathers templates and data and builds an HTML page

  2. Displays the HTML page on the client’ s computer

  3. Provides access to, and distributes load for Siebel Servers

  4. Verifies that the client is using an acceptable browser

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

The Siebel Web Engine's core function is receiving a URL request, gathering the appropriate templates and data from the database, and constructing an HTML page to return. It doesn't display the page (browser does), distribute load (that's the SWSE), or verify browsers (client-side check).

Multiple choice technology web technology
  1. PsPageMetaData

  2. PsPageFlowController

  3. PsPageData

  4. PsPageMetaDataReader

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

PsPageData is the object that provides page authors with consistent, standardized access to application data. PsPageMetaData contains metadata information, PsPageFlowController handles navigation logic, and PsPageMetaDataReader is for reading metadata - none of these provide the data access mechanism.

Multiple choice technology web technology
  1. Bean name

  2. servlet code

  3. Tag library descriptor file

  4. Implementation of the tag

  5. jsp code

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

A JSP tag library consists of three key components: the Tag Library Descriptor (TLD) file that defines the tags (C), the actual implementation code for each tag (D), and the JSP code that uses the tags (E). Bean name (A) is not a component of the tag library itself - it's data managed by the bean. Servlet code (B) is not directly part of tag library structure. Options C, D, and E are correct.

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. 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 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.