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

  2. JCA

  3. Java EE Entities

  4. JMS

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

JSF (JavaServer Faces) is the modern Java EE framework that replaces custom MVC frameworks and JSP scriptlets with a component-based UI architecture. JPA Entities (Java Persistence API) replace complex entity beans with simpler POJO-based persistence, eliminating the need for facade session beans. JCA (Java Connector Architecture) connects legacy systems, and JMS handles messaging - neither addresses the stated migration needs.

Multiple choice technology web technology
  1. Availability

  2. Performance

  3. Manageability

  4. Maintainability

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

Increasing the number of web and application servers increases the complexity of administration, monitoring, and synchronization across the cluster, which negatively impacts manageability. Performance and availability are typically improved by scaling out, while maintainability is a codebase attribute less affected by runtime instances.

Multiple choice technology web technology
  1. Applets

  2. JSP

  3. JSP/Servlets

  4. JSP/Servlets and EJBs

  5. You would never replace PHP scripts with a J2EE technology

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

Replacing Perl and PHP scripts which contain both presentation and business logic requires a multi-layered J2EE architecture. JSP and Servlets handle the dynamic web presentation layer, while Enterprise JavaBeans (EJBs) manage the business logic and transaction processing, communicating with the database. Using JSPs/Servlets alone would lack a dedicated business logic tier.

Multiple choice technology web technology
  1. It is a fundamental

  2. It is a platform-independent, XML-based registry for businesses worldwide to be listed on the Internet.

  3. It is a bidirectional pull parser interface for streaming XML processing.

  4. It provides a convenient way to bind an XML schema to a representation in Java code.

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

UDDI (Universal Description, Discovery, and Integration) is an XML-based registry standard that enables businesses to publish and discover web services on the internet. It provides a structured directory where companies can list their services and others can find them. Option C describes StAX (Streaming API for XML), and Option D describes JAXB (Java Architecture for XML Binding).

Multiple choice technology web technology
  1. JAXB

  2. JAXR

  3. Enterprise Service Bus

  4. Simple Object Access Protocol

  5. REST

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

An Enterprise Service Bus (ESB) provides the fundamental infrastructure to integrate diverse systems (mainframe, client-server, standalone) under a unified, scalable, and secure Service-Oriented Architecture (SOA). JAXB and JAXR are Java-specific APIs for XML binding and registries, while SOAP and REST are communication protocols rather than integration platforms.

Multiple choice technology web technology
  1. Recode the application using JSF, EJB and Entities. This will improve the overall performance of the application and also improves maintainability

  2. Replace the auto-refresh functionality with AJAX code.

  3. Recode the application using JSF, EJB and Web Services.

  4. Use frames and put the auto-refresh part in a different frame.

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

Replacing the 60-second auto-refresh with AJAX allows asynchronous updates of just the stock prices without reloading the entire page, significantly improving user experience and reducing server load. This is a minimal, low-cost change that delivers immediate value. Complete rewrites with JSF/EJB (options A and C) are expensive overhauls, and frames (option D) are an outdated technique that doesn't solve the core usability issue.

Multiple choice technology web technology
  1. WSDL

  2. ebXML

  3. UDDI

  4. None of the above.

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

WSDL is designed for SOAP services and doesn't naturally describe REST's resource-oriented architecture. ebXML is for electronic business XML exchanges, UDDI is a registry for service discovery, and none of these are standard REST description languages. While WADL (Web Application Description Language) exists for REST, it's not widely adopted, making 'None of the above' the correct answer.

Multiple choice technology web technology
  1. StaX

  2. JAXP

  3. JAXB

  4. JAXR

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

JAXR (Java API for XML Registries) is specifically designed for accessing business and service registries like UDDI and ebXML. It provides a standard API to search, retrieve, and manage registry metadata. StAX is for streaming XML parsing, JAXP is for general XML processing, and JAXB is for XML-Java binding - none of these handle registry queries.

Multiple choice technology web technology
  1. Refactor the common scriptlet code into tag libraries wherever possible

  2. Create a common look & feel using templates, CSS files.

  3. Use Entities

  4. Use Expression Language

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

The application uses JDBC directly with no persistence layer, so introducing JPA Entities would require significant architectural changes (new EntityManager, entity mappings, refactoring all JDBC code). This contradicts the 'improve with minimal costs' requirement. The other options are valid, low-risk improvements: tag libraries and EL reduce scriptlets, templates create consistent UI.

Multiple choice technology web technology
  1. Replace entity beans with JPA entity classes

  2. Use the new JMS API

  3. Replace session Beans with web services

  4. Use JCA

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

JPA entity classes (option A) replace complex entity beans with simpler POJO-based persistence, reducing boilerplate. The JMS API in Java EE 5+ (option B) was significantly simplified with annotations and fewer interfaces, making it worthwhile to adopt. Replacing session beans with web services (C) changes the architecture unnecessarily, and JCA (D) is only needed for legacy system connections - not mentioned.

Multiple choice technology web technology
  1. JAX-WS

  2. JMS

  3. JSSE

  4. JCE

  5. JSF

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

JSF (JavaServer Faces) is ideal for building components-based web GUIs that closely mimic desktop applications, while JAX-WS is the standard API for communicating with XML-based SOAP Web Services. JMS, JCE, and JSSE handle messaging and security.

Multiple choice technology security

For a given url -> http://www.example.com/smb.jsp&page=wireless where wireless indicates a unique page how would you configure appscan to test all unique pages?

  1. Ignore the page parameter

  2. Track the page parameter

  3. Set the redundant path limit to 1

  4. a.Set the depth limit to 1

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

Tracking the page parameter tells AppScan that each value of 'page' represents a unique page that should be tested individually. Ignoring would skip those pages, redundant path limit limits duplicates, and depth limit limits crawl depth.

Multiple choice technology security
  1. Difference between 2 tests

  2. How appscan modified the original web application page

  3. How appscan constructed the test http request

  4. How the vulnerability was resolved

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

The Request/Response tab in AppScan displays the difference between the original request sent by the browser and the modified request that AppScan constructed for testing. Option C correctly states this shows how AppScan built the test HTTP request, which is essential for understanding what vulnerability tests were performed.

Multiple choice technology security
  1. POST parameters

  2. SOAP parameters

  3. GET parameters

  4. Cookies

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

When testing .NET web services, AppScan targets SOAP parameters since these are the primary input mechanism for SOAP-based web services. Unlike REST services that might use GET/POST parameters, .NET SOAP services communicate through XML-formatted SOAP messages, making SOAP parameters the correct attack surface.