WT 1M Questions (R20)
WT 1M Questions (R20)
1. Page Directives
2. Include Directives
3. Taglib Directives
(24) Write the various attributes for the page directives in JSP.
A:- Various attributes for the page directives in JSP include:
1. language: Specifies the scripting language used in the JSP page (e.g., "java").
2. extends: Specifies the superclass of the generated servlet.
3. contentType: Sets the MIME type of the response (e.g., "text/html").
4. pageEncoding: Specifies the character encoding used in the JSP page.
5. session: Indicates whether the JSP page participates in session management.
6. buffer: Specifies the buffer size for output.
7. autoFlush: Indicates whether the buffer is automatically flushed.
8. isThreadSafe: Specifies whether the generated servlet is thread-safe.
9. info: Provides descriptive information about the JSP page.
10. errorPage: Specifies the URL of the error page for handling exceptions.
11. isErrorPage: Indicates whether the JSP page is an error page.
12. import: Declares classes to be imported into the JSP page.
13. deferredSyntaxAllowedAsLiteral: Allows using EL expressions with deferred syntax as literals.
14. trimDirectiveWhitespaces: Controls white space handling.
15. buffer: Specifies the buffer size for output.
(26) What is the difference between ROWSPAN and COLSPAN in a HTML Table?
1. A:- ROWSPAN:
• ROWSPAN attribute is used to span a cell across multiple rows in a table.
• It specifies the number of rows that the cell should span.
• When applied to a cell, it merges the cell vertically, occupying the specified number of
rows.
2. COLSPAN:
• COLSPAN attribute is used to span a cell across multiple columns in a table.
• It specifies the number of columns that the cell should span.
• When applied to a cell, it merges the cell horizontally, occupying the specified number
of columns.
(43) List any three Mathematical functions in JavaScript. What are the uses of namespace
in XML?
A:- Math.abs(x): Returns the absolute value of a number. It removes the sign of the
number, if any.
Math.pow(x, y): Returns the value of a base number raised to the power of an exponent.
Math.sqrt(x): Returns the square root of a number.
Uses of namespace in xml:-
1. Avoiding Naming Collisions: Namespaces allow elements or attributes with the same name but
from different vocabularies to coexist in a document without conflict.
2. Modularity: Namespaces help organize XML documents into modules, each with its own set of
element and attribute names, facilitating reuse and maintenance.
3. Interoperability: Namespaces enable XML documents from different sources to be combined
or processed together without ambiguity, improving interoperability between systems.
• class can be applied to multiple elements, while id must be unique within the document.
• An element can have multiple classes, but only one ID.
• Classes are used to style or group elements, while IDs are used for unique identification or
targeting specific elements for manipulation.
A:- schemas provide a more robust and feature-rich mechanism for defining and validating
XML document structures compared to DTDs. They offer improved data typing, namespace
support, expressiveness, modularity, and validation flexibility, making them the preferred
choice for defining XML schemas in many applications.
list of advantages of schema over DTD:
1. Strongly Typed
2. Namespace Support
3. More Expressive
4. Modularity and Reusability
5. Support for XML Data Types
6. Validation Flexibility
(57) What are the differences between Get and Post methods?
1. A:- Data Submission Method:
• GET: Data is submitted via URL parameters appended to the end of the URL.
• POST: Data is submitted within the body of the HTTP request.
2. Security:
• GET: Parameters are visible in the URL, making them less secure for sensitive data, such
as passwords.
• POST: Parameters are not visible in the URL, providing better security for sensitive data.
3. Data Length Limit:
• GET: Limited by the maximum length of a URL, typically around 2048 characters.
• POST: Not limited by the length of the URL and can handle larger amounts of data.
4. Caching:
• GET: Responses can be cached by the browser, leading to potential issues with caching
of sensitive data.
• POST: Responses are not cached by default, reducing the risk of sensitive data being
cached.
5. Idempotence:
• GET: Requests are idempotent, meaning multiple identical requests have the same
effect as a single request.
• POST: Requests are not necessarily idempotent, as multiple identical requests may
result in different actions or side effects.
6. Visibility:
• GET: Parameters are visible in the URL, making them easier to bookmark and share.
• POST: Parameters are not visible in the URL, making them more suitable for submitting
sensitive or large amounts of data.
7. Usage:
• GET: Typically used for retrieving data or performing read-only operations.
• POST: Typically used for submitting data or performing actions that modify server state.
By:
M.AjayGopiNath
K.Vara Prasad
K.Vamsi Krishna
K.Venu Sai