Computer Knowledge

Java Enterprise and Web Technologies

2,279 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
  1. GET

  2. send

  3. POST

  4. getXMLHttpRequest

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

In the XMLHttpRequest API, the send() method is used to actually send the HTTP request to the server after it has been opened with open(). GET and POST are request methods passed to open(), not methods themselves. getXMLHttpRequest is not a standard method.

Multiple choice technology platforms and products
  1. Easy deployment to multiple servers in farm.

  2. No need to update web.config manually.

  3. automatic deployment to new server added to farm.

  4. can not deploy files in folders outside 12 hive.

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

Solution packages have a limitation - they cannot deploy files to folders outside the SharePoint 12 hive (the installation directory structure). The other options listed are advantages: easy multi-server deployment, automatic web.config updates, and automatic deployment to new farm servers. The 12 hive restriction is a structural limitation of the solution framework.

Multiple choice technology web technology
  1. jspInit()

  2. jspservice()

  3. jspDestroy()

  4. All of the above

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

JSP has three life cycle methods: jspInit() is called when the JSP is initialized, _jspService() handles each request (the option has a minor typo omitting the underscore), and jspDestroy() is called when the JSP is taken out of service. All three methods are part of the JSP life cycle.

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

The correct XML syntax for welcome files in web.xml uses the element containing elements. This defines the list of files the server looks for when a user requests a directory URL (like '/').

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

In corporate settings using IBM WebSphere, developers typically lack direct system administrative permissions to clear JVM logs on server instances. Submitting a work request to the WebSphere deployment/infrastructure team (WDT) is the correct process.

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.