0

web technology Online Quiz - 179

Description: web technology Online Quiz - 179
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0

An external JMS client is connected to a 2 managed server weblogic cluster using a Connection Factory that has server affinity enabled. The client is putting messages to a distribution destination (dd) deployed to the cluster. Which managed server(s) dd member will get the messages?

  1. The managed server which was used by the client for JNDI lokkup of the connection factory

  2. The managed server to which the client has a TCP connection after creating a new connection from the connection factory.

  3. Both the managed servers and in random order

  4. Only to One of the managed server and that can be in any order


Correct Option: B

Which program do you need to write HTML?

  1. Graphic designer

  2. Any text editor

  3. browsers

  4. all of the above


Correct Option: B

AI Explanation

To write HTML, you can use any text editor. This is because HTML is a markup language that uses plain text to structure and format web content. Text editors, such as Notepad, Sublime Text, or Visual Studio Code, provide a simple and efficient way to create and edit HTML files.

Let's go through each option to understand why it is correct or incorrect:

Option A) Graphic designer - This option is incorrect because although graphic designers may work with HTML to design web pages, they typically use specialized programs or software that offer a visual interface for creating web designs, rather than directly writing HTML code.

Option B) Any text editor - This option is correct because you can write HTML using any text editor. Text editors provide a basic environment for writing and editing plain text, which is exactly what HTML requires.

Option C) Browsers - This option is incorrect because browsers are not used to write HTML. Browsers are used to display and render HTML code, allowing users to view the web pages that have already been created.

Option D) All of the above - This option is incorrect because not all options mentioned are correct. While option B (Any text editor) is correct, options A (Graphic designer) and C (Browsers) are incorrect.

The correct answer is B) Any text editor. This option is correct because you can use any text editor to write HTML code.

What tag tells the browser where the page starts and stops ?

  1. both 1 & 2


Correct Option: C

Find the odd one

  1. STRUTS

  2. SPRINGS

  3. DOJO

  4. FLEX


Correct Option: D

Pick the odd one

  1. CPP

  2. JAVA

  3. SMALL TALK

  4. C


Correct Option: D

Odd one out

  1. JAR

  2. PAR

  3. DAR

  4. WAR


Correct Option: B

Pick the odd one

  1. ZEUS

  2. JIGSAW

  3. LIGHTTP

  4. WEBLOGIC


Correct Option: D

Pick the odd one

  1. JBOSS

  2. JRUN

  3. XITAMI

  4. GLASS FISH


Correct Option: C

THE NUMBER OF COLUMNS ON A TABLE THAT YOU CAN COLLECT STATISTICS IS

  1. 64

  2. 128

  3. 32

  4. 512


Correct Option: D

What is the equivalent action code for the following piece of JSP code snippet? EmployeeBean harry = (EmployeeBean)request.getAttribute("harry"); if (harry == null) { harry = new EmployeeBean(); request.setAttribute("harry", harry); }


Correct Option: C

Which of the following is a valid declaration of a Tag Library in a Deployment Descriptor?


Correct Option: C

A class wants to keep track of its number of objects being added to HttpSession objects. Which will be the ideal way to achieve this?

  1. Define a listener class implementing HttpSessionListener and whenever an object is added to Http Session object, keep track of the number of instances.

  2. Define a listener class implementing HttpSessionBindingListener and in the valueBound() method, keep track of the number of instances being added in a static variable.

  3. It is highly impossible to keep track the number of objects being added to a Http Session in a Web Application.

  4. The Servlet API provides direct support for keeping track the object instances.


Correct Option: B

What method can be used to retrieve all the parameter names being sent as part of the request by the client?

  1. Use the method 'HttpServletRequest.getParameterNames()' which will return an enumeration of parameter names.

  2. Use the method 'HttpServletResponse.getParameterNames()' which will return an enumeration of parameter names.

  3. Use the method 'HttpServletRequest.getAllParameters()' which will return an enumeration of parameter names.

  4. There is no direct support in the Servlet API to retrieve the name of all the parameters sent by the client.


Correct Option: A

What will be the output of the following JSP code snippet at run-time when it is accessed the third time? The value of test is

  1. The value of the 'test' variable will be 2.

  2. The value of the 'test' variable will be 0.

  3. The value of the 'test' variable will be 1.

  4. The variable 'test' must be declared at global scope, else a run-time error will occur


Correct Option: C

Following is an excerpt taken from a Deployment Descriptor of some Web Application. app-name MockQuestions ContextInfoServlet scwcd14.chap03.ContextInfoServlet app-name ContextInfoServlet Which of the following code will output the message 'MockQuestions ContextInfoServlet' to the client browser (assuming that 'out' is a valid instance of type 'PrintWriter' class)?

  1. out.println(config.getServletContext().getParameter("app-name")); out.println(config.getInitParameter("app-name"));

  2. out.println(config.getInitParameter("app-name")); out.println(config.getServletContext().getInitParameter("app-name"));

  3. out.println(config.getServletContext().getInitParameter("app-name")); out.println(config.getInitParameter("app-name"));

  4. out.println(config.getServletContext().getInitParameter("app-name")); out.println(config.getParameter("app-name"));


Correct Option: C

Which of the following EL expression retrieves the value of the attribute by name 'attribute' found in HTTP's request object

  1. ${request.getAttribute()}

  2. ${request.attribute}

  3. ${pageContext.request.getAttribute()}

  4. ${pageContext.request.attribute}


Correct Option: D

A software company wants to develop a component that does many of the pre-processing stuffs like whether the requests are coming from authentic sources, filtering unwanted data in the request object. What type of pattern will be the best match for developing such a component?

  1. Front Controller

  2. Business Controller

  3. Business Delegate

  4. Intercepting Filter


Correct Option: D

What method can be used to retrieve all the parameter names being sent as part of the request by the client?

  1. Use the method 'HttpServletRequest.getParameterNames()' which will return an enumeration of parameter names.

  2. Use the method 'HttpServletResponse.getParameterNames()' which will return an enumeration of parameter names.

  3. Use the method 'HttpServletRequest.getAllParameters()' which will return an enumeration of parameter names.

  4. There is no direct support in the Servlet API to retrieve the name of all the parameters sent by the client.


Correct Option: A

What is the equivalent action code for the following piece of JSP code snippet? EmployeeBean harry = (EmployeeBean)request.getAttribute("harry"); if (harry == null) { harry = new EmployeeBean(); request.setAttribute("harry", harry); }


Correct Option: C

Which of the following EL expression retrieves the value of the attribute by name 'attribute' found in HTTP's request object

  1. ${request.getAttribute()}

  2. ${request.attribute}

  3. ${pageContext.request.getAttribute()}

  4. ${pageContext.request.attribute}


Correct Option: D
- Hide questions