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. pub.flow:catchException

  2. pub.flow:catchError

  3. pub.schema:validatePipeline

  4. pub.flow:getLastError

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

pub.flow:getLastError retrieves details about the last exception that occurred during flow service execution, making it the primary exception handling service. pub.flow:catchException handles exceptions but getLastError provides exception details.

Multiple choice technology web technology
  1. Change the content type of the output returned to the client of a service invoke

  2. Return an XML message in response to an XML HTTP POST request

  3. Display an HTML message in a browser

  4. Return a text document that has been previously formatted with an output template

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

The pub.flow:setResponse service in webMethods can change content types, return XML/HTML messages, and display content in browsers. However, returning a pre-formatted text document from an output template is not within its scope - setResponse handles response configuration but doesn't retrieve template-formatted documents.

Multiple choice technology web technology
  1. Control access to a Flow service

  2. Store encrypted Access Control Lists (ACLs)

  3. Restrict access to DSP, HTML and XML files

  4. Control Administrator access to the Integration Server

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

The .access file in webMethods Integration Server controls access to web-facing resources like DSP (webMethods DSP pages), HTML files, and XML files. It does NOT control Flow service access (handled by ACLs), store encrypted ACLs, or control Administrator access.

Multiple choice technology web technology
  1. An IData pipeline object is instantiated

  2. A content-handler is invoked

  3. A session is created

  4. The client posting the data is authenticated

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

When HTTP POST data arrives at webMethods Integration Server, authentication (if configured) typically happens first to establish who is making the request. Only after authentication does the server create a session, invoke content handlers, or instantiate pipeline objects.

Multiple choice technology packaged enterprise solutions
  1. Web Client

  2. Mobile Web Client

  3. Wireless Web Client

  4. Dedicated Web Client

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

Siebel Web Clients and Wireless Web Clients connect to the Siebel Application Object Manager via a web server (using the Siebel Web Server Extension). Dedicated Web Clients connect directly to the database.

Multiple choice technology web technology
  1. JSP File

  2. Plain text file

  3. SERVLET

  4. All of the above

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

The action is versatile and can include output from various sources: JSP files (for dynamic content generation), plain text or HTML files (for static content), and servlets (for programmatic output). This makes it a powerful tool for composing pages from multiple components.

Multiple choice technology web technology
  1. Using the <jsp:readParam/> action

  2. Using the <jsp:getParam/> action

  3. Use the request.getParameter() method

  4. Use the response.getParameter() method

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

Parameters passed via within a action become standard request parameters in the included page. The included page accesses these using the familiar request.getParameter() method, just like parameters from an HTML form or URL query string.

Multiple choice technology web technology
  1. Unmatched bracket in for statement

  2. Flush attribute must be false

  3. Keyword 'file' should be used instead of 'page' in the <jsp:forward/> action

  4. Actions cannot be used within scriptlet blocks

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

JSP actions like are XML-based syntax that must be used outside of scriptlet blocks (<% ... %>). Within scriptlets, you should use programmatic equivalents like response.sendRedirect() or request.getRequestDispatcher().forward(). The syntax shown tries to mix XML action tags inside Java code blocks, which is invalid.

Multiple choice technology web technology
  1. <jsp:synchronize name="BeanName" />

  2. <jsp:setProperty name="BeanName" property="" />

  3. <jsp:setProperty name="BeanName" property="*" />

  4. <jsp:setProperty name="BeanName" property="All" />

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

Using property="*" in automatically matches all request parameter names to bean property names. If the form has fields named firstName and lastName, and the bean has properties with the same names, they're populated automatically. This is a convenient shortcut for form-to-bean synchronization.

Multiple choice technology web technology
  1. web.xml

  2. servlet.mappings

  3. servlet.xml

  4. Servlet.java

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

The web.xml file is the standard deployment descriptor for Java web applications. It contains servlet mappings, servlet definitions, and other configuration elements. Servlet.mappings and servlet.xml are not standard files.

Multiple choice technology web technology
  1. True

  2. False

  3. Can't say

  4. None of these

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

Servlets and JSP are widely adopted Java technologies for web development. All major application servers (Tomcat, WebSphere, WebLogic, JBoss) and web servers (Apache with modules, IIS) support them either natively or through plugins.

Multiple choice technology web technology
  1. java.servlet

  2. javax.servlet

  3. .servlet

  4. All are same

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

To solve this question, the user needs to know about the Java Servlets API and its interface.

The correct answer is:

B. javax.servlet

Explanation:

All the servlets must implement the Servlet interface of the javax.servlet package. The javax.servlet package contains a number of interfaces and classes that define the contracts between a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container. The javax.servlet package provides the base classes for defining HTTP servlets. Thus option B is correct.

Option A is incorrect because there is no package named java.servlet.

Option C is incorrect because the option is incomplete and doesn't provide the package name.

Option D is incorrect because there is only one correct option, and that is option B.

Therefore, the answer is: B. javax.servlet

Multiple choice technology web technology
  1. HttpServletResponce

  2. HttpRequest

  3. ServletRequest

  4. HttpServletRequest

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

The servlet container creates an HttpServletRequest object representing the client request and passes it to the service() method (which then delegates to doGet(), doPost(), etc.). This object contains request metadata, parameters, headers, and session info.