JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2020 WEB TECHNOLOGIES Previous Question Paper (October/ November - 2020 - R17)
Answer any five questions
All questions carry equal marks
Main
Briefly describe various aspects of PHP’s array-manipulation capabilities.
Answer
PHP provides a robust set of array-manipulation functions that treat arrays as versatile data structures, supporting both indexed and associative storage. Key aspects include:
- Array Creation and Initialization: Arrays are created using the array() construct or the short [] syntax, supporting mixed data types.
- Sorting Functions: PHP offers specialized sorting such as sort(), rsort() for indexed arrays, and asort(), ksort() for associative arrays to maintain key-value relationships.
- Stack and Queue Operations: Arrays can function as stacks or queues using functions like array_push(), array_pop(), array_shift(), and array_unshift().
- Searching and Filtering: Functions like in_array() allow for existence checks, while array_filter() and array_map() provide functional programming capabilities to process or transform array elements based on callback logic.
- Merging and Slicing: Arrays can be combined using array_merge() or partitioned using array_slice() and array_splice() for dynamic data management.
How to read data from a web form using PHP script.
Answer
Reading data from a web form in PHP involves accessing superglobal arrays that capture input based on the HTTP method specified in the form tag.
- Form Definition: The HTML form must specify the method attribute as either GET or POST.
- Accessing GET Data: When method='GET' is used, form data is appended to the URL and accessed via the $_GET associative array.
- Accessing POST Data: When method='POST' is used, data is sent in the request body, which is more secure for sensitive information, and accessed via the $_POST superglobal.
- Implementation Example: To retrieve a field named 'username', use the syntax $user = $_POST['username'];
- Validation: It is essential to use functions like isset() or empty() to verify that the form data exists before processing it to prevent undefined index errors.
Write a PHP script to connect and view information in the MySQL database.
Answer
Sign in to view the complete answer paper.
Write down the features of PHP.
Answer
Sign in to view the complete answer paper.
Explain the difference between XML Schemas and DTDs.
Answer
Sign in to view the complete answer paper.
How to use SAX parser in JAVA? Illustrate.
Answer
Sign in to view the complete answer paper.
Describe the XML DOM Node Tree with an illustrative example.
Answer
Sign in to view the complete answer paper.
Elaborate the HTTP request and response mechanism using Servlets.
Answer
Sign in to view the complete answer paper.
Describe in detail how can a JSP be connected to a database using JDBC.
Answer
Sign in to view the complete answer paper.
Explain the working principle of JSP Containers.
Answer
Sign in to view the complete answer paper.
Write a Java script to validate user credentials. Use regular expressions for denoting credentials.
Answer
Sign in to view the complete answer paper.
What are the applications of Java script?
Answer
Sign in to view the complete answer paper.