Anda di halaman 1dari 8

WEB TECHNOLOGIES

Comprehensive Viva Questions with Answers

1. Explain the World Wide Web. Name some Recommendations by W3C?


The World Wide Web, the WWW, or the We b, is the largest, the fastest growing, and the most
popular Internet service. In addition to text, it can display images, animations, sounds, and
videos. To access the Web information you need:
(1) A connection to the Internet and
(2) A Web browser such as Netscape or Internet Explorer.
XHTML, CSS, HTML, XML.
2. What is HTML?
HTML is a language for describing web pages.
HTML stands for Hyper Text Markup Language
HTML is not a programming language, it is a markup language
A markup language is a set of markup tags
HTML uses markup tags to describe web pages
3. Differentiate Dynamic document with Static document?
An HTML document that contains scripting is called a dynamic document.
Whereas a simple HTML document without scripting is known as a static document.
4. Compare SGML-based versus XML-based HTML
The XML-based specification is usually called XHTML to distinguish it clearly from the more
traditional definition. However, the root element name continues to be 'html' even in the
XHTML-specified HTML. The W3C intended XHTML 1.0 to be identical to HTML 4.01 except
where limitations of XML over the more complex SGML require workarounds. Because
XHTML and HTML are closely related, they are sometimes documented in parallel.
5. List the goals of SGML.
I. To manage the flow of millions of pages.
2. For structuring information exchange
3. For modeling inter-document linkages
4. For managing information flows between departments and weapons systems
6. What is JavaScript?
JavaScript was designed to add interactivity to HTML pages
JavaScript is a scripting language
A scripting language is a lightweight programming language
A JavaScript consists of lines of executable computer code
A JavaScript is usually embedded directly into HTML pages
7. Are Java and JavaScript the Same?

MRCET

Dept. of CSE

pg. 1

WEB TECHNOLOGIES

Comprehensive Viva Questions with Answers

NO!.Java and JavaScript are two completely different languages in both concept and design. Java
(developed by Sun Microsystems) is a powerful and much more complex programming language
- in the same category as C and C++.
8. What is DOM? What are the 2 traditional ways of assigning event handlers in DOM.
The Document Object Model (DOM) is the model that describes how all elements in an HTML
page, like input fields, images, paragraphs etc., are related to the topmost structure: the document
itself. By calling the element by its proper DOM name, we can influence it.
The 2 traditional ways of assigning event handlers in DOM
1) Via HTML, using attributes
2) Via scripting
9. Define CGI -Common Gateway Interface.
CGI is a specification for transferring information between a World Wide Web server and a CGI
program. ACGI program is any program designed to accept and return data that conforms to the
CGI specification. The program could be written in. any programming language, including C,
Perl, Java, or Visual Basic.
10. What are Servlets?
A small program that runs on a server, the term usually refers to a Java applet that runs within a
Web server environment. This is analogous to a Java applet that runs within a Web browser
environment. Java servlets are becoming increasingly popular as an alternative to CGI programs.
The biggest difference between the two is that a Java applet is persistent. This means that once it
is started, it stays in memory and can fulfill multiple requests. In contrast, a CGI program
disappears once it has fulfilled a request. The persistence of Java applets makes them faster
because theres no wasted time in setting up and tearing down the process
11. Compare Servlet with CGI
Servlets have several advantages over CGI:
A Servlet does not run in a separate process. This removes the overhead of creating a new
process for each request.
A Servlet stays in memory between requests. A CGI program (and probably also an extensive
runtime system or interpreter) needs to be loaded and started for each CGI request.
There is only a single instance which answers all requests concurrently. This saves memory and
allows a Servlet to easily manage persistent data.
12. List the advantages of CGI scripting?
I. CGI programs are relatively safe to run.
2. A CGI program can crash without damaging the server, since it only has limited access to the
server.
3. Reduces the burden of server
a. Sends prepared messages / mails e customer reply
b. Capability to process forms and prepares output based on form input.
c. Hit counts / Page counters.
13. What do you mean by Server-side?

MRCET

Dept. of CSE

pg. 2

WEB TECHNOLOGIES

Comprehensive Viva Questions with Answers

Occurring on the server side of a client-server systems. For example, on the World Wide Web,
CGI scripts are server-side applications because they run on the Web server. In contrast,
JavaScript scripts are client-side because they are executed by your browser (the client). Java
applets can be either server-side or client- side depending on which computer (the server or the
client) executes them.
14. What are the sequences of steps for each HTTP request from a client to the server?
1. Making the connection
2. Making a request
3. The response
4. Closing the connection
15. Define URI, URL, URN.
1. URI (Uniform Resource Identifier): It identifies an object on the Internet.
2. URL (Uniform Resource Locator): It is a specification for identifying an object such as a file,
newsgroup, CGI program or e-mail address by indicating the exact location on the internet.
3. URN (Uniform Resource Name): It is a method for referencing an object without declaring the
full path to the object.
16. What are the two commonly used Request methods?
The request methods tell the script how it was invoked. Based on this information, the script
decides how to act. The request method is passed to the script using environment variable called
REQUEST- METHOD. The two most common request methods used are GET and POST. The
main differences between GET and POST is
$_GET is an array of variables passed to the current script via the URL parameters. Easy to
hack the data as data is stored in browser history, Only ASCII data can be sent and Data is not
secret as other people can see the data in browser history
$_POST is an array of variables passed to the current script via the HTTP POST method.
Difficult to hack, Any type of data can be sent including binary data and Data is secret as not
stored in history
17. What are Style Sheets? List down font characteristics permitted in style sheets.
Style sheets are collections of style information that are applied to plain text. Style information
includes font attributes such as type size, special effects (bold, italic, underline), color and
alignment. Style sheets also provide broader formatting instructions by specifying values for
quantities such as line spacing and left and right margins.
Font characteristics: font-family, font-size, font-weight, font-style and font-variant.
18. Define cascading.
Cascading refers to a certain set of rules that browsers use, in cascading order, to determine how
to use the style information. Such a set of rules is useful in the event of conflicting style
information because the rules would give the browser a way to determine which style is given
precedence.
19. Explain about Session tracking.

MRCET

Dept. of CSE

pg. 3

WEB TECHNOLOGIES

Comprehensive Viva Questions with Answers

A session is basically a conversation between a browser and a server. All the above technologies
can save information for the current session for a particular user visiting a site. The session is
important, as H1TP is a stateless protocol. This means that the connection between web server
and a web browser is not automatically maintained, and that the state of a web session is not
saved.
20. What is a Session & Cookies? What are the main differences between cookie & session?
A collection of HTTP requests all associated with a single session ID is known as a session. Each
HTTP request is examined by the server to see if it contains a special identifier known as a
session ID.
A cookie is a Name-value pair that a web server sends to a client machine as part of an HTTP
response, specifically through the Set-Cookie header field. Browsers will store the cookie pairs
found in the response in a file on the client machine.
Differences between cookie and session:
The main difference between a session and a cookie is that session data is stored on the server,
whereas cookies store data in the visitor's browser. Sessions are more secure than cookies as it is
stored in server. Cookie can be turn off from browser.
21. Define Java Server Pages and What is the use of JSP? What are the three categories of
JSP element types?
It can be defined as one instantiation of a class of related technologies that facilitate separate
development of a websites presentation and logic. The key contribution of these technologies is
to embed program code related to presentation within a document. JSP are used enable web
application programmers to create dynamic content by reusing predefined components and by
interacting with components using server side scripting.
JSP element types; 1.Scripting

2.Directive

3.Action

What are directives?


Directives are messages to the jsp container that enables the programmer to specify page
settings, to include content from other resources and to specify custom-tag libraries for use in
JSP.
JSP action element?
It is an element that is translated into javaservlet code that performs some action. These elements
provide standard actions ie, the actions that are required by the JSP specification to be provided
by any JSP-compliant container. The JSP tag library mechanism allows additional action
elements to be used within a JSP document, which provide custom actions.
22. Name the two types of directives available for use in a JSP document?
1. Page-The page directive (directive. page element) has a variety of attributes that may be set.
2. Include-The include directive (directive. include element) imports text from another file into
the JSP document at the point at which the directive appears.
23. Define JavaBeans Technology.
MRCET

Dept. of CSE

pg. 4

WEB TECHNOLOGIES

Comprehensive Viva Questions with Answers

A simple mechanism to call java methods from within a JSP document.JSP provides such a
mechanism through its support for JavaBeans classes. If a java class is written so as to conform
to certain aspects of the JavaBeans Specification, the certain methods of this class can be called
from a JSP document.
24. Define XML Schema.
XML schema defines the structure of XML documents. The purpose of an XML Schema is to
define the legal building blocks of an XML document, just like a DTD. A key contribution of
XML schema is its definition of a collection of standard data types. Each data type definition
includes a specification of the range of values that can be represented by the data type and details
on how to represent those values as strings.
Here are some reasons:
XML Schemas are extensible to future additions
XML Schemas are richer and more powerful than DTDs
XML Schemas are written in XML
25. What is XSL Programming?
XSL (XML Stylesheet) Programming is the Next Generation of the CSS (Cascading Style Sheet
Programming). In CSS, users can use certain style tags which the browsers can understand and
are predefined by W3 consortium. XSL takes ths to one step ahead and users can define any tags
in the XML file. XML sheets can help in showing the same data in different formats.
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
26. What is a Scriplet?
A Scriplet is a fragment of java code that is embedded within the JSP document. Scriptlets enable
you to create small, reusable web applications that can be used in any web page. Scriptlets are
created using HTML, scripting and Dynamic HTML. To include them in an HTML document
use the <OBJECT> tag.
27 . Explain HTTP Request and Response Message?
HTTP Request Message
The client initiates an HTTP session by opening a TCP connection to the HTTP server with
which it wishes to communicate. It then sends request messages to the server, each of which
specifies a particular type of action that the user of the HTTP client would like the server to take.
Requests can be generated either by specific user action (such as clicking a hyperlink in a Web
browser) or indirectly as a result of a prior action (such as a reference to an inline image in an
HTML document leading to a request for that image.)
HTTP requests use a message format that is based on the generic message format described in
the preceding topic, but specific to the needs of requests. The structure of this format is as
follows :
<request-line>
<general-headers>
<request-headers>
<entity-headers>
<empty-line>[<message-body>][<message-trailers>]
MRCET

Dept. of CSE

pg. 5

WEB TECHNOLOGIES

Comprehensive Viva Questions with Answers

HTTP Response Message


Each request message sent by an HTTP client to a server prompts the server to send back a
response message. Actually, in certain cases the server may in fact send two responses,
preliminary response followed by the real one. Usually though, one request yields one response,
which indicates the results of the server's processing of the request, and often also carries an
entity (file or resource) in the message body. Like requests, responses use their own specific
message format that is based on the HTTP generic message format. The format, shown is as
follows:
<status-line>
<general-headers>
<response-headers>
<entity-headers>
<empty-line>[<message-body>][<message-trailers>]
28. Define XML. Mention any 3 XML Parsers
XML is a meta-markup language that provides a format for describing structured data. This
facilitates more structured declarations of content and more meaningful search results across
multiple platforms. In any markup language, the first element to appear is called the "root
element", which defines what kind of document the file will be. In an HTML file, the <html> tag
is the root element. An HTML file will always have the HTML element as the root element,
while in an XML file, it can be anything.
SAX (Simple API for XML) Parser
DOM (Document Object Model) Parser and
XSLT (XML Style Sheet) Parsers.
29. Define DTD.
A DTD is a set of rules that specifies how to use XML markup. It contains specifications for each
element, including what the elements attributes are, what values the attributes can take on and
what elements can be contained in others.
An example of an HTML for doctype is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
The purpose of a DTD is to define the structure of an XML document. It defines the structure
with a list of legal elements:
<!DOCTYPE note [ <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body
(#PCDATA)> ]>
30. Define CDATA and PCDATA in XML?
Character data(CDATA) is a text in a document that should not be parsed by the XML parser.
Any entities included in the CDATA block will not be replaced by their value and markup (such
as HTML tags) will not be treated as markup.
Parsed Character Data (PCDATA) is a term used about text data that will be parsed by the
MRCET

Dept. of CSE

pg. 6

WEB TECHNOLOGIES

Comprehensive Viva Questions with Answers

XML parser. XML parsers normally parse all the text in an XML document. When an XML
element is parsed, the text between the XML tags is also parsed:
<message>This text is also parsed</message>

31. What is the difference between #PCDATA and #CDATA in XML?


PCDATA is Parsed character data and CDATA is just character data.

Keyword PCDATA specifies that the element must contain parsable character data
that is , any text except the characters less-than (<) , greater-than (>) , ampersand (&),
quote(') and double quote (") .

The CDATA keyword in an attribute declaration has a different meaning than


the CDATA section in an XML document. In CDATA section all characters are legal
(including <,>,&, and characters) except the ]]> end tag. CDATA is text that will
NOT be parsed by a parser. Tags inside the text will NOT be treated as markup and
entities will not be expanded.

Keyword PCDATA specifies that the element must contain parsable character data that
is, any text except the characters less-than ( < ) , greater-than ( > ), ampersand ( & ),
quote( ' ) and double quote ( " ).

32. What is meant by Scripting Language? Explain any one of the Scripting Languages?
A scripting language is a form of programming language that is usually interpreted rather
than compiled. Conventional programs are converted permanently into executable files before
they are run. In contrast, programs in scripting language are interpreted one command at a time.
Types of scripting languages
Specialized scripting languages include:
Perl (Practical Extraction and Report Language), Hypertalk, JavaScript & VBScript
Give the elements to write a script?`
<script type=text/javascript> write script here </script>
33. Explain about <TABLE> &<FRAME> tags in Detail?
Code for Basic HTML Table
<table>
Create a table cells.
<tr><th>-----------</th></tr><!----Table
i) Header cell
Head>
ii) Data cell
<tr><td>---------</td></tr> <!---Row1--->
Table Alignment
<tr><td>---------</td></tr> <!---Row2-->
i) Aligning the Entiere Table
------------------------ii) Alignment within a row.
<tr><td>---------</td></tr> <!---Rowm-->
ii) Alignment within a cell.
</ table >

MRCET

Dept. of CSE

pg. 7

FRAMESET tag is used instead of body tag.


<FRAMES>
Creating the <FRAMESET> tag
Creating the <FRAME> tag
Eg:<FRAMESET Rows=10%,80%,10%>
<FRAME name=top src=a.html>
<FRAME name=midsrc=b.html>
<FRAME name=bot src=c.html>
</FRAMESET>

Anda mungkin juga menyukai