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
-
By sending a mail to websphere_test team
-
By submitting a work request to WDT team
-
Either a or b
-
None of the above
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.
A,B
Correct answer
Explanation
The View layer in MVC architecture is responsible for the user interface and presentation. HTML provides structure, CSS provides styling - both are frontend technologies used in the View. EJB and Servlets are backend technologies used in Model/Controller layers.
-
ps.xml
-
Action controller
-
JSP file
-
Servlet
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.
-
<welcome> <welcome-file>index.jsp</welcome-file> </welcome>
-
<welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
-
<welcome-files> <welcome-file>index.jsp</welcome-file> </welcome-files>
-
<welcome-files> <welcome>index.jsp</welcome> </welcome-files>
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.
-
<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
-
<servlet-mapping> <servlet-class>com.tcs.login.LoginServlet </servlet-name> <url-pattern>/utils/LoginServlet</url-pattern> </servlet-mapping>
-
<servlet> <servlet-class>com.tcs.login.LoginServlet </servlet-name> <url-pattern>/utils/LoginServlet</url-pattern> </servlet>
-
<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
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).
-
<load-on-startup>true</load-on-startup>
-
<load-on-startup>1</load-on-startup>
-
<load-on-startup>0</load-on-startup>
-
<load-on-startup/>
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.
-
<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
-
<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]
-
<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&
-
<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]</
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.
-
directives
-
properties
-
methods
-
events
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.
-
session and request
-
page, request and session
-
page, request, session and application
-
request, session and application
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.
-
To clear the namespace prior to installing or redeploying an application
-
When the application server will not start because the JNDI namespace tables have become corrupted
-
Before regenerating the plug-in for the Web server
-
When applications are experiencing a problem accessing a specific WebSphere data source
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.
-
Class loader configuration
-
Virtual host configuration
-
HTTPS port configuration
-
Admin console configuration
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.
-
Bring in another System z machine
-
Implement a firewall on the mainframe and use WebSphere to enable the web site on a Linux server.
-
Implement a firewall on a new, small Unix server and use WebSphere to enable the web site on the mainframe
-
Implement a firewall on a new Windows XP server and use WebSphere to enable the web site on a new Windows XP server.
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.
-
GET
-
TRACE
-
POST
-
HEAD
-
OPTIONS
-
SERVICE
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.
-
DELETE
-
TRACE
-
OPTIONS
-
POST
-
PUT
-
HEAD
A,D,E
Correct answer
Explanation
In HTTP, DELETE removes resources, POST creates new resources, and PUT updates or replaces resources - all of which change server state. Safe methods like GET, HEAD, OPTIONS, and TRACE only retrieve information without modifying state.
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.