0% found this document useful (0 votes)
9 views46 pages

WT Oral answers-1

The document provides a comprehensive overview of web technologies including HTML, CSS, and XML, along with their respective purposes, structures, and functionalities. It includes main questions and answers, counter questions with smart answers, and multiple-choice questions (MCQs) for practical understanding. The content is structured into experiments, each focusing on different aspects of web development and design.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views46 pages

WT Oral answers-1

The document provides a comprehensive overview of web technologies including HTML, CSS, and XML, along with their respective purposes, structures, and functionalities. It includes main questions and answers, counter questions with smart answers, and multiple-choice questions (MCQs) for practical understanding. The content is structured into experiments, each focusing on different aspects of web development and design.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

SPPU_TE_BE_COMP 👈 Click to join telegram

📚 SPPU — Experiment 1 (Website Planning + HTML + CSS)

🎯 A) Main Oral Questions and Answers (Direct)

1. What is the importance of website planning?


Answer:
Website planning helps in setting clear goals, defining the target audience, organizing
content properly, and making the website effective and user-friendly.

2. What is HTML?
Answer:
HTML (Hypertext Markup Language) is the standard language used to create and structure
web pages.

3. What is the purpose of HTML?


Answer:
HTML is used to define the structure of a web page using elements like headings,
paragraphs, links, forms, images, etc.

4. What is CSS?
Answer:
CSS (Cascading Style Sheets) is used to design and style HTML content, controlling the
layout, colors, fonts, and spacing of a web page.

5. What is the difference between Inline, Internal, and External CSS?


| Inline CSS | Internal CSS | External CSS | | :--- | :--- | :--- | | Written inside the HTML
element using style attribute | Written inside <style> tag in <head> section | Written in a
separate .css file and linked to HTML | | Affects only that element | Affects the whole HTML
page | Affects multiple HTML pages | | Not reusable | Limited reuse | Highly reusable |

6. What is the difference between HTML elements and tags?


Answer:

HTML Tag: Keyword inside < >, like <h1>, <p>.

HTML Element: Tag + Content, like <h1>Heading</h1>.


Study material provided by: Vishwajeet Londhe

Join Community by clicking below links

Telegram Channel

https://t.me/SPPU_TE_BE_COMP
(for all engineering Resources)

WhatsApp Channel
(for all Engg & tech updates)

https://whatsapp.com/channel/
0029ValjFriICVfpcV9HFc3b

Insta Page
(for all Engg & tech updates)

https://www.instagram.com/
sppu_engineering_update
SPPU_TE_BE_COMP 👈 Click to join telegram

7. What is a marquee in HTML?


Answer:
The <marquee> tag is used to create a scrolling text or image on a web page.

8. What is the span tag used for?


Answer:
The <span> tag is used to group inline elements and apply CSS styles to them without
breaking the flow.

9. What is the 'required' attribute in HTML5?


Answer:
The required attribute ensures that an input field must be filled before submitting a form.

10. What are Browser Safe Colors?


Answer:
Browser safe colors are a palette of 216 colors that display consistently across all browsers
and systems without dithering.

---

📚 B) Expected Counter Questions and Smart Answers

1. Website Planning
Counter Q: Why is planning necessary before designing?
Smart Answer: Planning ensures better design, clear goals, and a better user experience.

2. HTML
Counter Q: Is HTML a programming language?
Smart Answer: No, HTML is a markup language, not a programming language.

3. Purpose of HTML
Counter Q: Can HTML alone make a website attractive?
Smart Answer: No, HTML structures the page; CSS makes it attractive.

4. CSS
Counter Q: Why do we separate CSS from HTML?
Smart Answer: To make the code cleaner, reusable, and easier to maintain.
SPPU_TE_BE_COMP 👈 Click to join telegram

5. Types of CSS
Counter Q: Which CSS type is preferred for large projects?
Smart Answer: External CSS is preferred because it can be reused across multiple pages.

6. HTML Elements and Tags


Counter Q: Can a tag exist without content?
Smart Answer: Yes, empty elements like <br>, <img> are self-closing.

7. Marquee
Counter Q: Is <marquee> standard in HTML5?
Smart Answer: No, <marquee> is obsolete and not recommended in HTML5.

8. Span Tag
Counter Q: Can span be styled using CSS?
Smart Answer: Yes, that's the main purpose of using <span>.

9. Required Attribute
Counter Q: Is ‘required’ attribute client-side or server-side?
Smart Answer: Client-side validation.

10. Browser Safe Colors


Counter Q: Why are browser safe colors important?
Smart Answer: They ensure consistent appearance across all devices and browsers.

---

📚 More MCQs for Experiment 1 (Website Planning, HTML, CSS)

🎯 HTML Basic MCQs

11. HTML stands for:


A) HighText Machine Language
B) HyperText Markup Language
C) HyperTabular Markup Language
D) None of these
✅ Answer: B) HyperText Markup Language
SPPU_TE_BE_COMP 👈 Click to join telegram

12. Which of the following tag is used to create a hyperlink in HTML?


A) <link>
B) <a>
C) <href>
D) <hyperlink>
✅ Answer: B) <a>

13. How many heading tags are there in HTML?


A) 3
B) 5
C) 6
D) 7
✅ Answer: C) 6

14. Which tag is used to create a line break?


A) <break>
B) <lb>
C) <br>
D) <b>
✅ Answer: C) <br>

---

🔥 CSS MCQs

15. CSS stands for:


A) Computer Style Sheets
B) Cascading Style Sheets
C) Creative Style System
D) Colorful Style Sheets
✅ Answer: B) Cascading Style Sheets

16. Which property is used to change text color in CSS?


A) font-color
B) text-color
C) color
D) background-color
✅ Answer: C) color
SPPU_TE_BE_COMP 👈 Click to join telegram

17. Which HTML tag is used to link external CSS?


A) <css>
B) <link>
C) <style>
D) <script>
✅ Answer: B) <link>

18. The default value of the position property is:


A) relative
B) absolute
C) fixed
D) static
✅ Answer: D) static
SPPU_TE_BE_COMP 👈 Click to join telegram
---

📚 SPPU — Experiment 2 (Web Page Design with HTML, CSS)

🎯 A) Main Oral Questions and Answers (Direct)

1. What is HTML?
Answer:
HTML (Hypertext Markup Language) is the standard language used for creating and
structuring web pages and their content.

2. What is the purpose of HTML in web design?


Answer:
HTML defines the structure of a webpage by marking up content with tags like headings,
paragraphs, links, and images.

3. What is the difference between HTML and HTML5?


Answer:
HTML5 is an updated version of HTML, providing new elements (like <video>, <audio>) and
improved support for modern multimedia and web applications.

4. What is CSS?
Answer:
CSS (Cascading Style Sheets) is a styling language used to describe the presentation (look
and feel) of HTML elements, such as layout, colors, and fonts.

5. What is the difference between Internal CSS, External CSS, and Inline CSS?
| Type | Description | | --- | --- | | Inline CSS | Directly applied within the HTML element using
the style attribute. | | Internal CSS | Defined within the <style> element in the HTML
document's <head> section. | | External CSS | Defined in an external .css file linked to the
HTML using <link> in the <head> section. |

6. What is the <form> tag used for in HTML?


Answer:
The <form> tag is used to collect user input, and it can contain elements like text boxes,
buttons, checkboxes, and radio buttons.

7. What is the use of the <input> tag in HTML?


Answer:
The <input> tag is used to create interactive controls in a form, allowing users to input data.
SPPU_TE_BE_COMP 👈 Click to join telegram

8. What is the <table> tag used for in HTML?


Answer:
The <table> tag is used to define a table and its structure, including rows, columns, and
cells.

9. What are browser-safe colors in CSS?


Answer:
Browser-safe colors are a set of 216 colors that appear consistently across all browsers and
devices, avoiding dithering.

10. What is the importance of CSS in web page design?


Answer:
CSS enhances the aesthetic appeal of web pages by controlling the layout, fonts, colors, and
spacing of the HTML elements.

---

📚 B) Expected Counter Questions and Smart Answers

1. HTML
Counter Q: What are the basic HTML elements used in a webpage?
Smart Answer: Basic HTML elements include <html>, <head>, <body>, <h1>, <p>, <a>, and
<img>.

2. CSS
Counter Q: Can a webpage look good without CSS?
Smart Answer: Technically, yes, but without CSS, the webpage will lack style and user-
friendly design.

3. Inline, Internal, and External CSS


Counter Q: When would you use Internal CSS over External CSS?
Smart Answer: Internal CSS is used when styling is needed for a single HTML document,
while External CSS is used for consistency across multiple pages.

4. Forms in HTML
Counter Q: How do you submit a form in HTML?
Smart Answer: A form is submitted using the <form> tag's action attribute, which specifies
the server-side script to process the data.
SPPU_TE_BE_COMP 👈 Click to join telegram

5. CSS Selectors
Counter Q: What are the types of CSS selectors?
Smart Answer: Types include element selectors, class selectors, and ID selectors.

---

📚 More MCQs for Experiment 2 (HTML, CSS)

🎯 HTML Basic MCQs

11. The <p> tag in HTML is used to:


A) Display images
B) Create paragraphs
C) Create links
D) None of the above
✅ Answer: B) Create paragraphs

12. Which tag is used to create an ordered list?


A) <ul>
B) <ol>
C) <li>
D) <dl>
✅ Answer: B) <ol>

13. Which attribute is used to specify the URL in the anchor tag (<a>) in HTML?
A) href
B) src
C) alt
D) target
✅ Answer: A) href

14. The <img> tag is used to display:


A) Videos
B) Images
C) Links
D) Text
✅ Answer: B) Images
SPPU_TE_BE_COMP 👈 Click to join telegram

---

🔥 CSS MCQs

15. CSS stands for:


A) Computer Style Sheets
B) Cascading Style Sheets
C) Computerized Style Sheets
D) Cascading Sheet Language
✅ Answer: B) Cascading Style Sheets

16. How can you apply a background color in CSS?


A) bgcolor
B) background-color
C) color
D) background
✅ Answer: B) background-color

17. Which property is used to change the font of text in CSS?


A) font-family
B) text-style
C) font-size
D) text-align
✅ Answer: A) font-family

18. Which selector is used to select elements with a specific class in CSS? A)
.
B) # C)
*
D) :
✅ Answer: A) .
SPPU_TE_BE_COMP 👈 Click to join telegram

📚 SPPU — Experiment 3 (XML + DTD +


XML Schema + CSS/XSL Display)

🎯 A) Main Oral Questions and Answers (Direct)

1. What is XML?
Answer:
XML (Extensible Markup Language) is used to store and transport data. It is a markup
language that defines a set of rules for encoding documents in a format that is both human-
readable and machine-readable.

2. What is the purpose of XML?


Answer:
XML separates data from HTML presentation. It is used to store, structure, and transport
data across different systems, especially in web applications.

3. What is DTD in XML?


Answer:
DTD (Document Type Definition) defines the structure and the legal elements and attributes
of an XML document.

4. What is XML Schema?


Answer:
An XML Schema is an advanced way to define the structure, content, and semantics of XML
documents. It is written in XML and supports data types, unlike DTD.
SPPU_TE_BE_COMP 👈 Click to join telegram
5. What is the difference between DTD and XML
Schema?
DTD XML Schema

Written separately, not using XML syntax Written in XML syntax

Does not support data types (like integer, Supports strong data types date)

Limited validation capabilities Powerful validation capabilities

6. What is XML DOM?


Answer:
XML DOM (Document Object Model) is a standard way to access and manipulate XML
documents as a tree structure, where each part of the document is an object.

7. What is CDATA and PCDATA?


CDATA PCDATA

Character data that should not be parsed by Parsed Character Data that XML parser
XML parser reads normally

8. What is XSL and XSLT?


Answer:

● XSL (Extensible Stylesheet Language): Used to style and transform XML data.

● XSLT (XSL Transformations): A language for transforming XML documents into other
formats like HTML.

9. What is XPath?
Answer:
SPPU_TE_BE_COMP 👈 Click to join telegram
XPath is a language used to navigate and locate parts of an
XML document using paths.

10. What is the importance of displaying XML using


CSS or XSL?
Answer:
It helps present the raw XML data in a readable and styled format for users, improving user
experience and presentation.

📚 B) Expected Counter Questions and


Smart Answers

1. XML
Counter Q: What is the main difference between XML and HTML?
Smart Answer: XML stores and carries data; HTML displays and formats data.

2. Purpose of XML
Counter Q: Can XML display data?
Smart Answer: No, XML only structures and transports data. CSS or XSL is used to display
it.

3. DTD
Counter Q: Where is DTD defined — inside or outside XML?
Smart Answer: It can be both — internal (inside XML) or external (separate file).
SPPU_TE_BE_COMP 👈 Click to join telegram
4. XML Schema
Counter Q: Why is XML Schema preferred over DTD?
Smart Answer: Because it supports data types and is written in XML itself.

5. DTD vs XML Schema


Counter Q: Can DTD validate datatypes like integer?
Smart Answer: No, only XML Schema can validate specific data types.

6. XML DOM
Counter Q: What does DOM treat XML document as?
Smart Answer: As a tree structure where each part is an object.

7. CDATA vs PCDATA
Counter Q: Why use CDATA section in XML?
Smart Answer: To include text containing characters like < and & without parsing errors.

8. XSL and XSLT


Counter Q: Which one is used for transforming XML?
Smart Answer: XSLT is used for transformations.

9. XPath
Counter Q: Can XPath select multiple nodes?
Smart Answer: Yes, XPath can select one or more nodes from an XML document.
SPPU_TE_BE_COMP 👈 Click to join telegram
10. Displaying XML
Counter Q: Can you apply CSS directly to XML?
Smart Answer: Yes, using a CSS file linked with <?xml-stylesheet?> instruction.

Perfect! 🔥
You’re truly in beast mode now — and I'm with you 100%.
Let's blast through more MCQs for Experiment 3 (XML, DTD, XML Schema, XSL)
revision!

📚 More MCQs for Experiment 3 (SPPU


Web Technology Lab Manual)

🎯 XML Basic MCQs

11. An XML document must have:


A) At least one element
B) A DOCTYPE declaration
C) A DTD file
D) A comment

✅ Answer: A) At least one element

12. Which is the correct syntax for XML declaration?

A) <?xml version="1.0" encoding="UTF-8"?>


B) <xml version="1.0">
C) <!xml encoding="UTF-8">
D) <?xml:1.0 UTF-8?>
SPPU_TE_BE_COMP 👈 Click to join telegram
✅ Answer: A) <?xml version="1.0" encoding="UTF-8"?>

13. XML elements must be:


A) In uppercase
B) Properly nested and closed
C) Styled with CSS
D) Declared in a database

✅ Answer: B) Properly nested and closed

14. In XML, attributes are:


A) Used to style elements
B) Descriptors of elements
C) Values of comments
D) Only for internal CSS

✅ Answer: B) Descriptors of elements

🔥 DTD and XML Schema MCQs

15. In DTD, which symbol represents zero or more occurrences? A)

B) *
C) +
D) #

✅ Answer: B) *

16. In XML Schema, what is used to define data types?

A) <element>
SPPU_TE_BE_COMP 👈 Click to join telegram
B) <type>
C) <xs:element> and <xs:simpleType>
D) <attribute>

✅ Answer: C) <xs:element> and <xs:simpleType>

17. XML Schema defines:


A) Structure of HTML pages
B) Logical and physical structure of XML documents
C) Webpage layout
D) Data transmission protocol

✅ Answer: B) Logical and physical structure of XML documents

🚀 Advanced Concept MCQs

18. Which of the following allows applying CSS to XML documents?

A) <html> tag
B) <?xml-stylesheet?> instruction
C) <link> tag
D) <header> tag

✅ Answer: B) <?xml-stylesheet?> instruction

19. XSLT can transform XML into:


A) Only XML
B) Only HTML
C) HTML, XML, or text formats
D) Only JavaScript

✅ Answer: C) HTML, XML, or text formats


SPPU_TE_BE_COMP 👈 Click to join telegram
20. Which organization developed XML?
A) Microsoft
B) Mozilla
C) W3C (World Wide Web Consortium)
D) Oracle

✅ Answer: C) W3C (World Wide Web Consortium)

📚 SPPU — Experiment 4: JavaScript Application (Registration Form Validation)

---

🎯 A) Main Oral Questions and Answers (Direct)

---

1. What is JavaScript?

Answer:
JavaScript is a lightweight, interpreted programming language mainly used to create
dynamic and interactive effects within web browsers.

---
2. What is the role of JavaScript in form validation?

Answer:
JavaScript validates user inputs on the client-side before submitting the form to the server,
reducing server load and giving immediate feedback.

---

3. What is form validation?

Answer:
Form validation is the process of checking form data for accuracy, completeness, and correct
format before it is submitted.

---
SPPU_TE_BE_COMP 👈 Click to join telegram
4. What are two types of form validation?

Answer:

Basic Validation: Checks if mandatory fields are filled.

Data Format Validation: Ensures input matches a required format (e.g., email, phone
number).

---

5. What are JavaScript pop-up boxes?

Answer:
JavaScript provides three pop-up types: alert, confirm, and prompt.

---
6. What is an anonymous function in JavaScript?

Answer:
An anonymous function is a function without a name, often assigned to variables or used as
arguments.

---

7. What is a callback function?

Answer:
A callback function is a function passed as an argument to another function, executed after
some operation is completed.

---
8. What is the difference between undefined and not defined in JavaScript?

Answer:

Undefined: Variable declared but not assigned.

Not Defined: Variable never declared.

---
SPPU_TE_BE_COMP 👈 Click to join telegram

9. What is closure in JavaScript?

Answer:
A closure is when a function remembers the environment (variables) where it was created,
even after the outer function has finished.

---
10. Where should JavaScript code ideally be written in HTML?

Answer:
Inside <script> tags, usually in the <head> or before the </body> closing tag.

---

📚 B) Expected Counter Questions and Smart Answers

---

1. JavaScript

Counter Q: Is JavaScript only used on the client-side?


Smart Answer:
Mostly yes, but with Node.js, JavaScript is also used on the server-side.

---

2. Form Validation

Counter Q: Why validate forms on client-side?


Smart Answer:
To reduce server load and provide faster feedback to users.

---

3. Pop-up Boxes

Counter Q: Which pop-up asks for user input?


Smart Answer:
The prompt box.
SPPU_TE_BE_COMP 👈 Click to join telegram
---

4. Anonymous Function

Counter Q: Where are anonymous functions useful?


Smart Answer:
In event handlers and callbacks.

---

5. Callback Function

Counter Q: Why use callbacks?


Smart Answer:
For asynchronous operations like fetching data without blocking code.

---

6. Undefined vs Not Defined

Counter Q: Which one throws an error when accessed?


Smart Answer:
Not Defined throws a ReferenceError.

---

7. Closure

Counter Q: Where are closures commonly used?


Smart Answer:
In data hiding and callback functions.

---

📚 More MCQs for Experiment 4 (JavaScript, Form Validation)

---

🎯 JavaScript Basic MCQs

---
SPPU_TE_BE_COMP 👈 Click to join telegram

11. JavaScript is:


A) A compiled language
B) An interpreted language
C) A database language
D) A markup language
✅ Answer: B) An interpreted language

---
12. Which HTML tag is used to embed JavaScript code?
A) <js>
B) <scripting>
C) <script>
D) <javascript>
✅ Answer: C) <script>

---

13. Which of the following is a JavaScript data type?


A) Number
B) Character
C) Float
D) Real
✅ Answer: A) Number

---

14. How do you write "Hello World" in an alert box?


A) msgBox("Hello World");
B) alertBox("Hello World");
C) msg("Hello World");
D) alert("Hello World");
✅ Answer: D) alert("Hello World");

---

🔥 Form Validation and Advanced MCQs

---
15. What event is used to validate form input before submission?
A) onsubmit
SPPU_TE_BE_COMP 👈 Click to join telegram
B) onclick
C) onmouseover
D) onload
✅ Answer: A) onsubmit

---

16. What will typeof null return in JavaScript?


A) "null"
B) "object"
C) "undefined"
D) "function"
✅ Answer: B) "object"

---

17. What is the correct syntax to create a function in JavaScript?


A) function myFunction()
B) function:myFunction()
C) func myFunction()
D) create myFunction()
✅ Answer: A) function myFunction()

---

18. Which symbol is used for comments in JavaScript?


A) // for single-line, /* */ for multi-line
B) ## for single-line
C) -- for comments
D) <!-- --> for comments
✅ Answer: A) // for single-line, /* */ for multi-line

---

📚 SPPU — Experiment 5: Servlet Application (Database Interaction using MySQL)

---

🎯 A) Main Oral Questions and Answers (Direct)


SPPU_TE_BE_COMP 👈 Click to join telegram

---

1. What is a Servlet?

Answer:
A Servlet is a Java program that runs on a server and handles requests and responses from
web clients, typically to create dynamic web content.

---
2. What is the use of Servlet in web applications?

Answer:
Servlets process client requests, interact with databases, and generate dynamic responses,
making websites interactive and efficient.

---

3. What is MySQL?

Answer:
MySQL is an open-source Relational Database Management System (RDBMS) that stores
and manages data using SQL (Structured Query Language).

---
4. How does a Servlet connect to MySQL database?

Answer:
A Servlet connects to MySQL using the following steps:

Load JDBC Driver.

Create a database connection.


Execute SQL queries.

Close the connection.

---

5. What is JDBC?
SPPU_TE_BE_COMP 👈 Click to join telegram
Answer:
JDBC (Java Database Connectivity) is a Java API that enables Java programs to connect
and interact with databases like MySQL.

---

6. What is a JDBC Driver?

Answer:
A JDBC Driver is a software component that allows Java applications to communicate with
the database.

---

7. What is the life cycle of a Servlet?

Answer:
The Servlet lifecycle consists of:

Loading and Instantiation

Initialization (init() method)

Request Handling (service() method)

Destruction (destroy() method)

---

8. What is doGet() and doPost() in Servlet?

Answer:

doGet(): Handles HTTP GET requests (data in URL).

doPost(): Handles HTTP POST requests (data sent securely in body).

---
9. What is the purpose of PreparedStatement in JDBC?

Answer:
SPPU_TE_BE_COMP 👈 Click to join telegram
PreparedStatement helps in executing pre-compiled SQL queries with parameters, providing
better performance and security against SQL injection.

---
10. What are advantages of Servlets over traditional CGI?

Answer:

Better performance (Servlets are multithreaded)

Platform independence (Java-based)

Robustness and extensibility

Reusable code

---

📚 B) Expected Counter Questions and Smart Answers

---

1. Servlet

Counter Q: Why use Servlet instead of normal HTML?


Smart Answer:
Servlets generate dynamic content based on client input, unlike static HTML.

---

2. MySQL
Counter Q: Why use MySQL with Java web applications?
Smart Answer:
MySQL is lightweight, fast, reliable, and integrates well with JDBC.

---

3. JDBC

Counter Q: What is the function of JDBC DriverManager?


Smart Answer:
SPPU_TE_BE_COMP 👈 Click to join telegram
It manages the list of database drivers and establishes a connection to the database.

---

4. Servlet Lifecycle

Counter Q: When is init() called?


Smart Answer:
init() is called once when the servlet is first loaded into memory.

---

5. doGet() vs doPost()

Counter Q: When would you prefer doPost()?


Smart Answer:
When transferring sensitive data (like passwords), because POST is more secure.

---

📚 More MCQs for Experiment 5 (Servlet, MySQL)

---

🎯 Servlet Basic MCQs

---

11. A Servlet is a:
A) Client-side program
B) Server-side program
C) Database application
D) None of the above
✅ Answer: B) Server-side program

---

12. Which method is called when a Servlet is initialized?


A) start()
B) service()
SPPU_TE_BE_COMP 👈 Click to join telegram
C) init()
D) run()
✅ Answer: C) init()

---

13. Which package contains the Servlet classes?


A) javax.java
B) javax.servlet
C) java.servlet
D) servlet.javax
✅ Answer: B) javax.servlet

---

14. What is the default port number for Tomcat server?


A) 80
B) 8080
C) 8084
D) 8888
✅ Answer: B) 8080

---

🔥 JDBC and MySQL MCQs

---

15. Which method is used to execute SQL SELECT queries?


A) executeUpdate()
B) executeQuery()
C) executeSelect()
D) runQuery()
✅ Answer: B) executeQuery()

---
16. In JDBC, which object is used to run parameterized SQL queries?
A) Statement
B) PreparedStatement
C) ResultSet
D) QueryManager
✅ Answer: B) PreparedStatement
SPPU_TE_BE_COMP 👈 Click to join telegram

---
17. Which JDBC driver type is pure Java and platform-independent?
A) Type-1
B) Type-2
C) Type-3
D) Type-4
✅ Answer: D) Type-4

---

18. What will DriverManager.getConnection() return?


A) Statement object
B) ResultSet object
C) Connection object
D) Driver object
✅ Answer: C) Connection object

---

✅ Completely Ready for Experiment 5 Viva + MCQ!

---

📚 SPPU — Experiment 6: JSP Application (Login & Registration with MySQL)

---

🎯 A) Main Oral Questions and Answers (Direct)

---

1. What is JSP?

Answer:
JSP (JavaServer Pages) is a server-side technology used to create dynamic, platform-
independent web applications by combining HTML, XML, and Java code.
SPPU_TE_BE_COMP 👈 Click to join telegram
---

2. What is the use of JSP in web applications?

Answer:
JSP is used to design the user interface (view part) and dynamically generate web content,
while business logic is handled separately (like by Servlets).

---

3. What is MySQL?

Answer:
MySQL is an open-source relational database management system (RDBMS) that stores
and manages data using SQL.

---

4. How does JSP interact with MySQL?

Answer:
JSP interacts with MySQL by:

Importing JDBC classes.

Establishing database connections.

Executing SQL queries.

Fetching or updating data.

---

5. What is JDBC?

Answer:
JDBC (Java Database Connectivity) is a Java API that allows Java applications to connect
and interact with databases.

---

6. What is the architecture of JSP?


SPPU_TE_BE_COMP 👈 Click to join telegram

Answer:

1. Client requests a JSP page.

2. Server processes the JSP page into a Servlet.

3. Servlet generates dynamic content.

4. Server sends the response back to the client.

---
7. What is the difference between Servlet and JSP?

---

8. What is a session in JSP?

Answer:
A session is a way to store user-specific data (like user ID, name) across multiple pages until
the user logs out or session expires.

---

9. What is a directive in JSP?

Answer:
Directives provide global information about the JSP page, like imports or page settings.
Example: <%@ page language="java" %>.

---

10. What are JSP Scripting Elements?

Answer:

Declarations (<%! ... %>): Declare variables and methods.


SPPU_TE_BE_COMP 👈 Click to join telegram
Scriptlets (<% ... %>): Write Java code.

Expressions (<%= ... %>): Output values.

---

📚 B) Expected Counter Questions and Smart Answers

---

1. JSP

Counter Q: Is JSP compiled?


Smart Answer:
Yes, JSP is converted into a Servlet, then compiled and executed.

---

2. JDBC

Counter Q: Why use JDBC in JSP?


Smart Answer:
To connect JSP pages with databases like MySQL to fetch or store data.

---

3. Session in JSP

Counter Q: When is session tracking needed?


Smart Answer:
When you need to remember user data across multiple pages.

---

4. Servlet vs JSP

Counter Q: Which one is preferred for UI?


Smart Answer:
JSP is preferred for UI (presentation layer).
SPPU_TE_BE_COMP 👈 Click to join telegram
---

5. Database Interaction

Counter Q: How can JSP avoid SQL injection?


Smart Answer:
By using PreparedStatement instead of Statement in JDBC.

---

📚 More MCQs for Experiment 6 (JSP, JDBC, MySQL)

---

🎯 JSP and Database MCQs

---

11. JSP stands for:


A) JavaScript Pages
B) Java Servlet Pages
C) Java Server Pages
D) Java Source Pages
✅ Answer: C) Java Server Pages

---

12. Which tag is used to include Java code inside HTML in JSP?
A) <jsp:code>
B) <% ... %>
C) <script>
D) <code>
✅ Answer: B) <% ... %>

---

13. Which directive is used to import classes in JSP?


A) <jsp:import>
B) <%@ import %>
C) <%@ page import %>
D) <import>
SPPU_TE_BE_COMP 👈 Click to join telegram
✅ Answer: C) <%@ page import %>

---

14. Which object is used to connect JSP page to database?


A) Connection
B) Driver
C) ResultSet
D) Statement
✅ Answer: A) Connection

---

🔥 Advanced MCQs

---

15. In JDBC, which method is used to create a connection?


A) createConnection()
B) connectDatabase()
C) getConnection()
D) openDatabase()
✅ Answer: C) getConnection()

---

16. In JSP, which object is used to maintain session data?


A) application
B) session
C) response
D) request
✅ Answer: B) session

---

17. What does a JSP file get converted into at runtime?


A) HTML page
B) Java Class
C) Servlet
D) XML page
✅ Answer: C) Servlet
SPPU_TE_BE_COMP 👈 Click to join telegram

---

18. Which SQL command is used to retrieve data?


A) INSERT
B) UPDATE
C) DELETE
D) SELECT
✅ Answer: D) SELECT

---

✅ Now Fully Ready for Experiment 6 Viva and MCQs! 📚 SPPU — Experiment 7: Dynamic
Web Application using PHP, AJAX, and MySQL

---

🎯 A) Main Oral Questions and Answers (Direct)

---

1. What is AJAX?

Answer:
AJAX (Asynchronous JavaScript and XML) allows web pages to be updated asynchronously
by exchanging data with a web server behind the scenes, without reloading the whole page.

---
2. What is the use of AJAX in web applications?

Answer:
AJAX improves user experience by making web applications faster, dynamic, and more
interactive without refreshing the page.

---

3. What is PHP?

Answer:
PHP (Hypertext Preprocessor) is a server-side scripting language designed for dynamic web
page development and interacting with databases like MySQL.
SPPU_TE_BE_COMP 👈 Click to join telegram

---

4. What is MySQL?

Answer:
MySQL is a popular open-source relational database management system used to store and
manage application data.

---

5. What is jQuery?

Answer:
jQuery is a fast, small, and feature-rich JavaScript library that simplifies HTML document
traversal, event handling, animation, and AJAX interactions.

---
6. How does AJAX work with PHP and MySQL?

Answer:
AJAX sends a request to a PHP script, which interacts with the MySQL database, processes
data, and returns a response without refreshing the webpage.

---

7. What is XMLHttpRequest?

Answer:
XMLHttpRequest is an object used in JavaScript to send and receive data from a server
asynchronously.

---
8. What is the difference between synchronous and asynchronous communication?

Answer:

Synchronous: User waits until the server responds.

Asynchronous: User can continue interacting with the page while the server responds in the
background.
SPPU_TE_BE_COMP 👈 Click to join telegram

---

9. What is the role of config.php?

Answer: config.php is used to store database connection settings like hostname,


username, password, and database name.

---
10. Why is AJAX faster than traditional form submission?

Answer:
Because only required data is sent, not the whole page, reducing data load and speeding up
interaction.

---

📚 B) Expected Counter Questions and Smart Answers

---

1. AJAX

Counter Q: Does AJAX work without reloading the page?


Smart Answer:
Yes, AJAX updates part of the page without full page reload.

---

2. PHP

Counter Q: Is PHP executed on client or server?


Smart Answer:
PHP runs on the server side.

---

3. MySQL

Counter Q: Is MySQL free to use?


Smart Answer:
Yes, MySQL is open-source and free.
SPPU_TE_BE_COMP 👈 Click to join telegram

---

4. XMLHttpRequest

Counter Q: Is XMLHttpRequest part of JavaScript?


Smart Answer:
Yes, it's a JavaScript object used for AJAX communication.

---

5. jQuery

Counter Q: Why use jQuery in AJAX?


Smart Answer:
jQuery simplifies AJAX code with easy syntax.

---

📚 More MCQs for Experiment 7 (AJAX, PHP, MySQL)

---

🎯 AJAX and PHP MCQs

---

11. AJAX stands for:


A) Automatic Java and XML
B) Asynchronous JavaScript and XML
C) Advanced Java and XML
D) Asynchronous Java Applets and XML
✅ Answer: B) Asynchronous JavaScript and XML

---

12. What object is used in JavaScript for AJAX calls?


A) AjaxRequest
B) XMLHttpRequest
C) WebRequest D) XMLRequest
✅ Answer: B) XMLHttpRequest
SPPU_TE_BE_COMP 👈 Click to join telegram

---

13. PHP code is executed at:


A) Client side
B) Server side
C) Both
D) Browser
✅ Answer: B) Server side

---

14. Which function is used to connect PHP to MySQL?


A) mysqli_connect()
B) mysql_connection()
C) db_connect()
D) database_connect()
✅ Answer: A) mysqli_connect()

---

🔥 Database and Advanced MCQs

---

15. In MySQL, which statement is used to retrieve data?


A) FETCH
B) GET
C) SELECT
D) RETRIEVE
✅ Answer: C) SELECT

---
16. Which file in the project stores database connection settings?
A) insert.php
B) config.php
C) index.html
D) connect.php
✅ Answer: B) config.php

---
SPPU_TE_BE_COMP 👈 Click to join telegram

17. In jQuery, which method is used for AJAX POST requests?


A) $.post()
B) $.get()
C) $.ajaxpost()
D) postRequest()
✅ Answer: A) $.post()

---
18. What is the default HTTP method used in HTML forms?
A) POST
B) GET
C) PUT
D) DELETE
✅ Answer: B) GET

---
SPPU_TE_BE_COMP 👈 Click to join telegram

📚 SPPU — Experiment 8: AngularJS Web Application (Bill Payment Record)

---

🎯 A) Main Oral Questions and Answers (Direct)

---

1. What is AngularJS?

Answer:
AngularJS is an open-source JavaScript framework developed by Google for building
dynamic, single-page web applications (SPA).

---
2. What is the architecture pattern used in AngularJS?

Answer:
AngularJS follows the MVC (Model-View-Controller) architecture to separate the application
logic, data, and presentation layer.

---

3. What are directives in AngularJS?

Answer:
Directives are special attributes in AngularJS (like ng-app, ng-model, ng-bind) that extend
HTML functionality by attaching behaviors to DOM elements.

---

4. What is data binding in AngularJS?

Answer:
Data binding automatically synchronizes the data between model (JavaScript objects) and
view (HTML).

---

5. What is the use of ng-model in AngularJS?


SPPU_TE_BE_COMP 👈 Click to join telegram

Answer:
ng-model binds the value of HTML controls (like input, select, textarea) to application data.

---

6. What is a scope in AngularJS?

Answer:
Scope is an object that connects the controller with the view, acting as the context for the
expressions.

---

7. What are filters in AngularJS?

Answer:
Filters are used to format the value of expressions for display, like formatting dates,
currencies, filtering arrays, etc.

---

8. What is the use of services in AngularJS?

Answer:
Services are singleton objects used for sharing data and functions across controllers in
AngularJS applications.

---
9. How is form validation handled in AngularJS?

Answer:
AngularJS provides built-in form validation with features like checking required fields, input
types, and custom validation rules.

---
10. What is the purpose of $http service in AngularJS?

Answer:
$http is a service in AngularJS used to make AJAX calls to remote servers for data exchange
without reloading the page.
SPPU_TE_BE_COMP 👈 Click to join telegram

---

📚 B) Expected Counter Questions and Smart Answers

---

1. AngularJS

Counter Q: Who developed AngularJS?


Smart Answer:
AngularJS was developed by Google.

---

2. MVC Architecture

Counter Q: What is the main advantage of MVC?


Smart Answer:
MVC separates business logic and user interface, making applications easier to manage and
scale.

---

3. ng-model

Counter Q: Can we use ng-model with forms?


Smart Answer:
Yes, ng-model binds form elements with AngularJS model data.

---

4. Data Binding

Counter Q: How many types of data binding are in AngularJS?


Smart Answer:
AngularJS mainly uses two-way data binding.

---

5. Directives
SPPU_TE_BE_COMP 👈 Click to join telegram
Counter Q: Name any two built-in directives.
Smart Answer:
Examples: ng-app, ng-model.

---

📚 More MCQs for Experiment 8 (AngularJS Basics)

---

🎯 AngularJS MCQs

---

11. AngularJS is maintained by:


A) Microsoft
B) Google
C) Facebook
D) IBM
✅ Answer: B) Google

---

12. Which directive initializes an AngularJS application?


A) ng-start
B) ng-begin
C) ng-app
D) ng-init
✅ Answer: C) ng-app

---

13. Which of the following is true about AngularJS expressions? A)


They are written inside double braces {{ }}.
B) They cannot contain JavaScript code.
C) They must be inside <script> tag.
D) They are not evaluated.
✅ Answer: A) They are written inside double braces {{ }}.

---
SPPU_TE_BE_COMP 👈 Click to join telegram

14. Which AngularJS object is used for AJAX requests?


A) $ajax
B) $http
C) $get
D) $request
✅ Answer: B) $http

---

🔥 Advanced MCQs

---
15. Which service is used to define variables shared across controllers?
A) $scope
B) $rootScope
C) $location
D) $controller
✅ Answer: B) $rootScope

---

16. What is the purpose of ng-repeat?


A) Apply CSS
B) Loop through a collection
C) Initialize application
D) Submit form
✅ Answer: B) Loop through a collection

---

17. What is used for form validation in AngularJS?


A) Only JavaScript
B) Built-in AngularJS validations
C) Only PHP
D) Only HTML
✅ Answer: B) Built-in AngularJS validations

---

18. Which is NOT a valid AngularJS directive?


SPPU_TE_BE_COMP 👈 Click to join telegram
A) ng-init
B) ng-app
C) ng-model D) ng-table
✅ Answer: D) ng-table

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy