Tag: web technology

Questions Related to web technology

What is happening behind the scenes is that your JSP is being turned into a Java file, compiled and loaded. This compilation only happens once, so after the first load, the file doesn't take long to load anymore.

  1. True

  2. False


Correct Option: A

Jsp Page can be excuted from the below, (choose multiple)

  1. Tomcat

  2. Weblogic

  3. Websphere

  4. None of the above


Correct Option: A,B,C
  1. The forward method transfers control to the designated resource, while the include method invokes the designated resource, substitutes its output dynamically in the display, and returns control to the calling page.

  2. The two methods provide the same functionality, but with different levels of persistence.

  3. The forward method is deprecated as of JSP 1.1 and the include method should be used in order to substitute portions of a dynamic display at runtime.

  4. The include method transfers control to a dynamic resource, while the forward method allows for dynamic substitution of another JPS pages output, returning control to the calling resource.


Correct Option: A

What is the initial contact point for handling a web request in a Page-Centric architecture?

  1. A JSP page

  2. A JavaBean

  3. A servlet

  4. A session manager


Correct Option: A

AI Explanation

To answer this question, you need to understand the concept of a Page-Centric architecture.

In a Page-Centric architecture, the web request is first handled by a specific page. Each page is responsible for handling a specific request and generating the appropriate response.

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

Option A) A JSP page - This option is correct because in a Page-Centric architecture, a JSP (JavaServer Pages) page is often used as the initial contact point for handling a web request. The JSP page contains a mix of HTML and Java code and can be used to generate dynamic content.

Option B) A JavaBean - This option is incorrect. A JavaBean is a reusable software component that follows certain naming conventions. While JavaBeans can be used in a Page-Centric architecture, they are not the initial contact point for handling a web request.

Option C) A servlet - This option is incorrect. A servlet is a Java program that runs on a web server and handles client requests. While servlets can be used in a Page-Centric architecture to handle web requests, they are not the initial contact point.

Option D) A session manager - This option is incorrect. A session manager is responsible for managing user sessions in a web application. While a session manager is an important component of a web application, it is not the initial contact point for handling a web request in a Page-Centric architecture.

The correct answer is A) A JSP page. This option is correct because in a Page-Centric architecture, a JSP page is often used as the initial contact point for handling a web request.

  1. Yes, but the only tags available relate to database access.

  2. No. To iterate over a collection of values, one must use scriptlet code.

  3. No, but there is a standard tag that may be used.

  4. Yes, but custom tags will not help developers create tags for use in iterating over a collection.


Correct Option: B
  1. Lookup the EJBs from within a JSP, but use the EJBs from within a basic JavaBean.

  2. Lookup and use the EJBs from a separate business delegate. The JavaBeans that work with JSP pages are clients to these business delegates and know nothing about EJB specifics.

  3. Lookup and use the EJBs from within a JSP page, but only as remote references.

  4. Lookup the EJBs from within a servlet, delegating usage to specific JSP pages.


Correct Option: B
  1. Code that deals with logic that is common across requests.

  2. Code that deals with logic that is vendor specific.

  3. Code that deals with logic that relates to database access.

  4. Code that deals with logic that relates to client scope.


Correct Option: A