You are on page 1of 3

Solved DSA 2020

Short Qs
Ans 1:

The HTML form tag is required when you want to collect


information that visitors provide. For example, you may want to collect
specific data from visitors, such as name, email address, and password.
The HTML <form> tag is used to create a form.

Ans 2:

The life cycle of a JSP page can be divided into the following
phase: Translation Phase. Compilation Phase. Initialization Phase.
A Java servlet file is generated from a JSP source file. This is the first step
of JSP life cycle. In translation phase, container validates the syntactic
correctness of JSP page and tag files.
Web Container translates JSP code into a servlet class source(. java) file,
then compiles that into a java servlet class. In the third step, the servlet
class bytecode is loaded using classloader.

{short.answer to this question:JSP Life Cycle is defined as translation of


JSP Page into servlet as a JSP Page needs to be converted into servlet
first in order to process the service requests. The Life Cycle starts with
the creation of JSP and ends with the disintegration of that.}

Ans 3:

Server-side scripting is used at the backend, where the source


code is not viewable or hidden at the client side (browser). On the other
hand, client-side scripting is used at the front end which users can see
from the browser. When a server-side script is processed it
communicates to the server.

Ans 4:

The MVC architecture empowers you to develop different view


components for your model component. As you can witness an ever-
increasing demand for new ways to access your web apps, MVC
architecture is your one-stop solution for developing different view
components.

Ans 5:

The page directive is used to provide instructions to the container


that pertain to the current JSP page. You may code the page directives
anywhere in your JSP page.

Ans 6:

AJAX allows web pages to be updated asynchronously by


exchanging data with a web server behind the scenes. This means that it
is possible to update parts of a web page, without reloading the whole
page.

Ans 7:

Before submitting data to the server, it is important to ensure all


required form controls are filled out, in the correct format. This is
called client-side form validation, and helps ensure data submitted
matches the requirements set forth in the various form controls.

Ans 8:

Before submitting data to the server, it is important to ensure all


required form controls are filled out, in the correct format. This is
called client-side form validation, and helps ensure data submitted
matches the requirements set forth in the various form controls.

Ans 9:

HTTP is a protocol for fetching resources such as HTML


documents. It is the foundation of any data exchange on the Web and it
is a client-server protocol, which means requests are initiated by the
recipient, usually the Web browser.
An HTTP client sends an HTTP request to a server in the form of a
request message which includes following format:
A Request-line. Zero or more header (General | Request | Entity) fields
followed by CRLF . An empty line (i.e. a line with nothing preceding the
CRLF) indicating the end of the header fields.

Ans 10:
The values of the numeric status code to HTTP requests are as
follows. The data sections of messages Error, Forward and redirection
responses may be used to contain human-readable diagnostic information.

Success 2xx

These codes indicate success. The body section if present is the object
returned by the request. It is a MIME format object. It is in MIME
format, and may only be in text/plain, text/html or one fo the formats
specified as acceptable in the request.

You might also like