JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III WEB TECHNOLOGIES Previous Question Paper (February/March - 2022 - R16)

B.Tech | III | II | R16 | February/March - 2022

Answer PaperPaper Code: 136ENMaximum Marks: 75Time: 3 Hours

Answer any five questions

All questions carry equal marks

Main

1

List and explain different file handling operations in PHP.

15 marks

Answer

PHP provides a comprehensive set of built-in functions to perform file handling operations, allowing developers to create, read, write, append, and delete files on the server. The primary operations are as follows:

  1. Opening a File (fopen): The fopen() function is used to open a file or URL. It requires two parameters: the filename and the mode (e.g., 'r' for read-only, 'w' for write-only, 'a' for append). It returns a file pointer resource on success or false on failure.
  2. Reading a File: Several functions exist for reading content. fread() reads a specified number of bytes from an open file. fgets() reads a single line, while fgetc() reads a single character. file_get_contents() is a convenient function that reads the entire file into a string without needing to manually open or close it.
  3. Writing to a File: The fwrite() function is used to write data to an open file stream. It takes the file pointer and the string to be written as arguments. Alternatively, file_put_contents() can be used to write data to a file in a single operation, which automatically handles opening and closing the file.
  4. Closing a File: The fclose() function is essential to release the system resources associated with an open file pointer. It is best practice to close files immediately after operations are completed.
  5. File Checking and Deletion: PHP provides utility functions like file_exists() to verify if a file exists, filesize() to determine the file size, and unlink() to delete a file from the server filesystem.
  6. File Locking: To prevent data corruption during concurrent write operations, flock() is used to set an advisory lock on the file, ensuring that only one process can modify the file at a time.
215 marks
a

Explain the process of reading data from web form.

7 marks

Answer

Reading data from a web form involves capturing user input submitted via an HTML form using the HTTP GET or POST methods. When the form is submitted, the data is sent to the server-side script specified in the form's action attribute. In PHP, this data is accessed through the superglobal arrays $_GET or $_POST, where the keys correspond to the 'name' attributes of the form input elements.

  1. The HTML form must define the method (GET or POST) and the action (the target script).
  2. The server script receives the request and parses the key-value pairs from the HTTP request body or URL parameters.
  3. The script retrieves specific values using the syntax
    $value = $_POST['input_name'];
  4. It is essential to sanitize and validate this input to prevent security vulnerabilities like SQL injection or Cross-Site Scripting (XSS).
b

Define directories? How to list directories using PHP?

8 marks

Answer

Sign in to view the complete answer paper.

3

Briefly explain about parsing XML in detail.

15 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Write a short note on XML DTD.

7 marks

Answer

Sign in to view the complete answer paper.

b

What is XHTML? Explain the XHTML.

8 marks

Answer

Sign in to view the complete answer paper.

5

Describe how an HTTP servlet handles its client request.

15 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

How can you invoke other web resources such as servlets /JSPs?

8 marks

Answer

Sign in to view the complete answer paper.

b

Define environment variables. Name and discuss any two CGI environment variables.

7 marks

Answer

Sign in to view the complete answer paper.

7

Explain the benefits of using JavaBeans to separate business logic from presentation markup within the JSP environment.

15 marks

Answer

Sign in to view the complete answer paper.

8

Explain about Document Object Model in JavaScript in detail.

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of WEB TECHNOLOGIES from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech CSE III II, February/March - 2022, R16.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in WEB TECHNOLOGIES

Loading Question Papers

Fetching data from database...