Search This Blog

Showing posts with label Internet Programming. Show all posts
Showing posts with label Internet Programming. Show all posts
Thursday, 23 March 2023

Designing Interactive Web Pages for User Registration & Login

0 comments

 Experiment 4

Aim:

Design an interactive website using JavaScript for User Registration and User Login

Procedure:

1.  Write and store the JavaScript code for User Validation in the header part of the web page under <script> tag

2.  Bind the event handler with the onsubmit event handler of the form object as follows:

<form name="RegForm" action="login.htmlonsubmit="return REG()method="post">

where
    RegForm is the name of the form object
    login.html is the web page for navigation once the form validation is over
    REG() is the event handler (function in JavaScript) for validating the input
    post is the type of HTTPRequest used for making a requeset to the server


Here are the links to have Demo of the following Experiments:

Experiment 4

Experiment 8





 

Continue reading →

Designing Online Shopping Site using HTML & CSS

0 comments

Creating a Web Site for Online Shopping 

(Experiment 3)

Aim:

To Re-design the online shopping website created in Experiment 2 using Cascading Style Sheet (CSS)

Procedure:

  1. Define the internal styles using style tag <style> in the header part of the web page for various HTML elements
  2. Some of the styles can be defined inline using the style attribute of the particular HTML element

Implementation:

home.html

<html>
<head>
<title>Online Shopping Cart</title>
<style>
body
{
background-color: grey;
}
</style>
</head>
<frameset rows="25%,*" border="1">
<frame src="top_frame.html" noresize=noresize scrolling="no" color="grey">
<frame src="welcome.html" name="sub_frame">
</frameset>
</frameset>
</html>

top_frame.html

<html>
<head>
<title>TOP FRAME</title>
</head>
<body bgcolor="yellow">
<h1 align="center"><font color="black">ONLINE BOOK STORE</font></h1>
<table cellspacing="1" cellpadding="1" align="center" width="70%" border="1">
<tr>
<th align="center"><a href ="welcome.html" target="sub_frame"><font color="black">Home</font></a></td>
<th align="center"><a href ="login.html" target ="sub_frame"><font color="black">Login</font></a></td>
<th align="center"><a href ="reg_form.html" target ="sub_frame"><font color="black">Regitration</font></a></td>
<th align="center"><a href ="catalogue.html" target ="sub_frame"><font color="black">Catalogue</font></a></td>
<th align="center"><a href ="cart.html" target ="sub_frame"><font color="black">Cart</font></td>
</tr>
</table>
</body>
</html>


welcome.html

<html>
<head><title>Welcome Page</title>
<style>
body
{
background-color: yellow;
}
</style>
<body background="Online_Store.jpeg">
<h2 style="color:brown;text-align:center;">WELCOME TO ONLINE BOOK STORE</font></h2>
</body>
</html>



login.html

<html>
<head>
<title>LOGIN</title>
<style>
body {
background-color: yellow;
}
h3 {
color: maroon;
text-align: center;
}
</style>
</head>
<body>
<h3>User Login</h3>
<table align="center" heigth="20%">
<tr>
<td align="right">User Name:</td>
<td align="left"> <input type="text" maxlength="30" size="20"></td>
</tr>
<tr>
<td align="right">Password:</td>
<td align="left"><input type="password" maxlength="30" size="20"></td>
</tr>
<tr>
<td></td>
<td><font color="black"><a href="reg_form.html">New User Clik
here</font></a></td>
</tr>
<tr>
<td></td>
<td align="left"><input type="SUBMIT" value="SUBMIT"></td>
<td align="left"><input type="RESET" value="RESET"> </td>
</tr>
</table>
</body>
</html>



reg_form.html

<html>
<head>
<title>Registration Page</title>
</head>
<body bgcolor="yellow">
<h2 align="center">ONLINE REGISTRATION</h2>
<table align="center" cellspacing="12">
<tr>
<td align="right">First name</td>
<td align="left"><input type="text" maxlength="40" size="35" name="fname">
</tr>
<tr>
<td align="right">Last name:</td>
<td align="left"><input type="text" maxlength="40" size="35" name="lname">
</tr>
<tr>
<td align="right">PassWord:</td>
<td align="left"><input type="PassWord" maxlength="40" size="35" name="pw">
</tr>
<tr>
<td align="right">Confirm PassWord</td>
<td align="left"><input type="PassWord" maxlength="40" size="35" name="cp">
</tr>
<tr>
<td align="right">Gender:</td>
<form>
<td><input type="radio" name="sex" value="male" /> Male
<input type="radio" name="sex" value="female" /> Female</td>
</form>
</tr>
<tr>
<td align="right">DATE OF BIRTH:</td>
<td align=”right”><input type=”date”></td>
<tr>
<td align="right">Email-ID:</td>
<td align="left"><input type="text" maxlength="40" size="35" name="ename">
</tr>
<tr>
<td align="right">Address:</font></td>
<td align="left"><textarea rows="6" cols="20" name="add"> </textarea> </td>
<tr>
<td align="right">Hobbies:</td>
<td align="left"><input type="checkbox" name="hb" value="pc">Playing Cricket</td>
<td align="left"><input type="checkbox" name="hb" value="pc1">Sleeping</td>
</tr>
<tr>
<td></td>
<td align="left"><input type="checkbox" name="hb" value="ea">Eating</td>
<td align="left"><input type="checkbox" name="hb" value="sh">Shopping</td>
</tr>
<tr> <td></td>
<td align="left"><input type="checkbox" name="hb" value="br">Bike Riding</td>
<td align="left"><input type="checkbox" name="hb" value="Mo">Movies</td>
</tr>
<tr><td></td>
<td align="left"><input type="checkbox" name="hb" value="mu">Music</td>
<td align="left"><input type="checkbox" name="hb" value="WT">Learning WT</td>
</tr>
<tr>
<td align="right">About u:</td>
<td align="left"><textarea rows="8" cols="30" name="abu"></textarea> </td>
</tr>
<tr>
<td></td>
<td align="left"><input type="checkbox" name="xx" value="yy">I Agree with terms and Conditions</td>
</tr>
<tr> <td></td>
<td align="left"><input type="SUBMIT" value="SUBMIT"></td>
<td align="right"><input type="RESET" value="RESET"></td>
</tr>
</table>
</body>
</html>








Continue reading →
Tuesday, 8 November 2011

Basic Architecture of a Servlet!

0 comments

THE BASIC SERVLET ARCHITECTURE! 
         
          A Servlet, in its most general form, is an instance of a class which implements the javax.servlet.Servlet interface. Most Servlets, however, extend one of the standard implementations of that interface, namely javax.servlet.GenericServlet and javax.servlet.http.HttpServlet. The set of all classes and interfaces required for developing and running a Servlet is called Servlet API.

The Servlet API is a part of the Servlet specification designed by Sun Microsystems. This API is supported by all Servlet containers, such as Tomcat and Weblogic. The API contains classes and interfaces that define a standard contract between the Servlet class and Servlet container (or Servlet engine). These classes and interfaces are packaged in the following two packages of the Servlet API:
  • javax.servlet &
  • javax.servlet.http
These packages contain classes and interfaces that allow the Servlet to access the basic services provided by the Servlet container. The javax.servlet package contains classes and interfaces to support generic, protocol-independent Servlet. These classes are extended by the classes in javax.servlet.http package to add HTTP-specific functionality.
Every Servlet must implement the javax.servlet.Servlet interface. Most servlets implement this interface by extending one of the two special classes given below:
  • javax.servlet.GenericServlet
  • javax.servlet.http.HTTPServlet
HTTPServlet is a sub class of GenericServlet super class and adds HTTP functionality to a Servlet.
Servlet - The Root Interface of Servlets
Architecturally, all servlets must implement the Servlet interface of package javax.servlet. It provides five methods, which are executed automatically by the web server. There is no main() method in a servlet just like an applet. The methods described in this interface are as follows:
Method
Description
void init(servletConfig config)
This method is automatically called once during a servlet’s execution cycle to initialize the servlet.
ServletConfig getServletConfig()
This method returns a reference to the object that implements the interface ServletConfig. It provides access to the servlet’s configuration information.
String getServletInfo()
This method is defined by a servlet programmer to return a string containing servlet information such as the servlet’s author and version.
void Service(ServletRequest request, ServletResponse response)
This method is called one or more times by the server to respond based on the number of requests made by the clients simultaneously.
void destroy()
This “cleanup” method is called when a servlet is terminated by its servlet container. Resources used by the servlet, such as an open file or an open database connection should be de-allocated here.

A servlet’s life cycle begins when the servlet container loads the servlet into memory – normally, in response to the first request that the servlet receives. Before the servlet can handle the request, the servlet container invokes the servlet’s init method for initializing the servlet's variables and resources. Then the servlet’s service() method is called as a response to the client’s request.
All requests are handled by the servlet’s service method, which receives the request, processes the request, and sends a response to the client in the form of html. During the servlet’s life time, method service is called one per request. Each new request typically results in a new thread of execution (created by the servlet container) in which method service gets executed. When the servlet container terminates the servlet, the servlet’s destroy method is called to release servlet resources.
Contents of javax.servlet Package:
The classes and interfaces defined in the javax.servlet package are listed below. The Servlet container provides the implementation of these classes and interfaces.
Interfaces: Servlet, RequestDispatcher, ServletConfig, ServletContext, ServletContextListener, ServletRequest, ServletResponse, SingleThreadModel, Filter, FilterChain, FilterConfig, ServletContextAttributeListener, ServletRequestAttributeListener, SerlvetRequestListener
Classes: ServletContextEvent, ServletInputStream, ServletOutputStream, ServletRequestWrapper, ServletResponseWrapper, GenericServlet, ServletContextAttributeEvent, ServletRequestAttributeEvent, ServletRequestEvent, ServletException, UnavailableException
Contents of javax.servlet.http Package:
The javax.servlet.http package supports the development of Servlets that make use of HTTP protocol. The classes in this package extend the Servlet functionality to support HTTP specific features that include request and response headers, support for different request methods and cookies. The classes and interfaces defined in javax.servlet.http package are given below:
Type
Name
Description
Interface HttpServletRequest Extends the ServletRequest interface to provide request information for HTTP servlets
Interface HttpServletResponse Extends the ServletResponse interface to provide HTTP-specific functionality in sending a response
Interface HTTPSession Provides a way to identify the user across more than one page request or visit to a website and store the information about the user
Interface HttpSessionBindingListener Causes an object to be notified when it is bound to or unbound from a session.
Class Cookie Creates a cookie, a small amount of information sent by a Servlet to a web browser, saved by the browser, and later sent back to the server
Class HttpServlet Provides an abstract class to be sub classed to create an HTTP Servlet suitable for a website.
Class HttpSessionBindingEvent Sent to an object that implements HttpSessionBindingListener when the object is bound to or unbound from the session.
Class HttpUtils Provides a collection of methods that are useful in writing HTTP servlets


Continue reading →

Data Binding with Tabular Data Cotrol (TDC)

0 comments
 DATA BINDING IN DHTML! 
DHTML is a client-side scripting language that provides the features for doing data manipulations like data sorting and filtering at the client side, which ought to be done directly on the database at the server. With DHTML, data manipulations can be done on the client without involving the server and the network. It helps web application developers to produce more responsive data-intensive applications.
To do data manipulation on the client, data must be retrieved from the database on the server and stored in a file, with a format that could be understood by the object in DHTML. This process of storing and displaying data on a web page using files at the client side is called Data Binding. Data binding at the client side can be done with the help of objects called Data Source Objects (DSO).

Simple Data Binding:

Data Source Objects (DSO) are objects which are used for data access from files. One of the several DSOs available in IE 5.5 is the Tabular Data Control (TDC). The Tabular Data Control (TDC) is an ActiveX control that is added to a web page with the object element. This control can be used to bind an element like <span> in a web page with a data field available in a file so as to retrieve and display the data in it.
Element span is a grouping element – it doesn’t apply any inherent formatting to its contents. It is an inline-level element that displays its content with other text and with no line breaks. A similar element is the div element, but it displays its content on its own line, with margins above and below.
Data must be stored in a tabular format for the Table Data Control to access them from a web page. The rules for storing the data in a tabular form are as follows:
  1. The first row of the file may contain headers for the tabular data. Data are arranged in rows and columns.
  2. Data are enclosed by a special character like @.
  3. Data separators like | are used to separate data one from another in a record.

    Implementation:

    The ActiveX control is initialized using the <OBJECT> tag. The CLASSID (unique identifier) for the tabular data control is
    CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83
    Initialization of the Control
    <OBJECT ID="SomeID" CLASSID="CLSID: 333C7BC4-460F-11D0-BC04-0080C7055A83">
    ...
    ...
    ...
    </OBJECT>
     
    Any object, like applet, has a number of parameters. Parameters of the object are specified using the <PARAM> tag. The tabular data control has around 8 parameters.
DataURL: The path of the file that contains the data. For eg "data.txt".

UseHeader: Specifies whether the first line of the data file should be used as reference names for their respective fields below. If specified to false, use "Column1", "Column2" etc instead. The default value is false.
 
TextQualifier: Specifies the optional character that surrounds a field.
 
FieldDelim: Specifies the character that is used to separate each field in the data file. The default character is the comma (,). For eg, consider a data file where we have the fields data: *SomeName*|*SomeAge*|*SomeSex*. Here, the field delimiter used is '|' and '*' is  the text qualifier.
 
RowDelim: Specifies the character used to mark the end of each row of data. The default character is the newline (NL) character.

Thus, an example complete initialization will look as follows :
<OBJECT ID="SomeID" CLASSID="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM NAME="DataURL" VALUE="YourDataFile.txt">
<PARAM NAME="UseHeader" VALUE="TRUE">
<PARAM NAME="TextQualifier" VALUE="~">
<PARAM NAME="FieldDelim" VALUE="|">
</OBJECT>

The parameter names are not case sensitive. The Text Qualifier parameter is purely optional, though can be useful in helping you more easily distinguish between each data entry.

Example for Data binding in DHTML

<HTML>
<HEAD>
<TITLE></TITLE>

<STYLE>
BODY { font-size: 9pt; font-family: verdana, tahoma, sans serif, helvetica; }
TH A { color: white }
TH A:Hover { color: yellow }
</STYLE>

</HEAD>

<BODY>

<OBJECT id=tdcFile CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM NAME="DataURL" VALUE="file.csv">
<PARAM NAME="UseHeader" VALUE="True">
<param name="FieldDelim" value=";">
<param name="CaseSensitive" value="false">
</OBJECT>



<TR>
<TD COLSPAN=4><LABEL><B>Name:</B>&nbsp;</LABEL>
</TD>
</TR>





<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=2>
<TR BGCOLOR=#333366>
<TD><DIV ID='divDept'><FONT COLOR=#FFFFFF><B>All</B></FONT></DIV></TD>
<TR>
<TD>
<TABLE DATASRC="#tdcFile">
<THEAD>
<TR>
<TH BGCOLOR=#333366>Car</TH>
<TH BGCOLOR=#333366>Name</TH>
<TH BGCOLOR=#333366>Resp</TH>
<TH BGCOLOR=#333366>email</TH>
<TH BGCOLOR=#333366>doc</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD BGCOLOR=#EEEECC><DIV datafld=car></DIV></TD>
<TD BGCOLOR=#EEEECC><DIV datafld=name></DIV></TD>
<TD BGCOLOR=#EEEECC><DIV datafld=resp></DIV></TD>
<TD BGCOLOR=#EEEECC><A DATAFLD=Email STYLE='Text-Decoration: None' ONMOUSEOVER='if(this.href.indexOf("mailto:") == -1){ this.href = "mailto:" + this.href};'><SPAN datafld=Email></SPAN></A></TD>
<TD BGCOLOR=#EEEECC><A DATAFLD=doc STYLE='Text-Decoration: None' ONMOUSEOVER='if(this.href.indexOf("") == -1){ this.href = "" + this.href};'><SPAN datafld=doc></SPAN></A></TD>

</TR>
</TBODY>
<TFOOT>

</TFOOT>
</TABLE>

</TD>
</TR>
</TABLE>

</BODY>
</HTML>
Continue reading →

Applying Filters and Transition in DHTML

0 comments
FILTERS & TRANSITION! 
Filters and Transition are two features of DHTML that enable the programmer to achieve a great variety of effects, such as:
  1. Transitioning between pages with random dissolves and horizontal and vertical blinds
  2. Converting colored images to gray in response to a user action for disabling purpose
  3. Glowing some letters for emphasis
  4. Displaying text in three-dimensional appearance using drop shadow effect
Among these two features (filters and transitions), applying filters will result in changes that are persistent, but transitions are temporary. Transitions allow a user to transfer from one page to another with a pleasant visual effect such as a random dissolve.
Filters and Transitions are Microsoft Technologies available only in Windows-based versions of IE 5.5, and are not available in any other browsers. They can be applied to block-level elements such as div or p, and to in-line elements such as strong or em if the element has its height or width CSS properties set.

Flip Filters: FlipV and FlipH:

The flipv and fliph filters mirror text or images vertically and horizontally, respectively. Apply these filters to an element by setting its filter property of the style attribute to any one of these two filter (flipv or fliph) or both to get the mirror effect. The coding is as follows:
<h1 style = “filter: fliph”>A Mirrored Text</h1>
<p style = “filter: flipv fliph>Fully Mirred</p>

Transparency with the Chroma Filter:

Chroma filter is a filter which is applied to an image, to make a part of the image transparent to its background. This filter applies transparency effect to a part of the image having the color specified in the filter.
Chroma effect can be applied to an element of a web page using the two properties of the chroma filter: color and enabled. The color property specifies the color of the image for which we apply transparency effect and the property enabled specifies whether to apply the effect to the element or not. This effect can be applied to an image of a web page as follows:
<img id= “chromaImg” src= “trans.gif” style= “position: absolute;
filter: chroma” alt= “Transparent Image” />
chromaImg.filters(“chroma”).color = blue;
chromaImg.filters(“chroma”) = true;
In this example, if the picture named trans.gif has a portion with a color blue, then that part of the image will be made transparent so that the element at the back of the image will be visible through that image.

Mask Filter:

Mask filter allows an element of a web page to be displayed with a solid background and a transparent foreground. Mask filter has a property called color, which specifies the color of the solid background to the masked image or text. The foreground will have the transparency effect.
Example for the code that applies mask effect to a text displayed on an image using <div> element is as follows:
<body>
<h1> Mask Filters </h1>
<div style = “position: absolute; top:125; left:20;
filter: mask(color=red)”>
<h1 style = “font-family: courier, monospace”>
This is a text displayed with the mask effect </h1>
</div>
<img src = “gradient.gif” width = “400” height = “200”
alt = “Image with Gradient effect”/>
</body>

Adding Shadow to a Text:

Shadow filter adds depth to your text in order to create a shadowing effect that gives a three-dimensional appearance to the text. To apply shadowing effect to some text in a web page, apply the shadow filter to the text with values assigned to its direction and color properties.
The direction property of the shadow filter determines in which direction the shadow effect is applied – this can be set to one of eight directions expressed in angular notation – 0 (up), 45 (above-right), 90 (right), 135 (below-right), 180 (below), 225 (below-right), 270 (left) and 315 (above-right). The color property specifies the color of the shadow of the text.
To get the shadowing effect fully, we need to set another style called padding. Increasing the padding value from 0 to 100 provides greater distance between the text and the border of the element, allowing the full effect to be displayed. The following is an example code for applying shadowing effect to a header element in a web page:
<h1 id = “ShadowText” style = “position: absolute; top: 25; left: 25;
Padding: 10; filter: shadow(direction = 45, color = red)”>
A Heading with Shadow </h1>

Creating Gradients with Alpha filter:

Gradient is an effect that can be applied to an image to make it transparent to its background in three different styles: Linear, Circular and Triangular. Linear gradient applies transparency effect to an image gradually from one end to the other horizontally. Circular gradient gives the transparency effect from the centre of the image as a circle which gradually fades away as it enlarges.
Triangular gradient gives the transparency effect in triangular form. A picture is considered as a rectangle formed using four triangles. Each triangular area has transparency effect which is very less at the top and gradually increases more towards bottom. This kind of effect can be applied with the help of three properties of the alpha filter. They are: Style, Opacity and FinishOpacity.
Alpha filter can be applied to the div element, which acts as a container to an image in a web page. The style property determines in what style the opacity is applied: a value of 0 applies uniform opacity, a value of 1 applies a linear gradient, a value of 2 applies a circular gradient and a value of 3 applies a rectangular gradient.
The Opacity and FinishOpacity properties are both percentages that determine at what percentage the specified gradient starts and finishes, respectively. The following lines of code illustrate the application of this filter to an image placed on a div element of a web page:
<body>
<div id = “pic” style = “position: absolute; left: 0; top: 0;
filter: alpha(style = 2, opacity = 100, finishopacity = 0”>
<img src = “flag.bmp” alt = “flag”/>
</div>
</body>

Creating Motion with Blur:

The blur filter creates an illusion of motion by blurring text or images in a certain direction. It has three properties: add, direction and strength, the values of which specify the attributes of the blurring effect. The add property, when set to tree adds a copy of the original image over the blurred image, creating a more clear blurring effect.
The direction property determines in which direction the blur filter is applied. This is expressed in any one of the eight angular vales (0, 45, 90, 135, 180, 225, 270 and 315). The strength property determines how strong the blurring effect is. The following code implements such effects to a header line placed in a div element (block):
<body>
<div id=“blurText” style=“position: absolute, left: 150, top: 150,
padding: 0; filter: blur(add=1, direction=35, strength=50)
background-color: white”>
<h1> This is a header with Blurred effect </h1>
</div>
</body>
Continue reading →
Monday, 7 November 2011

A Course on Internet Programming

0 comments
INTERNET PROGRAMMING

UNIT I XHTML
Introduction to XHTML: Headers -Linking - Images–Unordered Lists -Nested and Ordered Lists forms -Tables–Form- frames– Cascading style sheets .

UNIT II DHTML and Java
Object model and collections - event model - filters and transition. Java Basics: Data types, variables, Array, Operator, Control statements, I/O operation, Exception handling, file handling.

UNIT III Data Binding, ActiveX and Java Script
Data binding with tabular data control – Multimedia -ActiveX Control. Introduction to JavaScript: control structures - functions - arrays - objects

UNIT IV Java Servlet
Servlet: Introduction , Architecture, Lifecycle - Working with servlet -  Handling HTTP get Requests - Handling HTTP get Requests Containing Data - Handling HTTP post Requests - Redirecting Requests to Other Resources - Multi-Tier Application (JDBC)

Looking up Internet Address - Socket programmingclient/server programs – E-mail client – SMTP - POP3 programs – web page retrieval – protocol handlers – content handlers. Security Issues in Internet programming
Continue reading →

Introduction to XML

0 comments

EXTENSIBLE MARKUP LANGUAGE (XML) 
XML or eXtensible Markup Language is a text-based markup language that enables a web programmer to store data in a structured format by using meaningful tags.  It allows computers to store data in a format that can be interpreted by any other computer with different hardware or software specifications.  Therefore, XML can be used to transfer structured data between heterogeneous systems.
There are several languages derived from XML such as MathML and WML.  MathML is a markup language for the representation of mathematical formulae and scientific data.  Similarly, WML (Wireless Mark Language) is a markup language used for web applications that can be accessed by using a cellular phone.
Differences between HTML and XML:
A markup language like HTML provides tags to indicate how a file should look when displayed on a web page.  Using HTML, we can create web pages easily and effectively.  HTML is mainly used for data presentation using a fixed set of tags.
XML, which is the extension of HTML was developed by World Wide Web Consortium (WCC) for the purpose of extending the features of mark-up languages from presentation to document processing and data interchange.  XML was designed to ease data exchange over the Internet.  XML is mainly used for data description and definition.
Components of XML document:
XML is a device-independent mark-up language.  It provides the structure for organizing and arranging the data in a hierarchical order that can be recognized by different kinds of computers.  The data maintained by XML are available to devices ranging from mainframe computers to mobile phones.
The following are the various components of a XML document:
1.      Processing Instruction (PI)
2.      Tags
3.      Elements
4.      Content
5.      Attributes
6.      Entities and
7.      Comments
The following is an example for a XML document containing data that belongs to a product having product id P001:
 
Program: Product.xml that describes and stores a Product detail
The output of the above XML file when it is opened in a web browser like IE is as follows:
The above XML describes a product with product id P001.  It describes two attribues of the product: description and price.  The description contains some text about the product and the price contains some value ($20.00) that specifies the cost of the product.  The root element of this XML document is named as PRODUCTDATA that acts as a container element for the product P001.
Structuring Data:
XML permits document authors to create mark-up for virtually any type of information.  XML documents contain only data, not formatting instructions, so applications that process XML documents must decide how to display the document data.  XML elements describe the data contained in those elements, so XML processing programs can search, sort, manipulate and render XML documents.
Processing an XML document requires a software program called a XML Parser (or a XML Processor).  Parsers check a XML document’s syntax and enable software programs to process marked-up data.  XML parsers can support the Document Object Model (DOM) or the Simple API for XML (SAX).
A XML document optionally can reference a document that defines the structure of it.  This document is either a Document Type Definition (DTD) or a Schema. When a XML document references a DTD or Schema, the parser reads the DTD/Schema and check that the XML document follows the structure that the DTD/Schema defines.
XML Element:
With XML, document authors can create elements that describe data precisely.  Tags delimit the start and end of each element.  Every XML document must contain exactly one root element, which contains every other element.  The lines that precede the root element are the XML prolog.  Attempting to create more than one root element is an error.
XML elements can have attributes defined for them just like the attributes defined for HTML tags. These attributes are given by its author to describe it with a name and other details.  XML element and attribute names can be of any length and may contain letters, digits, underscores, hyphens and periods.  However, XML names must begin with either a letter or an underscore. Using either a space or a tab in a XML element name or attribute name is an error. 
Any element that contains other elements is a container element.  Elements inside a container element are child elements (or children) of that container element.  IE displays minus (-) and plus (+) sign next to all container elements to hide/view the children under them.
Continue reading →
Thursday, 3 November 2011

University Exam in 2011 on Web Technology!

1 comments
ANNA UNIVERSITY OF TECHNOLOGY, COIMBATORE
B.E/B.TECT. DEGREE EXAMINATION : NOV/DEC 2011

REGULATIONS : 2008

SEVENTH SEMESTER : INFORMATION TECHNOLOGY

080250042 - WEB TECHNOLOGY

Time : 3 Hours                                                            Max. Marks : 100

PART - A

(10 x 2 = 20 MARKS)

Answer All Questions:
 
1.  State the goals to design the web service.

2.  Define WSDL.

3.  What is XML Parser?

4.  Write short note on XML namespace.

5.  Define JAX-RPC.

6.  Differentiate Client-side scripting and Server-side scripting.

7.  What are the different types of J2EE Container?  Briefly explain their purpose.

8.  Develop a VBScript program to perform arithmetic operations.

9.  What are the characteristics of C#?

10.List out the services provided by CLR.


PART-B (5*16=80 marks)


11. (a) i) Explain three tier Web-based Architecture with diagram.  (10)
            ii) Briefly explain the benefits of Web Services.  (6)

(or)

      (b) i) Explain in detail about SOA.  (10)
             ii) Elucidate the Architecture of Web Service with suitable diagram.  (6)

12. (a) i) Create an XML document for Library Management System and apply styles using CSS (10)
            ii) Write short note on Components of XML document.  (6)

(or)

b) Explain in detail about different types of Style Sheets used with XML document and give an example for every type. (16)

13. (a) i) Explain in detail about Servlet Life Cycle.  (10)
            ii) Develop a servlet program to explain the client-server communication by writing "Hello World" servlet.  (6)
(or)

b) i) What are the Components of JSP?  Explain it in detail.  (10)
    ii) Devlop an application to perform result analysis for an Education Institution using JSP. (6)

14. (a) Explain about ASP Objects with suitable example.  (16)


(or)

b) i) Create a web page for on-line Money Transfer using HTML and VBScript.  (10)
    ii) Write short note on Cookies with example.  (6)

15. a) Explain in detail about .NET framework Architecture and Components with suitable diagram (16)
(or)

b) i) Create an application for Payroll processing using C#.Net.  (10)
    ii)  Write a C# program to sort an array of integers.  (6)
Continue reading →