JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

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

B.Tech | III | III-II | R16 | January/February - 2021

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

Answer any five questions

All questions carry equal marks

Main

1

Create a PHP form to accept user id and password with necessary validations.

15 marks

Answer

To create a secure PHP form for user authentication, we define an HTML form that submits data to a PHP script using the POST method. The PHP script then performs server-side validation to ensure the fields are not empty and meet security requirements.

The following HTML structure creates the input fields:

<form method="post" action="login.php">
  User ID: <input type="text" name="userid" required><br>
  Password: <input type="password" name="password" required><br>
  <input type="submit" value="Login">
</form>

The server-side PHP validation script processes the input:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $userid = trim($_POST['userid']);
    $password = $_POST['password'];

    if (empty($userid) || empty($password)) {
        echo "User ID and Password are required.";
    } elseif (strlen($password) < 8) {
        echo "Password must be at least 8 characters long.";
    } else {
        // Sanitize input to prevent XSS
        $userid = htmlspecialchars($userid);
        echo "Validation successful for user: " . $userid;
    }
}
?>

Key validation steps include:

  • Empty Check: Using empty() to ensure fields are not submitted blank.
  • Sanitization: Applying htmlspecialchars() to prevent Cross-Site Scripting (XSS) attacks.
  • Input Trimming: Using trim() to remove unnecessary whitespace from the User ID.
  • Length Validation: Ensuring the password meets minimum complexity requirements before processing.
215 marks
a

Design a layout using XML containing an application form.

7 marks

Answer

An XML layout for an application form organizes data hierarchically using descriptive tags. The structure includes root elements for the form and nested elements for personal details and submission information.

<applicationForm>
  <applicant>
    <name>John Doe</name>
    <email>[email protected]</email>
    <phone>123-456-7890</phone>
  </applicant>
  <education>
    <degree>B.Tech</degree>
    <yearOfPassing>2024</yearOfPassing>
  </education>
  <submissionDate>2023-10-27</submissionDate>
</applicationForm>
b

Explain the XML schema languages in detail.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Elaborate the Common Gateway Interface and its important.

8 marks

Answer

Sign in to view the complete answer paper.

b

Give a brief note on Servlet.

7 marks

Answer

Sign in to view the complete answer paper.

4

Design the JSP application with MVC set up and explain the process and various entities in it.

15 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Write a short note on Event handlers in JavaScript.

7 marks

Answer

Sign in to view the complete answer paper.

b

Give a brief note on the AJAX application.

8 marks

Answer

Sign in to view the complete answer paper.

6

List and explain the different operators and control structures in PHP with an example.

15 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

What is an XML DOM? How DOM parses the XML file?

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a brief note on document type definition.

8 marks

Answer

Sign in to view the complete answer paper.

8

Draw and explain the Lifecycle of a Servlet.

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 III-II, January/February - 2021, 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...