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. By sending a mail to websphere_test team

  2. By submitting a work request to WDT team

  3. Either a or b

  4. None of the above

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

JVM logs on production servers are managed by the WDT (WebSphere Deployment Team) through proper change management procedures. Submitting a work request ensures logs are cleared safely with proper documentation and approval.

Multiple choice technology web technology
  1. ps.xml

  2. Action controller

  3. JSP file

  4. Servlet

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

In the PS (Presentation Service) Framework, controller components include ps.xml (configuration file defining controller mappings) and Action controller (Java classes handling request processing). JSP files are View components, Servlets may be part of Controller but not core controllers in this specific framework.

Multiple choice technology programming languages
  1. <welcome> <welcome-file>index.jsp</welcome-file> </welcome>

  2. <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list>

  3. <welcome-files> <welcome-file>index.jsp</welcome-file> </welcome-files>

  4. <welcome-files> <welcome>index.jsp</welcome> </welcome-files>

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

In web.xml, welcome files must be defined within the element, with each file specified by a tag. This is the standard servlet specification syntax for configuring default files that load when a directory URL is accessed. The other options use incorrect element names that don't match the servlet specification.

Multiple choice technology programming languages
  1. <servlet> <servlet-name>login</servlet-name> <servlet-class>com.tcs.login.LoginServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>login </servlet-name> <url-pattern>/utils/L

  2. <servlet-mapping> <servlet-class>com.tcs.login.LoginServlet </servlet-name> <url-pattern>/utils/LoginServlet</url-pattern> </servlet-mapping>

  3. <servlet> <servlet-class>com.tcs.login.LoginServlet </servlet-name> <url-pattern>/utils/LoginServlet</url-pattern> </servlet>

  4. <servlet> <servlet-name>login</servlet-name> <servlet-class>com.tcs.login.LoginServlet</servlet-class> <servlet-mapping> <servlet-name>login </servlet-name> <url-pattern>/utils/LoginServlet</u

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

Option 555477 defines a mapping and its corresponding with a matching name. Although the text is truncated in the options, it is the only one structured correctly, whereas the others contain invalid element tags (like mismatched with).

Multiple choice technology programming languages
  1. <load-on-startup>true</load-on-startup>

  2. <load-on-startup>1</load-on-startup>

  3. <load-on-startup>0</load-on-startup>

  4. <load-on-startup/>

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

The `` element specifies that a servlet should be loaded and initialized when the servlet container starts. A positive integer (like 1) specifies the load order. Non-numeric values (like 'true') or 0 are not standard or carry different specifications.

Multiple choice technology programming languages
  1. <servlet> <servlet-name>login</servlet-name> <servlet-class>com.tcs.login.LoginServlet</servlet-class> <init-param> <param-name>mailId</param-name> <param-value>[email protected]</param-val

  2. <servlet> <servlet-name>login</servlet-name> <servlet-class>com.tcs.login.LoginServlet</servlet-class> </servlet> <init-param> <param-name>mailId</param-name> <param-value>[email protected]

  3. <servlet> <servlet-name>login</servlet-name> <servlet-class>com.tcs.login.LoginServlet</servlet-class> </servlet> <servlet-init-param> <param-name>mailId</param-name> <param-value&

  4. <servlet> <servlet-name>login</servlet-name> <servlet-class>com.tcs.login.LoginServlet</servlet-class> <servlet-init-param> <param-name>mailId</param-name> <param-value>[email protected]</

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

Servlet initialization parameters must be defined within the element using , , and . The parameter configuration is scoped to the specific servlet and cannot appear outside the servlet declaration. Options B and C incorrectly place init-param outside the servlet tag, while D uses a non-existent element name.

Multiple choice technology web technology
  1. directives

  2. properties

  3. methods

  4. events

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

Java Beans are reusable Java components with specific features: properties (getter/setter methods for data access), methods (business logic), and events (notification mechanism for state changes). Directives are NOT a Java Bean feature - they are instructions for containers or processors (like JSP directives or compiler directives). The question asks what is NOT a feature, making 'directives' the correct answer.

Multiple choice technology programming languages
  1. session and request

  2. page, request and session

  3. page, request, session and application

  4. request, session and application

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

Struts provides four scope options: page (current page only), request (current HTTP request), session (user session across requests), and application (global to the web application). These scopes control data visibility and lifecycle throughout the application.

Multiple choice technology web technology
  1. To clear the namespace prior to installing or redeploying an application

  2. When the application server will not start because the JNDI namespace tables have become corrupted

  3. Before regenerating the plug-in for the Web server

  4. When applications are experiencing a problem accessing a specific WebSphere data source

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

The dumpNameSpace utility is primarily used for diagnosing JNDI and namespace-related issues, including applications having trouble accessing specific WebSphere resources like data sources that are registered in the JNDI namespace.

Multiple choice technology web technology
  1. Class loader configuration

  2. Virtual host configuration

  3. HTTPS port configuration

  4. Admin console configuration

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

Virtual host configuration isolates web modules by controlling which applications/resources can be accessed through specific virtual hosts. This provides security and resource separation between different web modules.

Multiple choice technology mainframe
  1. Bring in another System z machine

  2. Implement a firewall on the mainframe and use WebSphere to enable the web site on a Linux server.

  3. Implement a firewall on a new, small Unix server and use WebSphere to enable the web site on the mainframe

  4. Implement a firewall on a new Windows XP server and use WebSphere to enable the web site on a new Windows XP server.

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

For security and architectural design, implementing a firewall on a dedicated Unix/Linux edge server while hosting the core WebSphere application server directly on the z/OS mainframe allows secure external web access while keeping the application tier tightly coupled to mainframe backend data.

Multiple choice technology programming languages
  1. GET

  2. TRACE

  3. POST

  4. HEAD

  5. OPTIONS

  6. SERVICE

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

An idempotent method can be called multiple times yielding the same side effects. GET, HEAD, OPTIONS, and TRACE are safe and idempotent. POST is typically not idempotent because multiple identical requests can result in duplicate resource creation or state updates.

Multiple choice technology programming languages
  1. 2

  2. 3

  3. 4

  4. 5

  5. 6

  6. 7

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

The select element has 5 unselected options. With multiple attribute enabled, all 5 could be selected in addition to the 2 pre-selected ones (Java, C), giving 7 total. The submit button is a different parameter and doesn't affect the Languages count.