SlideShare a Scribd company logo
1 of 48
www.ignousolvedassignments.com
Course Code: BCS – 053
Course Title: Web Programming
Assignment Number: BCA(V) – 053Assign/14-15
Question 1:
A) How are Web 2.0 technologies different than that of Web 1.0? Explain the use
of Mashups in web. Also explain any four new tags of HTML5.
Solution:-
Difference between web 1.0 and web 2.0
The main difference between web 1.0 and web 2.0 is the interactive behavior of online or
web communication. The web 1.0 platform is much plain and simple just for displaying or
sharing the information over the internet or web platform. It is a one way communication
metaphor where the ownership is more concerned rather taking the community based
approach for sharing and creating information. Web 1.0 can be compared more likely to
be a library where people can just view the information but cannot enhance the
information by adding. The user experience for web 1.0 technology is much poor where
some image and text are the primary things of any website. In the period of web 1.0 the
primary communication channel for any web content was the email only where web 2.0
just changed the whole idea of interactivity. On the other hand web 2.0 is the form of
data reading writing and execution over the web platform. User can add content to web
site like reviewing any product on amazon’s product page. Communication for any web
content is much easier like people can comment or express their feelings about any web
content just under the content which is much more visible in the blogging or social
networking platforms. User experience for web 2.0 is incredible. People can put anything
they want into web sites they are not bound to some sort of images and texts. People
can even put videos, interactive sessions like live video stream, audio stream. The whole
thing about web 2.0 is rich user experience and services being offered through web
platform and the two way communication between the user and the web contents. Web
1.0 was all about the browser but web 2.0 is not all about the browser there are
something like web API which can deliver the whole web experience inside the desktop,
mobile or any device application.
Conclusion:
From the very beginning of web technology, it has got many versions but primarily web
1.0 and web 2.0 are being focused based on some factors and criteria. Mainly web 2.0 is
all about rich internet experience while web 1.0 is limited to information sharing.
Use of Mashup:
A mashup, in web development, is a web page, or web application, that uses content
www.ignousolvedassignments.com
from more than one source to create a single new service displayed in a single graphical
interface. For example, you could combine the addresses and photographs of your
library branches with a Google map to create a map mashup. The term implies easy,
fast integration, frequently using open application programming interfaces (open API)
and data sources to produce enriched results that were not necessarily the original
reason for producing the raw source data. The term mashup originally comes from
British – West Indies slang meaning to be intoxicated, or as a description for something
or someone not functioning as intended. In recent English parlance it can refer to music,
where people seamlessly combine audio from one song with the vocal track from
another—thereby mashing them together to create something new.
The main characteristics of a mashup are combination, visualization, and aggregation. It
is important to make existing data more useful, for personal and professional use. To be
able to permanently access the data of other services, mashups are generally client
applications or hosted online.
New HTML5 Tags:
1. <article> = Specifies an article
2. <hgroup> = Specifies a header for a section or page.
NOTE: - This element has been dropped from W3C HTML5 spec but it is still included in
WHATWG Living Standard.
3. <template> = Container for client-side content instantiated during runtime using
JavaScript
4. <wbr> = Specifies a line break opportunity for very long words and strings of text with
no spaces.
B) Create a simple form that may be used for enrolling into IGNOU programs. The
Form should have relevant drop down lists and other details. You must use CSS. Explain
the advantages of using CSS.
Solution:-
Simple form for enrollment into IGNOU
HTML
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
www.ignousolvedassignments.com
<link href=”style.css” type=”text/css” rel=”stylesheet” />
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Application Form</title>
</head>
<body bgcolor=”#0099CC”>
<style>
table, td, th {
border: 1px;
}
</style>
<div id=”page”>
<div id=”headerimg”><img src=”header2.png” /> </div>
</div>
<form id=”fom”>
<table>
<tr>
<td><b> 1. Programme Code: <input type=”text” name=”firstname” ></td>
www.ignousolvedassignments.com
<td><b> 2. Enrollment No.(Only for office use): <input
type=”text” name=”lastname”></td>
</tr>
<tr>
<td><b> 3. Regional Center Code : <input type=”text” name=”regionalcentercode”></td>
<td><b> 4. Study Center Code : <input type=”text” name=”studycentercode”></td>
<td><b> 5. State Code : <input type=”text” name=”statecode” size=”10″></td>
</tr>
<tr>
<td><b> 6. Medium Code :</b>
<input type=”radio” name=”dob” size=”8″>English
<input type=”radio” name=”dob” size=”8″>Hindi<br />
Others(If other please specify) : <br /><input type=”text” name=”c3other” size=”20″>
</td>
<td><b>7a. Are you already registered with IGNOU : </b>
<input type=”radio” name=”dob” size=”8″>Yes
<input type=”radio” name=”dob” size=”8″>No<br />
www.ignousolvedassignments.com
If yes write the Enrol. No. & Program Code in the boxes below<br/>
Enrollment No. :<input type=”text” name=”enrlno.” size=”10″>
Programme Code :<input type=”text” name=”progcode” size=”10″><br />
<td> <b> 8. Date of Birth :</b><input type=”date” name=”dob” size=”10″><br />
<b> 9. Nationality : </b><input type=”radio” name=”dob” size=”8″>Indian<br/>
Others<br />(If other please specify) :<input type=”text” name=”dob” size=”8″>
</td>
</tr>
<tr>
<td><b> 10. Sex :</b><input type=”radio” name=”dob” size=”8″>Male
<input type=”radio” name=”dob” size=”8″>Female</td>
<td><b> 11. Category :</b><input type=”radio” name=”dob” size=”8″>GEN
<input type=”radio” name=”dob” size=”8″>ST
<input type=”radio” name=”dob” size=”8″>CS
<input type=”radio” name=”dob” size=”8″>OBC<br />
(In case of OBC student, Please also indicate either)<br />
(i) Cramy Layer<input type=”radio” name=”dob” size=”8″ />
www.ignousolvedassignments.com
(ii) Non Cramy Layer<input type=”radio” name=”dob” size=”8″ /></td>
<td><b> 12. Territory Code :</b><br />
<input type=”radio” name=”dob” size=”8″ />Urban
<input type=”radio” name=”dob” size=”8″ />Rural
<input type=”radio” name=”dob” size=”8″ />Tribal
</td>
</tr>
<tr>
<td><b> 13. Marital Status :</b><br /><input type=”radio” name=”dob”/>Married<input
type=”radio” name=”dob”/>Unmarried</td>
<td><b> 14. Religion:</b>
<select>
<option value=”volvo”>Hindu</option>
<option value=”saab”>Muslim</option>
<option value=”mercedes”>Christian</option>
<option value=”audi”>Sihk</option>
<option value=”volvo”>Parsi</option>
www.ignousolvedassignments.com
<option value=”saab”>Jain</option>
<option value=”mercedes”>Buddhist</option>
<option value=”audi”>Jews</option>
<option value=”saab”>Others</option>
</select>
</td>
<td><b> 15. Whether Minority :</b><br /> <input type=”radio” name=”dob”/>Yes
<input type=”radio” name=”dob”/>No
</td>
</tr>
<tr>
<td><b>16. Social Status :</b><br />
<input type=”radio” name=”dob”/>Ex-serviceman
<input type=”radio” name=”dob”/>War widow<br />
<input type=”radio” name=”dob”/>Not applicable
</td>
www.ignousolvedassignments.com
<td><b>17. Whether Kashmiri Migrant:</b> Yes<input
type=”radio” name=”dob”/>No<input type=”radio” name=”dob”/></td>
<td></td>
</tr>
<tr>
<td><b>18. Name of the Candidate</b><br />
First Name :<input type=”text” name=”fname” size=”15″ /><br />
Middle Name :<input type=”text” name=”mname” size=”15″ /><br />
Surename :<input type=”text” name=”sname” size=”15″ /><br />
</td>
<td><b> 19. Father’s/Husband’s Name/Mother’s Name (Strick out whichever is not
applicable)</b><br />
First Name :<input type=”text” name=”fname” size=”15″ /><br />
Middle Name :<input type=”text” name=”mname” size=”15″ /><br />
Surename :<input type=”text” name=”sname” size=”15″ /><br />
</td>
</table>
www.ignousolvedassignments.com
<b> 20. Course Codes: M.Sc.(DFSM)/MTM/MLIS/MA(Edu)/MCA, MAPY, BLIS/ BA/
BCom/B.Sc./BSW/BTS/PGDDM/PGDMRR/CTE/PGDRD/PGDBP/PGDGPS/
GPDEMA/CAFE/ DCE & BPP (Students who are simultanously opting BPP along
with DMT, DDT, DPVCPO, DVAPFV, DFPT and DWM)</b>
<table>
<tr>
<td><b>(a) M.Sc. (DFSM) : </b><input type=”radio” name=”dob”/>CFN
<input type=”radio” name=”dob”/>CNCC</td>
</tr>
<tr>
<td><b>(b) MTM :</b> <input type=”radio” name=”dob”/>Category 1
<input type=”radio” name=”dob”/>Category 2</td>
</tr>
<tr>
<td><b>(c) MLIS/MAPY (Optional Courses) :</b><input
type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/><input
type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/></td>
</tr>
<tr>
www.ignousolvedassignments.com
<td><b> (d)BA/B.Sc./B.Com/BSW/BTS(Foundation Courses) :</b><input
type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/><input
type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/>
</td>
</tr>
<tr>
<td> <b>(e) BA/B.Sc./B.Com (Elective Courses)
:</b><input type=”text” name=”dob” size=”20″/><input
type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/><input
type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”15″/><input
type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/>
</td>
</tr>
<tr>
<td><b>(f) MA (Edu)<br />
Specialised Area : </b>
<input type=”checkbox” name=”hedu” />Higher Education
<input type=”checkbox” name=”hedu” />Educational Technology
<input type=”checkbox” name=”hedu” />Distance Education
www.ignousolvedassignments.com
<input type=”checkbox” name=”hedu” />Educational Management
</td>
</tr>
<tr>
<td> <b>(g) CTE/DTS/PGDRD PGDDM/PGDMRR(Optional Courses) :</b><input
type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/><input
type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/>
</td>
</tr>
<tr>
<td> <b>(h) CAFE/PGDBP(Optional Courses) :</b><input
type=”text” name=”dob” size=”25″/><input type=”text” name=”dob” size=”25″/>
</td>
</tr>
<tr>
<td> <b>(i) DCE/PGDGPS/ PGDEMA/DUL(Optional Courses) :</b><input
type=”text” name=”dob” size=”25″/><input type=”text” name=”dob” size=”20″/><input
type=”text” name=”dob” size=”25″/>
www.ignousolvedassignments.com
</td>
</tr>
<tr>
<td> <b>(j) BPP(Optional Courses) :</b><input
type=”text” name=”dob” size=”25″/><input type=”text” name=”dob” size=”25″/>
</td>
</tr>
<tr>
<td> <b>(k) MCA : </b><input type=”checkbox” name=”dob” size=”10″/>CS-60 A1</td>
</tr>
<tr>
<td> <b>21(a) Whether a person with disability:</b>
<input id=”showme” type=”radio” name=”dob” size=”10″/>Yes
<input id=”hideme” type=”radio” name=”dob” size=”10″/>No<br />
<p> <b>21(b) If Person with disability (nature of disability):</b>
<input type=”checkbox” name=”dob” size=”10″/>Speech and Hearing Impairment
<input type=”checkbox” name=”dob” size=”10″/>Low Vision
www.ignousolvedassignments.com
<input type=”checkbox” name=”dob” size=”10″/>Locomotor Impairment
<input type=”checkbox” name=”dob” size=”10″/>Visual impairment
<input type=”text” name=”dob” size=”10″/>Any other Please specify </p>
</td>
</tr>
<tr>
<td>
<b>22. Employment Status:</b>
<input type=”radio” name=”dob” size=”10″/>Unemployed
<input type=”radio” name=”dob” size=”10″/>Employed
<input type=”radio” name=”dob” size=”10″/>IGNOU Employee
<input type=”radio” name=”dob” size=”10″/>KVS Employee
</td>
</tr>
<tr>
<td> <b>23. Details of Scholarship being received if any:<br />
(a) Annual Scholarship Amount: <input type=”text” name=”annual” size=”8″ />
www.ignousolvedassignments.com
(b) Family income (yearly): <input type=”text” name=”annual” size=”8″ /><br />
(c) Deptt. Offering Scholarship: </b><input type=”radio” name=”deptt.” />Govt.
Diptt. <input type=”radio” name=”deptt.” />Others<br />
<b>(d) Below poverty line </b>
<input type=”radio” name=”deptt.” />Yes
<input type=”radio” name=”deptt.” />No<br />
<b>(e) In case of jail inmates</b>
<input type=”radio” name=”deptt.” />Yes
<input type=”radio” name=”deptt.” />No
</td>
</tr>
<tr>
<td>
<b> 24. Relevant Qualifications: (Which makes you eligible for the programme)<br
/> </b>
(a) Qualification(Code)<input type=”text” name=”qualifictioncode” size=”5″>
(b) Main Subjects<input type=”text” name=”qualifictioncode” size=”5″>
(c) Year of passing
www.ignousolvedassignments.com
<select id=”year”></select>
(d) Division
<select>
<option value=”first”>1st</option>
<option value=”second”>2nd</option>
<option value=”third”>3rd</option>
<option value=”fourth”>4th</option>
<option value=”pass”>PASS</option>
</select><br />
(e) % of marks<input type=”text” name=”percent” size=”8″>
(f) Board Code<input type=”text” name=”percentd” size=”8″>
</td>
</tr>
<tr>
<td>
<b> 25. Details of Fees:<br /> </b>
<input type=”radio” name=”cashhchallanofbank” />Cash Challan of Bank
www.ignousolvedassignments.com
<input type=”radio” name=”cashhchallanofbank” />Bank Draft
</td>
</tr>
<tr>
<td><b>26. Amount(Add Rs. 200/- in Case of Late fee)<input
type=”text” name=”amount” size=”10″ />
DD/Challan No. <input type=”text” name=”amount” size=”15″ />
DD/Challan Date <input type=”date” name=”DD/date” /> <br />
Bank Name : <input type=”text” name=”amount” size=”125″ />
</b>
</td>
</tr>
<tr>
<td> <b>27. Address for Correspondence (Do not give Post Box No. Leave a blank
between each unit of address like House No., Street Name, P.O., etc.)<input
type=”text” name=”amount” size=”125″ /><br /></b>
<b>State <select name=slist>
<!– india all states –>
www.ignousolvedassignments.com
<script>
var states = new Array(“Andaman and Nicobar Islands”, ”Andhra Pradesh”, ”Arunachal
Pradesh”, ”Assam”, ”Bihar”, ”Chandigarh”, “Chhattisgarh”, ”Dadra and Nagar
Haveli”, ”Daman and Diu”, ”Delhi”, ”Goa”, ”Gujarat”, ”Haryana”, ”Himachal
Pradesh”, ”Jammu and Kashmir”, ”Jharkhand”, ”Karnataka”, ”Kerala”, ”Lakshadweep”,
“Madhya
Pradesh”, ”Maharashtra”, ”Manipur”, ”Meghalaya”, ”Mizoram”, ”Nagaland”, ”Orissa”, ”Po
ndicherry”, ”Punjab”, ”Rajasthan”, ”Sikkim”, ”Tamil Nadu”, ”Tripura”, ”Uttaranchal”, ”Uttar
Pradesh”, ”West Bengal”);
for(var hi=0; hi<states.length; hi++)
document.write(“<option value=”"+states[hi]+””>”+states[hi]+”</option>”);
</script>
</select>
<b>City: <input type=”text” name=”amount” size=”15″ />
<b> District: <input type=”text” name=”amount” size=”15″ />
<b> Pin Code: <input type=”text” name=”amount” size=”15″ />
</td>
</tr>
<tr>
<td>
www.ignousolvedassignments.com
<b>28. Landline Telephone Number (if any) with STD Code: <input
type=”text” name=”landlineno” size=”20″ />
29. Fax No. (if any) with STD Code: <input type=”text” name=”faxno” size=”20″ /><br />
30. Mobile Number (if any): <input type=”text” name=”mobileno” size=”20″ />
31. E-mail address/ID (if any): <input type=”text” name=”email” size=”50″ />
</td>
</tr>
<tr>
<td height=”11″ valign=”middle” bgcolor=”#FFFFFF” class=”text”>&nbsp;</td>
<td height=”11″ valign=”middle” bgcolor=”#FFFFFF”>&nbsp;</td>
<td
height=”11″ colspan=”5″ valign=”top” nowrap=”" bgcolor=”#F3F3F3″ class=”helpText”>&
nbsp;</td>
</tr>
<tr>
<td height=”11″ valign=”middle” bgcolor=”#FFFFFF” class=”text”>&nbsp;</td>
<td height=”11″ valign=”middle” bgcolor=”#FFFFFF”>&nbsp;</td>
www.ignousolvedassignments.com
<td
height=”11″ colspan=”5″ valign=”top” nowrap=”" bgcolor=”#F3F3F3″ class=”helpText”>&
nbsp;</td>
</tr>
<tr><td>
<div align=”center”><span><font color=”red”>
<input name=”Submit” type=”submit” class=”FormGOButton” id=”continue” value=”Save
and Continue” onclick=”document.pressed=this.value”>
<font color=”red”>
<input name=”Submit” type=”submit” class=”FormGOButton” id=”exit” value=”Temporary
Exit” onclick=”document.pressed=this.value” title=”Save and Register Later”>
</font> </font></span> </div>
</td>
</tr>
<tr>
<td
height=”15″ colspan=”7″ valign=”middle” class=”text” background=”heading.gif”>&nbsp;
</td>
</tr>
</table>
</form>
www.ignousolvedassignments.com
<div id=”footer”>Powered by Nise Computers 2014</div>
<script src=
"http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
</script>
<script>
<!-- Years functions -->
var start = 1950;
var end = new Date().getFullYear();
var options = "";
for(var year = start ; year <=end; year++){
options += "<option>"+ year +"</option>";
}
document.getElementById("year").innerHTML = options;
<!-- showme hideme radio function -->
$(document).ready(function(){
$("#hideme").click(function(){
$("p").hide();
});
$("#showme").click(function(){
$("p").show();
});
});
</script>
</body>
</html>
Style CSS
@charset "utf-8";
/* CSS Document */
#page {
width: 1024px;
background-color:#CCCCCC;
margin-left: auto;
margin-right: auto;
www.ignousolvedassignments.com
margin-top: 5px;
padding-top: 10px;
padding-bottom: 10px;
box-shadow: 0px 0px 20px 3px #d3d3d3;
border-radius: 4px;
background-color: #FFFFFF;
}
#fom {
background-color: #FFFFFF;
width: 1024px;
margin-left: auto;
margin-right: auto;
box-shadow: 0px 0px 20px 3px #d3d3d3;
border-radius: 4px;
/*margin-top: 10px;
padding-top: 10px; */
}
www.ignousolvedassignments.com
#footer {
border: 1px groove #aaaaaa;
/* clear: both; background: blue;
color: White; padding: 0; */
background-color: #FFFFFF;
width: 1024px;
margin-left: auto;
margin-right: auto;
box-shadow: 0px 0px 20px 3px #d3d3d3;
border-radius: 4px;
text-align: center;
/* vertical-align: middle; line-height: normal;
margin: 0; position: fixed; bottom: 0px; width: 100%; */
}
Advantages of CSS:-
CSS stands for “Cascading Style Sheets“. A single CSS file can contain positioning,
layout, font, colors and style information for an entire web site. The file can be
referenced by each html file on the site.
Following are Advantages of CSS:-
Making changes
to the layout
CSS makes it very easy to change the style of a document.
Let’s say we wanted to move the picture in the title of this page
to the right by 10 pixels. This would be a nightmare in a table
based design. We would have to open every page and alter the
www.ignousolvedassignments.com
table width manually.Fortunately we have used CSS, and all
we have to do is open our CSS file which stores the layout of
the site, and change the number relating to the position of the
image. That will change his position throughout the whole site.
The look and layout of a site can be changed beyond
recognition just by altering the CSS file. This makes CSS
indispensable for large web sites.
File Size
Probably the mostly useful feature of CSS is that all of the style
and layout is removed from the html, so the html page size is
very much smaller. The CSS file is downloaded just once by
the visitor’s browser and re-used for different pages on a web
site. This reduces the bandwidth requirements for your server
and also ensures a faster download for your visitors.
Search Engines
A search engine robot will normally consider the content in the
start of your html code is more important than the text towards
the end of the code. For a table based page the contents of the
navigation bar will normally show up as the page description in
search engine results. With a CSS page the navigation can be
moved to the bottom of the source code, so the search engine
displays your content instead of your navigation.
Accessibility
Separating style from content makes life very easy for visitors
who prefer to view only the content of a web page, or to
modify the content. These could be blind or partially sighted
people who might use a screen reader to interpret a page.
Consistency
Layout and position of navigation can be completely consistent
across a site. This was previously possible only using frames.
C) What are the uses of XML technology? Create at least five instances of your
teachers Data using XML. The list may contain name of teacher, her/his
qualifications (Starting from graduation degree) and date of joining the school. Each
teacher should be assigned an ID as an attribute, and a phone number which should have
residence Or mobile as attribute. Also create the DTD for the XML document you
have Created.
Solution: -
www.ignousolvedassignments.com
Uses of XML Technology:
The Extensible Markup Language (XML) is a simple text-based format for representing
structured information: documents, data, configuration, books, transactions, invoices,
and much more. It was derived from an older standard format called SGML (ISO 8879),
in order to be more suitable for Web use. XML is one of the most widely-used formats for
sharing structured information today: between programs, between people, between
computers and people, both locally and across networks.
A short example:
<part number="1976">
<name>Windscreen Wiper</name>
<description>The Windscreen wiper
automatically removes rain
from your windscreen, if it
should happen to splash there.
It has a rubber <ref part="1977">blade</ref>
which can be ordered separately
if you need to replace it.
</description>
</part>
If you are already familiar with HTML, you can see that XML is very similar. However,
the syntax rules of XML are strict: XML tools will not process files that contain errors, but
instead will give you error messages so that you fix them. This means that almost all
XML documents can be processed reliably by computer software.
www.ignousolvedassignments.com
Teacher Data using XML:
<?xml version="1.0"?>
<CATALOG>
<TDATA>
<NAME>Monika Shrama</NAME>
<Teacher_ID>0011</Teacher_ID>
<Qualifications>BCA,MCA</Qualifications>
<Joining_date>15/05/2009</Joining_date>
<Contacts>+912653261425</Contacts>
</TDATA>
<TDATA>
<NAME>Sruthi Shah</NAME>
<Teacher_ID>0021</Teacher_ID>
<Qualifications>B.Tech, M.Tech</Qualifications>
<Joining_date>25/07/2008</Joining_date>
<Contacts>+919865236555</Contacts>
</TDATA>
<TDATA>
<NAME>Deepika Verma</NAME>
www.ignousolvedassignments.com
<Teacher_ID>0013</Teacher_ID>
<Qualifications>BBA, MBA</Qualifications>
<Joining_date>07/11/2011</Joining_date>
<Contacts>+919862351426</Contacts>
</TDATA>
<TDATA>
<NAME>Swetha Kumari</NAME>
<Teacher_ID>0023</Teacher_ID>
<Qualifications>BBA, MBA</Qualifications>
<Joining_date>29/08/2012</Joining_date>
<Contacts>+918844552211</Contacts>
</TDATA>
<TDATA>
<NAME>Anil Kumar</NAME>
<Teacher_ID>0039</Teacher_ID>
<Qualifications>Bsc, Msc</Qualifications>
<Joining_date>11/11/2013</Joining_date>
<Contacts>+917894561235</Contacts>
</TDATA>
www.ignousolvedassignments.com
</CATALOG>
DTD for Teacher Data XML file
<!DOCTYPE CATALOG [
<!ELEMENT CATALOG (TDADA*)
<!ELEMENT TDADA (NAME,Teacher_ID,Qualifications,
Joining_date,Contacts,)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT Teacher_ID (#PCDATA)>
<!ELEMENT Qualifications (#PCDATA)>
<!ELEMENT Joining_date (#PCDATA)>
<!ELEMENT Contacts (#PCDATA)>
]>
This DTD defines that wherever the CATALOG element is used in the XML code, it
should consist of one or more TDATA elements. Likewise, whenever the TDATA
element is used, it should include the NAME, Teacher_ID, Qualifications, Joining_date,
and Contacts elements.
D) Explain the commands of JavaScript that can be used to modify a HTML
Document. Explain how events are handled using JavaScript. Write a program using
JavaScript that changes the text WELCOME to lower case and then again to upper case.
This cycle of conversion is performed after every 10 seconds.
Solution: -
JavaScript Event Handlers:
Actions by page users trigger event handler commands in the JavaScript. The program
will then perform whatever commands are assigned to the event. Common event
handlers are listed in the following table.
www.ignousolvedassignments.com
Event Handler Action
onAbort
The user stopped loading a page
onBlur
The user moves from an object
onChange
The user changed an object
onClick
The user mouse-clicked an object
onError
An error occurred in the script
onFocus
The user activates an object
onLoad
The object has been loaded
onMouseover
The cursor has moved over the object
onMouseout
The cursor has moved off the object
onSelect
The user selected the object
onSubmit
The user submitted a form
onUnload
The user leaves the window
JavaScript LowerCase to Uppercase Program
www.ignousolvedassignments.com
<!DOCTYPE html>
<html>
<body>
<p> WELLCOME..</p><br>
<span id="countdown" class="timer"></span>
<p id="demo"></p>
<script>
function myFunction() {
var str = "WELLCOME..";
var res = str.toLowerCase();
document.getElementById("demo").innerHTML = res;
}
var seconds = 10;
{
function secondPassed() {
var minutes = Math.round((seconds - 30)/60);
var remainingSeconds = seconds % 60;
if (remainingSeconds < 10) {
www.ignousolvedassignments.com
remainingSeconds = "0" + remainingSeconds;
}
document.getElementById('countdown').innerHTML
= minutes + ":" + remainingSeconds;
if (seconds == 0) {
clearInterval(countdownTimer);
document.getElementById('countdown').innerHTML = myFunction();
} else {
seconds--;
}
}
}
var countdownTimer = setInterval('secondPassed()', 100);
</script>
</body>
</html>
The above program will first show the WELCOME text in Uppercase, then the 10
seconds countdown timer will start when 10 seconds finished the welcome text will
change in Lowercase as “welcome” this is simple program you can try it by yourself.
E) List 4 tags that are used in WML. Create a simple WML program which should include
a text paragraph, a table, an image and any two WML input elements.
Solution: -
List of tags that are used in WML
1. <wml:cancel/>
Renders a WML <postfield> element with a value of cancel. This tag is only valid when
nested inside a form tag body. Posting this element causes the Action servlet to bypass
calling the associated form bean validate() method.
www.ignousolvedassignments.com
2. <wml:card/>
This tag renders a card element. This element is not rendered when the tag is executed
in WebSphere Portal. This allows writing JSPs that can be used in both the servlet and
portlet environments.
3. <wml:errors/>
Retrieves the set of error messages from the request object with the
default key of Action.ERROR_KEY or the value specified by attribute name.
If ActionErrors are found then the errors are displayed. This tag also
requires the following two message keys in the application scope
MessageResources.
 errors.header – header that is displayed before the error messages list.
 errors.footer – header that is displayed after the error messages list.
4. <wml:form/>
This tag does not render any markup, but it is used to scope beans
and transactions. The tags used with the body of the form tag can use
the form bean to populate the input fields.
Simple WML Program Example:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC
"-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card>
<p>
This is Image. <img src="welcome.wbmp" alt="Image"/>
<img src="friend.wbmp" alt="Image"/>
<img src="smile.wbmp" alt="Image"/><br/>
www.ignousolvedassignments.com
Enter Following Information:<br/>
Name : <input name="name" size="12"/><br/>
Roll no. : <input name="age" size="12" format="*N"/><br/>
Class : <input name="sex" size="12"/> <br/>
<select>
<optgroup title="India">
<option value="delhi">Delhi</option>
<option value="mumbai">Mumbai</option>
<option value="hyderabad">Hyderabad</option>
</optgroup>
</select>
<table columns="3" align="LCR">
<tr>
<td>Col 1</td>
<td>Col 2</td>
<td>Col 3</td>
</tr>
<tr>
<td>A</td>
www.ignousolvedassignments.com
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>D</td>
<td>E</td>
<td>F</td>
</tr>
</table>
</p>
</card>
</wml>
OUTPUT:-
www.ignousolvedassignments.com
The above program is built in Adobe Dreamweaver under WML page type.
Question 2:
A) Differentiate between 2-tier and 3-tier architectures. Explain any two HTTP methods
with the help of an example each. Also explain the concept of web container with the help of
an example.
Solution: -
Difference between 2-tier & 3- tier architecture:
Design
Consideration Description
Security
The topic of security is a tough one because arguments can be
made either way for 2 vs. 3-tiers. In my experience, the 3-tier
architecture has the potential for better security, but if great
care isn’t taken during development it frequently ends up less
secure. With a 2-tier approach, the application authenticates
to and communicates directly to the database, which
simplifies the attack surface area and is one less boundary to
be concerned about. Depending on the details of the
application server, there could be, for example, many
complex REST APIs that could each have their own attack
weaknesses. This one topic could be covered in a book, so
www.ignousolvedassignments.com
I’m simply calling this one in favor of 2-tier even though
direct access to the data sounds unsafe.
Cost
2-tier applications are generally easier to build and because of
their lower complexity are less expensive all around.
Ease of
maintenance
Although part of cost consideration, ease of maintenance is
worth analyzing separately. Keeping the client up to date in a
2-tier architecture can be a trouble point that is not an issue
with most 3-tier designs. However, in a 3-tiered architecture,
keeping the application tier up to date is much more difficult
in the long run. For example, sometimes security patches
required to keep the application tier secure are not compatible
with your code and require you to make code changes, which
can be extensive.
Performance
Performance in a 2-tiered architecture is more sensitive to the
hardware the client is running on, as well as the speed of the
network connection.
Deployment
In a 3-tiered architecture, typically users point their browsers
to the application server to start using the application.
However, the setup of that environment can be considerably
more complex than setting up a database for the users to
connect to and making the installer for the client available.
www.ignousolvedassignments.com
HTTP Methods:
1) GET Method
A GET request retrieves data from a web server by specifying parameters in the URL
portion of the request. This is the main method used for document retrieval. Following is
a simple example which makes use of GET method to fetch hello.htm:
GET /hello.htm HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
2) POST Method
The POST method is used when you want to send some data to the server, for example
file update, form data etc. Following is a simple example which makes use of POST
method to send a form data to the server which will be processed by a process.cgi and
finally a response will be returned:
POST /cgi-bin/process.cgi HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
www.ignousolvedassignments.com
Host: www.tutorialspoint.com
Content-Type: text/xml; charset=utf-8
Content-Length: 88
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://clearforest.com/">string</string>
Web container:
A Web container is a runtime environment for Web applications. It processes servlets,
JSP files, and other types of server-side components. Each application server runtime
has one logical Web container, which can be modified but not created or removed.
Each Web container provides:
 Web container transport chains
The Web container inbound transport chain handles requests. It consists of a TCP inbound
channel that provides the connection to the network, an HTTP inbound channel that serves
HTTP 1.0 and 1.1 requests, and a Web container channel that sends requests for servlets
and JSPs to the Web container for processing.
 Servlet processing
when it handles servlets, a Web container creates a request object and a response object
and then invokes the servlet service method. The Web container also invokes the servlet
destroy method when appropriate and unloads the servlet, after which the JVM™ performs
garbage collection.
 HTML and other static content processing
Requests for HTML and other static content that are directed to the Web container are
served by the Web container inbound chain. However, in most cases, using an external
Web server and a Web server plug-in as a Web container interface is more appropriate for
a production environment.
www.ignousolvedassignments.com
 Session management
The Web container provides support for the javax.servlet.http.HttpSession interface as
described in the API specification for the servlet.
Figure 1 illustrates the Web container and its place in the application server.
B) Explain the JSP life cycle with the help of a diagram. Explain the action elements of JSP
with the help of an example each.
Solution: -
The key to understanding the low-level functionality of JSP is to understand the simple
life cycle they follow. A JSP life cycle can be defined as the entire process from its
creation till the destruction which is similar to a servlet life cycle with an additional step
which is required to compile a JSP into servlet.
The following are the paths followed by a JSP
www.ignousolvedassignments.com
 Compilation
 Initialization
 Execution
 Cleanup
The four major phases of JSP life cycle are very similar to Servlet Life Cycle and they
are as follows:
JSP Action elements:-
The <jsp:include> Action: This action lets you insert files into the page being generated.
The syntax looks like this:
Example:
Let us define following two files (a)date.jps and (b) main.jsp as follows:
Following is the content of date.jsp file:
<p>
Today's date: <%= (new java.util.Date()).toLocaleString()%>
</p>
Here is the content of main.jsp file:
<html>
<head>
<title>The include Action Example</title>
</head>
www.ignousolvedassignments.com
<body>
<center>
<h2>The include action Example</h2>
<jsp:include page="date.jsp" flush="true" />
</center>
</body>
</html>
Now let us keep all these files in root directory and try to access main.jsp. This would
display result something like this:
The include action Example
Today's date: 12-Sep-2010 14:54:22
The <jsp:useBean> Action:
The useBean action is quite versatile. It first searches for an existing object utilizing the
id and scope variables. If an object is not found, it then tries to create the specified
object.
The simplest way to load a bean is as follows:
<jsp:useBean id="name" />
The <jsp:setProperty> Action:
The setProperty action sets the properties of a Bean. The Bean must have been
previously defined before this action. There are two basic ways to use the setProperty
action:
You can use jsp:setProperty after, but outside of, a jsp:useBean element, as below:
<jsp:useBean id="myName" ... />
...
<jsp:setProperty name="myName" property="someProperty" .../>
In this case, the jsp:setProperty is executed regardless of whether a new bean was
instantiated or an existing bean was found.
A second context in which jsp:setProperty can appear is inside the body of a
jsp:useBean element, as below:
<jsp:useBean id="myName" ... >
www.ignousolvedassignments.com
...
<jsp:setProperty name="myName" property="someProperty" .../>
</jsp:useBean>
The <jsp:getProperty> Action:
The getProperty action is used to retrieve the value of a given property and converts it to
a string, and finally inserts it into the output.
The getProperty action has only two attributes, both of which are required ans simple
syntax is as follows:
<jsp:useBean id="myName" ... />
...
<jsp:getProperty name="myName" property="someProperty" .../>
Example:
Let us define a test bean which we will use in our example:
/* File: TestBean.java */
package action;
public class TestBean {
private String message = "No message specified";
public String getMessage() {
return(message);
}
public void setMessage(String message) {
this.message = message;
www.ignousolvedassignments.com
}
}
Compile above code to generated TestBean.class file and make sure that you copied
TestBean.class in C:apache-tomcat-7.0.2webappsWEB-INFclassesaction folder and
CLASSPATH variable should also be set to this folder:
Now use the following code in main.jsp file which loads the bean and sets/gets a simple
String parameter:
<html>
<head>
<title>Using JavaBeans in JSP</title>
</head>
<body>
<center>
<h2>Using JavaBeans in JSP</h2>
<jsp:useBean id="test" class="action.TestBean" />
<jsp:setProperty name="test" property="message"
value="Hello JSP..." />
<p>Got message....</p>
<jsp:getProperty name="test" property="message" />
</center>
</body>
</html>
Now try to access main.jsp, it would display following result:
Using JavaBeans in JSP
Got message....
Hello JSP...
The <jsp:forward> Action:
The forward action terminates the action of the current page and forwards the request to
another resource such as a static page, another JSP page, or a Java Servlet.
The simple syntax of this action is as follows:
<jsp:forward page="Relative URL" />
Example:
www.ignousolvedassignments.com
Let us reuse following two files (a) date.jps and (b) main.jsp as follows:
Following is the content of date.jsp file:
<p> Today's date: <%= (new java.util.Date()).toLocaleString()%> </p>
Here is the content of main.jsp file:
<html>
<head>
<title>The include Action Example</title>
</head>
<body>
<center>
<h2>The include action Example</h2>
<jsp:forward page="date.jsp" />
</center>
</body>
</html>
Now let us keep all these files in root directory and try to access main.jsp. This would
display result something like as below. Here it discarded content from main page and
displayed content from forwarded page only.
Today's date: 12-Sep-2010 14:54:22
The <jsp:plugin> Action:
The plugin action is used to insert Java components into a JSP page. It determines the
type of browser and inserts the <object> or <embed> tags as needed.
If the needed plugin is not present, it downloads the plugin and then executes the Java
component. The Java component can be either an Applet or a JavaBean.
The plugin action has several attributes that correspond to common HTML tags used to
format Java components. The <param> element can also be used to send parameters to
the Applet or Bean.
Following is the typical syntax of using plugin action:
www.ignousolvedassignments.com
<jsp:plugin type="applet" codebase="dirname" code="MyApplet.class"
width="60" height="80">
<jsp:param name="fontcolor" value="red" />
<jsp:param name="background" value="black" />
<jsp:fallback>
Unable to initialize Java Plugin
</jsp:fallback>
</jsp:plugin>
The <jsp:element> Action, The <jsp:attribute> Action, The <jsp:body> Action
The <jsp:element>, lt;jsp:attribute> and <jsp:body> actions are used to define XML
elements dynamically. The word dynamically is important, because it means that the
XML elements can be generated at request time rather than statically at compile time.
Following is a simple example to define XML elements dynamically:
<@page language="java" contentType="text/html"%>
<html xmlns="http://www.w3c.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page">
<head>
<title>Generate XML Element</title>
</head>
<body>
<jsp:element name="xmlElement">
<jsp:attribute name="xmlElementAttr">
Value for the attribute
</jsp:attribute>
<jsp:body>
Body for XML element
</jsp:body>
</jsp:element>
</body>
</html>
This would produce following HTML code at run time:
www.ignousolvedassignments.com
<html xmlns="http://www.w3c.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page">
<head><title>Generate XML Element</title></head>
<body>
<xmlElement xmlElementAttr="Value for the attribute">
Body for XML element
</xmlElement>
</body>
</html>
The <jsp:text> Action:
The <jsp:text> action can be used to write template text in JSP pages and documents.
Following is the simple syntax for this action:
<jsp:text>Template data</jsp:text>
The body fo the template cannot contain other elements; it can only contain text and EL
expressions ( Note:- EL expressions are explained in subsequent chapter). Note that in
XML files, you cannot use expressions such as ${whatever > 0}, because the greater
than signs are illegal. Instead, use the gt form, such as ${whatever gt 0} or an alternative
is to embed the value in a CDATA section.
<jsp:text><![CDATA[<br>]]></jsp:text>
If you need to include a DOCTYPE declaration, for instance for XHTML, you must also
use the <jsp:text> element as follows:
<jsp:text><![CDATA[<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">]]>
</jsp:text>
<head><title>jsp:text action</title></head>
<body>
www.ignousolvedassignments.com
<books><book><jsp:text>
Welcome to JSP Programming
</jsp:text></book></books>
</body>
</html>
Try above example with and without <jsp:text> action.
C) What is the need of a session in a JSP based website? Explain the URL rewriting, and
use of Hidden Objects in the context of session management with the help of examples. List
any two methods of session objects and explain each one of them with the help of an
example each.
Solution:-
JSP Sessions:-
On a typical web site, a visitor might visit several pages and perform several
interactions. If you are programming the site, it is very helpful to be able to associate
some data with each visitor. For this purpose, “session“s can be used in JSP.
A session is an object associated with a visitor. Data can be put in the session and
retrieved from it, much like a Hashtable. A different set of data is kept for each visitor to
the site.
Here is a set of pages that put a user’s name in the session, and display it elsewhere.
First we have a form, let us call it GetName.html
<HTML>
<BODY>
<FORM METHOD=POST ACTION="SaveName.jsp">
What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20>
<P><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
The target of the form is “SaveName.jsp”, which saves the user’s name in the
session. Note the variable “session“. This is another variable that is normally made
available in JSPs, just like out and request variables. (In the @page directive, you can
indicate that you do not need sessions, in which case the “session” variable will not be
made available.)
www.ignousolvedassignments.com
<% String name = request.getParameter( "username" );
session.setAttribute( "theName", name ); %>
<HTML>
<BODY>
<A HREF="NextPage.jsp">Continue</A>
</BODY>
</HTML>
The SaveName.jsp saves the user’s name in the session, and puts a link to another
page, NextPage.jsp.
NextPage.jsp shows how to retrieve the saved name.
<HTML>
<BODY>
Hello, <%= session.getAttribute( "theName" ) %>
</BODY>
</HTML>
If you bring up two different browsers (not different windows of the same browser), or run
two browsers from two different machines, you can put one name in one browser and
another name in another browser, and both names will be kept track of.
The session is kept around until a timeout period. Then it is assumed the user is no
longer visiting the site, and the session is discarded.
www.ignousolvedassignments.com
What Is URL Rewriting?
If you were writing a letter to your bank, you would probably open your word processor
and create a file named something like lettertobank.doc. The file might sit in
your Documents directory, with a full path
likeC:WindowsusersjulieDocumentslettertobank.doc. One file path = one document.
Similarly, if you were creating a banking website, you might create a page
named page1.html, upload it, and then point your browser
tohttp://www.mybanksite.com/page1.html. One URL = one resource. In this case, the
resource is a physical Web page, but it could be a page or product drawn from a CMS.
URL rewriting changes all that. It allows you to completely separate the URL from the
resource. With URL rewriting, you could have
http://www.mybanksite.com/aboutus.html taking the user to …/page1.html or to
…/about-us/ or to …/about-this-website-and-me/ or to …/youll-never-find-out-about-me-
hahaha-Xy2834/. Or to all of these. It’s a bit like shortcuts or symbolic links on your hard
drive. One URL = one way to find a resource.
With URL rewriting, the URL and the resource that it leads to can be completely
independent of each other. In practice, they’re usually not wholly independent: the URL
usually contains some code or number or name that enables the CMS to look up the
resource. But in theory, this is what URL rewriting provides: a complete separation.
For More Ignou Solved Assignments Please Visit - www.ignousolvedassignments.com
Connect on Facebook :
http://www.facebook.com/pages/IgnouSolvedAssignmentscom/346544145433550
Subscribe and Get Solved Assignments Direct to your Inbox :
http://feedburner.google.com/fb/a/mailverify?uri=ignousolvedassignments_com

More Related Content

What's hot

Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuAppUniverz Org
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Todaydavyjones
 
Fundamentals of web_design_v2
Fundamentals of web_design_v2Fundamentals of web_design_v2
Fundamentals of web_design_v2hussain534
 
CC tech-projects: overview (TELDAP 2009)
CC tech-projects: overview (TELDAP 2009)CC tech-projects: overview (TELDAP 2009)
CC tech-projects: overview (TELDAP 2009)Bob Chao
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)Mediacurrent
 
Wicket from Designer to Developer
Wicket from Designer to DeveloperWicket from Designer to Developer
Wicket from Designer to DeveloperMarcello Teodori
 
A Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionA Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionJames Pearce
 
Building Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web AppsBuilding Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web AppsJames Pearce
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2James Pearce
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why howbrucelawson
 

What's hot (13)

Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Fundamentals of web_design_v2
Fundamentals of web_design_v2Fundamentals of web_design_v2
Fundamentals of web_design_v2
 
CC tech-projects: overview (TELDAP 2009)
CC tech-projects: overview (TELDAP 2009)CC tech-projects: overview (TELDAP 2009)
CC tech-projects: overview (TELDAP 2009)
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)
 
Wicket from Designer to Developer
Wicket from Designer to DeveloperWicket from Designer to Developer
Wicket from Designer to Developer
 
A Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionA Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 Revolution
 
Building Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web AppsBuilding Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web Apps
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
College Web Site HTML PROJECT
College Web Site HTML PROJECTCollege Web Site HTML PROJECT
College Web Site HTML PROJECT
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why how
 
Zemanta
ZemantaZemanta
Zemanta
 

Similar to Bcs 053 solved assignment 2014-15

Nt1310 Final Exam Questions And Answers
Nt1310 Final Exam Questions And AnswersNt1310 Final Exam Questions And Answers
Nt1310 Final Exam Questions And AnswersLisa Williams
 
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issuesMaximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issuesPlatypus
 
Web 1.02.03.0 Good.ppt
Web 1.02.03.0 Good.pptWeb 1.02.03.0 Good.ppt
Web 1.02.03.0 Good.pptBalasundaramSr
 
Over view of Technologies
Over view of TechnologiesOver view of Technologies
Over view of TechnologiesChris Mitchell
 
Web 2.0 Core Concepts, Applications, and Implications
Web 2.0 Core Concepts, Applications, and ImplicationsWeb 2.0 Core Concepts, Applications, and Implications
Web 2.0 Core Concepts, Applications, and ImplicationsTomáš Pitner
 
Four Principles of Accessibility UK Version
Four Principles of Accessibility UK Version Four Principles of Accessibility UK Version
Four Principles of Accessibility UK Version Homer Gaines
 
Introduction To Open Web Protocols
Introduction To Open Web ProtocolsIntroduction To Open Web Protocols
Introduction To Open Web ProtocolsMohan Krishnan
 
Office 2010 cloud computing farhad_javidi
Office 2010 cloud computing farhad_javidiOffice 2010 cloud computing farhad_javidi
Office 2010 cloud computing farhad_javidijavidi
 
E commerce p1 edit
E commerce p1 editE commerce p1 edit
E commerce p1 editmmm2k
 
Semantic Web, an introduction for bioscientists
Semantic Web, an introduction for bioscientistsSemantic Web, an introduction for bioscientists
Semantic Web, an introduction for bioscientistsEmanuele Della Valle
 
Detail History of web 1.0 to 3.0
Detail History of web 1.0 to 3.0Detail History of web 1.0 to 3.0
Detail History of web 1.0 to 3.0Ghazal Hina
 
Web 2.0
Web 2.0Web 2.0
Web 2.0rdbms
 
online blogging system
online blogging systemonline blogging system
online blogging system001vaibhav
 
WEB 2.0
WEB 2.0WEB 2.0
WEB 2.0ARJUN
 

Similar to Bcs 053 solved assignment 2014-15 (20)

Web2.0
Web2.0Web2.0
Web2.0
 
ashish ppt webd.pptx
ashish ppt webd.pptxashish ppt webd.pptx
ashish ppt webd.pptx
 
Nt1310 Final Exam Questions And Answers
Nt1310 Final Exam Questions And AnswersNt1310 Final Exam Questions And Answers
Nt1310 Final Exam Questions And Answers
 
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issuesMaximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
 
MobileStore.pptx
MobileStore.pptxMobileStore.pptx
MobileStore.pptx
 
Web 1.02.03.0 Good.ppt
Web 1.02.03.0 Good.pptWeb 1.02.03.0 Good.ppt
Web 1.02.03.0 Good.ppt
 
Web2.0-IFF
Web2.0-IFFWeb2.0-IFF
Web2.0-IFF
 
Web2.0-IFF
Web2.0-IFFWeb2.0-IFF
Web2.0-IFF
 
Over view of Technologies
Over view of TechnologiesOver view of Technologies
Over view of Technologies
 
Web 2.0 Core Concepts, Applications, and Implications
Web 2.0 Core Concepts, Applications, and ImplicationsWeb 2.0 Core Concepts, Applications, and Implications
Web 2.0 Core Concepts, Applications, and Implications
 
Four Principles of Accessibility UK Version
Four Principles of Accessibility UK Version Four Principles of Accessibility UK Version
Four Principles of Accessibility UK Version
 
Introduction To Open Web Protocols
Introduction To Open Web ProtocolsIntroduction To Open Web Protocols
Introduction To Open Web Protocols
 
Day1
Day1Day1
Day1
 
Office 2010 cloud computing farhad_javidi
Office 2010 cloud computing farhad_javidiOffice 2010 cloud computing farhad_javidi
Office 2010 cloud computing farhad_javidi
 
E commerce p1 edit
E commerce p1 editE commerce p1 edit
E commerce p1 edit
 
Semantic Web, an introduction for bioscientists
Semantic Web, an introduction for bioscientistsSemantic Web, an introduction for bioscientists
Semantic Web, an introduction for bioscientists
 
Detail History of web 1.0 to 3.0
Detail History of web 1.0 to 3.0Detail History of web 1.0 to 3.0
Detail History of web 1.0 to 3.0
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
online blogging system
online blogging systemonline blogging system
online blogging system
 
WEB 2.0
WEB 2.0WEB 2.0
WEB 2.0
 

More from Indira Gnadhi National Open University (IGNOU)

More from Indira Gnadhi National Open University (IGNOU) (19)

Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16
 
Mcs 16 solved assignment 2015-16
Mcs 16 solved assignment 2015-16Mcs 16 solved assignment 2015-16
Mcs 16 solved assignment 2015-16
 
Mcs 014 solved assignment 2015-16
Mcs 014 solved assignment 2015-16Mcs 014 solved assignment 2015-16
Mcs 014 solved assignment 2015-16
 
Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16
 
Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
BCSL 058 solved assignment
 
BCSL 057 solved assignments
BCSL 057 solved assignmentsBCSL 057 solved assignments
BCSL 057 solved assignments
 
BCSL 056 solved assignment
BCSL 056 solved assignmentBCSL 056 solved assignment
BCSL 056 solved assignment
 
Bcs 055 solved 2014-15
Bcs 055 solved 2014-15Bcs 055 solved 2014-15
Bcs 055 solved 2014-15
 
Bcs 054 solved assignment
Bcs 054 solved assignmentBcs 054 solved assignment
Bcs 054 solved assignment
 
Bcs 052 solved assignment
Bcs 052 solved assignmentBcs 052 solved assignment
Bcs 052 solved assignment
 
Mcs 021 solve assignment
Mcs 021 solve assignmentMcs 021 solve assignment
Mcs 021 solve assignment
 
Bcsl 033 solve assignment
Bcsl 033 solve assignmentBcsl 033 solve assignment
Bcsl 033 solve assignment
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
2012 bcsl-021 solve assihnment
2012 bcsl-021 solve assihnment2012 bcsl-021 solve assihnment
2012 bcsl-021 solve assihnment
 
Bcsl 022 solved-assignment_2012-13
Bcsl 022 solved-assignment_2012-13Bcsl 022 solved-assignment_2012-13
Bcsl 022 solved-assignment_2012-13
 
Eco 02 question paper
Eco 02 question paperEco 02 question paper
Eco 02 question paper
 
Mcs 015 solve assignment
Mcs 015 solve assignmentMcs 015 solve assignment
Mcs 015 solve assignment
 
Mcs 013 solve assignment
Mcs 013 solve assignmentMcs 013 solve assignment
Mcs 013 solve assignment
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

Bcs 053 solved assignment 2014-15

  • 1. www.ignousolvedassignments.com Course Code: BCS – 053 Course Title: Web Programming Assignment Number: BCA(V) – 053Assign/14-15 Question 1: A) How are Web 2.0 technologies different than that of Web 1.0? Explain the use of Mashups in web. Also explain any four new tags of HTML5. Solution:- Difference between web 1.0 and web 2.0 The main difference between web 1.0 and web 2.0 is the interactive behavior of online or web communication. The web 1.0 platform is much plain and simple just for displaying or sharing the information over the internet or web platform. It is a one way communication metaphor where the ownership is more concerned rather taking the community based approach for sharing and creating information. Web 1.0 can be compared more likely to be a library where people can just view the information but cannot enhance the information by adding. The user experience for web 1.0 technology is much poor where some image and text are the primary things of any website. In the period of web 1.0 the primary communication channel for any web content was the email only where web 2.0 just changed the whole idea of interactivity. On the other hand web 2.0 is the form of data reading writing and execution over the web platform. User can add content to web site like reviewing any product on amazon’s product page. Communication for any web content is much easier like people can comment or express their feelings about any web content just under the content which is much more visible in the blogging or social networking platforms. User experience for web 2.0 is incredible. People can put anything they want into web sites they are not bound to some sort of images and texts. People can even put videos, interactive sessions like live video stream, audio stream. The whole thing about web 2.0 is rich user experience and services being offered through web platform and the two way communication between the user and the web contents. Web 1.0 was all about the browser but web 2.0 is not all about the browser there are something like web API which can deliver the whole web experience inside the desktop, mobile or any device application. Conclusion: From the very beginning of web technology, it has got many versions but primarily web 1.0 and web 2.0 are being focused based on some factors and criteria. Mainly web 2.0 is all about rich internet experience while web 1.0 is limited to information sharing. Use of Mashup: A mashup, in web development, is a web page, or web application, that uses content
  • 2. www.ignousolvedassignments.com from more than one source to create a single new service displayed in a single graphical interface. For example, you could combine the addresses and photographs of your library branches with a Google map to create a map mashup. The term implies easy, fast integration, frequently using open application programming interfaces (open API) and data sources to produce enriched results that were not necessarily the original reason for producing the raw source data. The term mashup originally comes from British – West Indies slang meaning to be intoxicated, or as a description for something or someone not functioning as intended. In recent English parlance it can refer to music, where people seamlessly combine audio from one song with the vocal track from another—thereby mashing them together to create something new. The main characteristics of a mashup are combination, visualization, and aggregation. It is important to make existing data more useful, for personal and professional use. To be able to permanently access the data of other services, mashups are generally client applications or hosted online. New HTML5 Tags: 1. <article> = Specifies an article 2. <hgroup> = Specifies a header for a section or page. NOTE: - This element has been dropped from W3C HTML5 spec but it is still included in WHATWG Living Standard. 3. <template> = Container for client-side content instantiated during runtime using JavaScript 4. <wbr> = Specifies a line break opportunity for very long words and strings of text with no spaces. B) Create a simple form that may be used for enrolling into IGNOU programs. The Form should have relevant drop down lists and other details. You must use CSS. Explain the advantages of using CSS. Solution:- Simple form for enrollment into IGNOU HTML <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head>
  • 3. www.ignousolvedassignments.com <link href=”style.css” type=”text/css” rel=”stylesheet” /> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>Application Form</title> </head> <body bgcolor=”#0099CC”> <style> table, td, th { border: 1px; } </style> <div id=”page”> <div id=”headerimg”><img src=”header2.png” /> </div> </div> <form id=”fom”> <table> <tr> <td><b> 1. Programme Code: <input type=”text” name=”firstname” ></td>
  • 4. www.ignousolvedassignments.com <td><b> 2. Enrollment No.(Only for office use): <input type=”text” name=”lastname”></td> </tr> <tr> <td><b> 3. Regional Center Code : <input type=”text” name=”regionalcentercode”></td> <td><b> 4. Study Center Code : <input type=”text” name=”studycentercode”></td> <td><b> 5. State Code : <input type=”text” name=”statecode” size=”10″></td> </tr> <tr> <td><b> 6. Medium Code :</b> <input type=”radio” name=”dob” size=”8″>English <input type=”radio” name=”dob” size=”8″>Hindi<br /> Others(If other please specify) : <br /><input type=”text” name=”c3other” size=”20″> </td> <td><b>7a. Are you already registered with IGNOU : </b> <input type=”radio” name=”dob” size=”8″>Yes <input type=”radio” name=”dob” size=”8″>No<br />
  • 5. www.ignousolvedassignments.com If yes write the Enrol. No. & Program Code in the boxes below<br/> Enrollment No. :<input type=”text” name=”enrlno.” size=”10″> Programme Code :<input type=”text” name=”progcode” size=”10″><br /> <td> <b> 8. Date of Birth :</b><input type=”date” name=”dob” size=”10″><br /> <b> 9. Nationality : </b><input type=”radio” name=”dob” size=”8″>Indian<br/> Others<br />(If other please specify) :<input type=”text” name=”dob” size=”8″> </td> </tr> <tr> <td><b> 10. Sex :</b><input type=”radio” name=”dob” size=”8″>Male <input type=”radio” name=”dob” size=”8″>Female</td> <td><b> 11. Category :</b><input type=”radio” name=”dob” size=”8″>GEN <input type=”radio” name=”dob” size=”8″>ST <input type=”radio” name=”dob” size=”8″>CS <input type=”radio” name=”dob” size=”8″>OBC<br /> (In case of OBC student, Please also indicate either)<br /> (i) Cramy Layer<input type=”radio” name=”dob” size=”8″ />
  • 6. www.ignousolvedassignments.com (ii) Non Cramy Layer<input type=”radio” name=”dob” size=”8″ /></td> <td><b> 12. Territory Code :</b><br /> <input type=”radio” name=”dob” size=”8″ />Urban <input type=”radio” name=”dob” size=”8″ />Rural <input type=”radio” name=”dob” size=”8″ />Tribal </td> </tr> <tr> <td><b> 13. Marital Status :</b><br /><input type=”radio” name=”dob”/>Married<input type=”radio” name=”dob”/>Unmarried</td> <td><b> 14. Religion:</b> <select> <option value=”volvo”>Hindu</option> <option value=”saab”>Muslim</option> <option value=”mercedes”>Christian</option> <option value=”audi”>Sihk</option> <option value=”volvo”>Parsi</option>
  • 7. www.ignousolvedassignments.com <option value=”saab”>Jain</option> <option value=”mercedes”>Buddhist</option> <option value=”audi”>Jews</option> <option value=”saab”>Others</option> </select> </td> <td><b> 15. Whether Minority :</b><br /> <input type=”radio” name=”dob”/>Yes <input type=”radio” name=”dob”/>No </td> </tr> <tr> <td><b>16. Social Status :</b><br /> <input type=”radio” name=”dob”/>Ex-serviceman <input type=”radio” name=”dob”/>War widow<br /> <input type=”radio” name=”dob”/>Not applicable </td>
  • 8. www.ignousolvedassignments.com <td><b>17. Whether Kashmiri Migrant:</b> Yes<input type=”radio” name=”dob”/>No<input type=”radio” name=”dob”/></td> <td></td> </tr> <tr> <td><b>18. Name of the Candidate</b><br /> First Name :<input type=”text” name=”fname” size=”15″ /><br /> Middle Name :<input type=”text” name=”mname” size=”15″ /><br /> Surename :<input type=”text” name=”sname” size=”15″ /><br /> </td> <td><b> 19. Father’s/Husband’s Name/Mother’s Name (Strick out whichever is not applicable)</b><br /> First Name :<input type=”text” name=”fname” size=”15″ /><br /> Middle Name :<input type=”text” name=”mname” size=”15″ /><br /> Surename :<input type=”text” name=”sname” size=”15″ /><br /> </td> </table>
  • 9. www.ignousolvedassignments.com <b> 20. Course Codes: M.Sc.(DFSM)/MTM/MLIS/MA(Edu)/MCA, MAPY, BLIS/ BA/ BCom/B.Sc./BSW/BTS/PGDDM/PGDMRR/CTE/PGDRD/PGDBP/PGDGPS/ GPDEMA/CAFE/ DCE & BPP (Students who are simultanously opting BPP along with DMT, DDT, DPVCPO, DVAPFV, DFPT and DWM)</b> <table> <tr> <td><b>(a) M.Sc. (DFSM) : </b><input type=”radio” name=”dob”/>CFN <input type=”radio” name=”dob”/>CNCC</td> </tr> <tr> <td><b>(b) MTM :</b> <input type=”radio” name=”dob”/>Category 1 <input type=”radio” name=”dob”/>Category 2</td> </tr> <tr> <td><b>(c) MLIS/MAPY (Optional Courses) :</b><input type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/></td> </tr> <tr>
  • 10. www.ignousolvedassignments.com <td><b> (d)BA/B.Sc./B.Com/BSW/BTS(Foundation Courses) :</b><input type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/> </td> </tr> <tr> <td> <b>(e) BA/B.Sc./B.Com (Elective Courses) :</b><input type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/> </td> </tr> <tr> <td><b>(f) MA (Edu)<br /> Specialised Area : </b> <input type=”checkbox” name=”hedu” />Higher Education <input type=”checkbox” name=”hedu” />Educational Technology <input type=”checkbox” name=”hedu” />Distance Education
  • 11. www.ignousolvedassignments.com <input type=”checkbox” name=”hedu” />Educational Management </td> </tr> <tr> <td> <b>(g) CTE/DTS/PGDRD PGDDM/PGDMRR(Optional Courses) :</b><input type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/><input type=”text” name=”dob” size=”15″/> </td> </tr> <tr> <td> <b>(h) CAFE/PGDBP(Optional Courses) :</b><input type=”text” name=”dob” size=”25″/><input type=”text” name=”dob” size=”25″/> </td> </tr> <tr> <td> <b>(i) DCE/PGDGPS/ PGDEMA/DUL(Optional Courses) :</b><input type=”text” name=”dob” size=”25″/><input type=”text” name=”dob” size=”20″/><input type=”text” name=”dob” size=”25″/>
  • 12. www.ignousolvedassignments.com </td> </tr> <tr> <td> <b>(j) BPP(Optional Courses) :</b><input type=”text” name=”dob” size=”25″/><input type=”text” name=”dob” size=”25″/> </td> </tr> <tr> <td> <b>(k) MCA : </b><input type=”checkbox” name=”dob” size=”10″/>CS-60 A1</td> </tr> <tr> <td> <b>21(a) Whether a person with disability:</b> <input id=”showme” type=”radio” name=”dob” size=”10″/>Yes <input id=”hideme” type=”radio” name=”dob” size=”10″/>No<br /> <p> <b>21(b) If Person with disability (nature of disability):</b> <input type=”checkbox” name=”dob” size=”10″/>Speech and Hearing Impairment <input type=”checkbox” name=”dob” size=”10″/>Low Vision
  • 13. www.ignousolvedassignments.com <input type=”checkbox” name=”dob” size=”10″/>Locomotor Impairment <input type=”checkbox” name=”dob” size=”10″/>Visual impairment <input type=”text” name=”dob” size=”10″/>Any other Please specify </p> </td> </tr> <tr> <td> <b>22. Employment Status:</b> <input type=”radio” name=”dob” size=”10″/>Unemployed <input type=”radio” name=”dob” size=”10″/>Employed <input type=”radio” name=”dob” size=”10″/>IGNOU Employee <input type=”radio” name=”dob” size=”10″/>KVS Employee </td> </tr> <tr> <td> <b>23. Details of Scholarship being received if any:<br /> (a) Annual Scholarship Amount: <input type=”text” name=”annual” size=”8″ />
  • 14. www.ignousolvedassignments.com (b) Family income (yearly): <input type=”text” name=”annual” size=”8″ /><br /> (c) Deptt. Offering Scholarship: </b><input type=”radio” name=”deptt.” />Govt. Diptt. <input type=”radio” name=”deptt.” />Others<br /> <b>(d) Below poverty line </b> <input type=”radio” name=”deptt.” />Yes <input type=”radio” name=”deptt.” />No<br /> <b>(e) In case of jail inmates</b> <input type=”radio” name=”deptt.” />Yes <input type=”radio” name=”deptt.” />No </td> </tr> <tr> <td> <b> 24. Relevant Qualifications: (Which makes you eligible for the programme)<br /> </b> (a) Qualification(Code)<input type=”text” name=”qualifictioncode” size=”5″> (b) Main Subjects<input type=”text” name=”qualifictioncode” size=”5″> (c) Year of passing
  • 15. www.ignousolvedassignments.com <select id=”year”></select> (d) Division <select> <option value=”first”>1st</option> <option value=”second”>2nd</option> <option value=”third”>3rd</option> <option value=”fourth”>4th</option> <option value=”pass”>PASS</option> </select><br /> (e) % of marks<input type=”text” name=”percent” size=”8″> (f) Board Code<input type=”text” name=”percentd” size=”8″> </td> </tr> <tr> <td> <b> 25. Details of Fees:<br /> </b> <input type=”radio” name=”cashhchallanofbank” />Cash Challan of Bank
  • 16. www.ignousolvedassignments.com <input type=”radio” name=”cashhchallanofbank” />Bank Draft </td> </tr> <tr> <td><b>26. Amount(Add Rs. 200/- in Case of Late fee)<input type=”text” name=”amount” size=”10″ /> DD/Challan No. <input type=”text” name=”amount” size=”15″ /> DD/Challan Date <input type=”date” name=”DD/date” /> <br /> Bank Name : <input type=”text” name=”amount” size=”125″ /> </b> </td> </tr> <tr> <td> <b>27. Address for Correspondence (Do not give Post Box No. Leave a blank between each unit of address like House No., Street Name, P.O., etc.)<input type=”text” name=”amount” size=”125″ /><br /></b> <b>State <select name=slist> <!– india all states –>
  • 17. www.ignousolvedassignments.com <script> var states = new Array(“Andaman and Nicobar Islands”, ”Andhra Pradesh”, ”Arunachal Pradesh”, ”Assam”, ”Bihar”, ”Chandigarh”, “Chhattisgarh”, ”Dadra and Nagar Haveli”, ”Daman and Diu”, ”Delhi”, ”Goa”, ”Gujarat”, ”Haryana”, ”Himachal Pradesh”, ”Jammu and Kashmir”, ”Jharkhand”, ”Karnataka”, ”Kerala”, ”Lakshadweep”, “Madhya Pradesh”, ”Maharashtra”, ”Manipur”, ”Meghalaya”, ”Mizoram”, ”Nagaland”, ”Orissa”, ”Po ndicherry”, ”Punjab”, ”Rajasthan”, ”Sikkim”, ”Tamil Nadu”, ”Tripura”, ”Uttaranchal”, ”Uttar Pradesh”, ”West Bengal”); for(var hi=0; hi<states.length; hi++) document.write(“<option value=”"+states[hi]+””>”+states[hi]+”</option>”); </script> </select> <b>City: <input type=”text” name=”amount” size=”15″ /> <b> District: <input type=”text” name=”amount” size=”15″ /> <b> Pin Code: <input type=”text” name=”amount” size=”15″ /> </td> </tr> <tr> <td>
  • 18. www.ignousolvedassignments.com <b>28. Landline Telephone Number (if any) with STD Code: <input type=”text” name=”landlineno” size=”20″ /> 29. Fax No. (if any) with STD Code: <input type=”text” name=”faxno” size=”20″ /><br /> 30. Mobile Number (if any): <input type=”text” name=”mobileno” size=”20″ /> 31. E-mail address/ID (if any): <input type=”text” name=”email” size=”50″ /> </td> </tr> <tr> <td height=”11″ valign=”middle” bgcolor=”#FFFFFF” class=”text”>&nbsp;</td> <td height=”11″ valign=”middle” bgcolor=”#FFFFFF”>&nbsp;</td> <td height=”11″ colspan=”5″ valign=”top” nowrap=”" bgcolor=”#F3F3F3″ class=”helpText”>& nbsp;</td> </tr> <tr> <td height=”11″ valign=”middle” bgcolor=”#FFFFFF” class=”text”>&nbsp;</td> <td height=”11″ valign=”middle” bgcolor=”#FFFFFF”>&nbsp;</td>
  • 19. www.ignousolvedassignments.com <td height=”11″ colspan=”5″ valign=”top” nowrap=”" bgcolor=”#F3F3F3″ class=”helpText”>& nbsp;</td> </tr> <tr><td> <div align=”center”><span><font color=”red”> <input name=”Submit” type=”submit” class=”FormGOButton” id=”continue” value=”Save and Continue” onclick=”document.pressed=this.value”> <font color=”red”> <input name=”Submit” type=”submit” class=”FormGOButton” id=”exit” value=”Temporary Exit” onclick=”document.pressed=this.value” title=”Save and Register Later”> </font> </font></span> </div> </td> </tr> <tr> <td height=”15″ colspan=”7″ valign=”middle” class=”text” background=”heading.gif”>&nbsp; </td> </tr> </table> </form>
  • 20. www.ignousolvedassignments.com <div id=”footer”>Powered by Nise Computers 2014</div> <script src= "http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script> <script> <!-- Years functions --> var start = 1950; var end = new Date().getFullYear(); var options = ""; for(var year = start ; year <=end; year++){ options += "<option>"+ year +"</option>"; } document.getElementById("year").innerHTML = options; <!-- showme hideme radio function --> $(document).ready(function(){ $("#hideme").click(function(){ $("p").hide(); }); $("#showme").click(function(){ $("p").show(); }); }); </script> </body> </html> Style CSS @charset "utf-8"; /* CSS Document */ #page { width: 1024px; background-color:#CCCCCC; margin-left: auto; margin-right: auto;
  • 21. www.ignousolvedassignments.com margin-top: 5px; padding-top: 10px; padding-bottom: 10px; box-shadow: 0px 0px 20px 3px #d3d3d3; border-radius: 4px; background-color: #FFFFFF; } #fom { background-color: #FFFFFF; width: 1024px; margin-left: auto; margin-right: auto; box-shadow: 0px 0px 20px 3px #d3d3d3; border-radius: 4px; /*margin-top: 10px; padding-top: 10px; */ }
  • 22. www.ignousolvedassignments.com #footer { border: 1px groove #aaaaaa; /* clear: both; background: blue; color: White; padding: 0; */ background-color: #FFFFFF; width: 1024px; margin-left: auto; margin-right: auto; box-shadow: 0px 0px 20px 3px #d3d3d3; border-radius: 4px; text-align: center; /* vertical-align: middle; line-height: normal; margin: 0; position: fixed; bottom: 0px; width: 100%; */ } Advantages of CSS:- CSS stands for “Cascading Style Sheets“. A single CSS file can contain positioning, layout, font, colors and style information for an entire web site. The file can be referenced by each html file on the site. Following are Advantages of CSS:- Making changes to the layout CSS makes it very easy to change the style of a document. Let’s say we wanted to move the picture in the title of this page to the right by 10 pixels. This would be a nightmare in a table based design. We would have to open every page and alter the
  • 23. www.ignousolvedassignments.com table width manually.Fortunately we have used CSS, and all we have to do is open our CSS file which stores the layout of the site, and change the number relating to the position of the image. That will change his position throughout the whole site. The look and layout of a site can be changed beyond recognition just by altering the CSS file. This makes CSS indispensable for large web sites. File Size Probably the mostly useful feature of CSS is that all of the style and layout is removed from the html, so the html page size is very much smaller. The CSS file is downloaded just once by the visitor’s browser and re-used for different pages on a web site. This reduces the bandwidth requirements for your server and also ensures a faster download for your visitors. Search Engines A search engine robot will normally consider the content in the start of your html code is more important than the text towards the end of the code. For a table based page the contents of the navigation bar will normally show up as the page description in search engine results. With a CSS page the navigation can be moved to the bottom of the source code, so the search engine displays your content instead of your navigation. Accessibility Separating style from content makes life very easy for visitors who prefer to view only the content of a web page, or to modify the content. These could be blind or partially sighted people who might use a screen reader to interpret a page. Consistency Layout and position of navigation can be completely consistent across a site. This was previously possible only using frames. C) What are the uses of XML technology? Create at least five instances of your teachers Data using XML. The list may contain name of teacher, her/his qualifications (Starting from graduation degree) and date of joining the school. Each teacher should be assigned an ID as an attribute, and a phone number which should have residence Or mobile as attribute. Also create the DTD for the XML document you have Created. Solution: -
  • 24. www.ignousolvedassignments.com Uses of XML Technology: The Extensible Markup Language (XML) is a simple text-based format for representing structured information: documents, data, configuration, books, transactions, invoices, and much more. It was derived from an older standard format called SGML (ISO 8879), in order to be more suitable for Web use. XML is one of the most widely-used formats for sharing structured information today: between programs, between people, between computers and people, both locally and across networks. A short example: <part number="1976"> <name>Windscreen Wiper</name> <description>The Windscreen wiper automatically removes rain from your windscreen, if it should happen to splash there. It has a rubber <ref part="1977">blade</ref> which can be ordered separately if you need to replace it. </description> </part> If you are already familiar with HTML, you can see that XML is very similar. However, the syntax rules of XML are strict: XML tools will not process files that contain errors, but instead will give you error messages so that you fix them. This means that almost all XML documents can be processed reliably by computer software.
  • 25. www.ignousolvedassignments.com Teacher Data using XML: <?xml version="1.0"?> <CATALOG> <TDATA> <NAME>Monika Shrama</NAME> <Teacher_ID>0011</Teacher_ID> <Qualifications>BCA,MCA</Qualifications> <Joining_date>15/05/2009</Joining_date> <Contacts>+912653261425</Contacts> </TDATA> <TDATA> <NAME>Sruthi Shah</NAME> <Teacher_ID>0021</Teacher_ID> <Qualifications>B.Tech, M.Tech</Qualifications> <Joining_date>25/07/2008</Joining_date> <Contacts>+919865236555</Contacts> </TDATA> <TDATA> <NAME>Deepika Verma</NAME>
  • 26. www.ignousolvedassignments.com <Teacher_ID>0013</Teacher_ID> <Qualifications>BBA, MBA</Qualifications> <Joining_date>07/11/2011</Joining_date> <Contacts>+919862351426</Contacts> </TDATA> <TDATA> <NAME>Swetha Kumari</NAME> <Teacher_ID>0023</Teacher_ID> <Qualifications>BBA, MBA</Qualifications> <Joining_date>29/08/2012</Joining_date> <Contacts>+918844552211</Contacts> </TDATA> <TDATA> <NAME>Anil Kumar</NAME> <Teacher_ID>0039</Teacher_ID> <Qualifications>Bsc, Msc</Qualifications> <Joining_date>11/11/2013</Joining_date> <Contacts>+917894561235</Contacts> </TDATA>
  • 27. www.ignousolvedassignments.com </CATALOG> DTD for Teacher Data XML file <!DOCTYPE CATALOG [ <!ELEMENT CATALOG (TDADA*) <!ELEMENT TDADA (NAME,Teacher_ID,Qualifications, Joining_date,Contacts,)> <!ELEMENT NAME (#PCDATA)> <!ELEMENT Teacher_ID (#PCDATA)> <!ELEMENT Qualifications (#PCDATA)> <!ELEMENT Joining_date (#PCDATA)> <!ELEMENT Contacts (#PCDATA)> ]> This DTD defines that wherever the CATALOG element is used in the XML code, it should consist of one or more TDATA elements. Likewise, whenever the TDATA element is used, it should include the NAME, Teacher_ID, Qualifications, Joining_date, and Contacts elements. D) Explain the commands of JavaScript that can be used to modify a HTML Document. Explain how events are handled using JavaScript. Write a program using JavaScript that changes the text WELCOME to lower case and then again to upper case. This cycle of conversion is performed after every 10 seconds. Solution: - JavaScript Event Handlers: Actions by page users trigger event handler commands in the JavaScript. The program will then perform whatever commands are assigned to the event. Common event handlers are listed in the following table.
  • 28. www.ignousolvedassignments.com Event Handler Action onAbort The user stopped loading a page onBlur The user moves from an object onChange The user changed an object onClick The user mouse-clicked an object onError An error occurred in the script onFocus The user activates an object onLoad The object has been loaded onMouseover The cursor has moved over the object onMouseout The cursor has moved off the object onSelect The user selected the object onSubmit The user submitted a form onUnload The user leaves the window JavaScript LowerCase to Uppercase Program
  • 29. www.ignousolvedassignments.com <!DOCTYPE html> <html> <body> <p> WELLCOME..</p><br> <span id="countdown" class="timer"></span> <p id="demo"></p> <script> function myFunction() { var str = "WELLCOME.."; var res = str.toLowerCase(); document.getElementById("demo").innerHTML = res; } var seconds = 10; { function secondPassed() { var minutes = Math.round((seconds - 30)/60); var remainingSeconds = seconds % 60; if (remainingSeconds < 10) {
  • 30. www.ignousolvedassignments.com remainingSeconds = "0" + remainingSeconds; } document.getElementById('countdown').innerHTML = minutes + ":" + remainingSeconds; if (seconds == 0) { clearInterval(countdownTimer); document.getElementById('countdown').innerHTML = myFunction(); } else { seconds--; } } } var countdownTimer = setInterval('secondPassed()', 100); </script> </body> </html> The above program will first show the WELCOME text in Uppercase, then the 10 seconds countdown timer will start when 10 seconds finished the welcome text will change in Lowercase as “welcome” this is simple program you can try it by yourself. E) List 4 tags that are used in WML. Create a simple WML program which should include a text paragraph, a table, an image and any two WML input elements. Solution: - List of tags that are used in WML 1. <wml:cancel/> Renders a WML <postfield> element with a value of cancel. This tag is only valid when nested inside a form tag body. Posting this element causes the Action servlet to bypass calling the associated form bean validate() method.
  • 31. www.ignousolvedassignments.com 2. <wml:card/> This tag renders a card element. This element is not rendered when the tag is executed in WebSphere Portal. This allows writing JSPs that can be used in both the servlet and portlet environments. 3. <wml:errors/> Retrieves the set of error messages from the request object with the default key of Action.ERROR_KEY or the value specified by attribute name. If ActionErrors are found then the errors are displayed. This tag also requires the following two message keys in the application scope MessageResources.  errors.header – header that is displayed before the error messages list.  errors.footer – header that is displayed after the error messages list. 4. <wml:form/> This tag does not render any markup, but it is used to scope beans and transactions. The tags used with the body of the form tag can use the form bean to populate the input fields. Simple WML Program Example: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd"> <wml> <card> <p> This is Image. <img src="welcome.wbmp" alt="Image"/> <img src="friend.wbmp" alt="Image"/> <img src="smile.wbmp" alt="Image"/><br/>
  • 32. www.ignousolvedassignments.com Enter Following Information:<br/> Name : <input name="name" size="12"/><br/> Roll no. : <input name="age" size="12" format="*N"/><br/> Class : <input name="sex" size="12"/> <br/> <select> <optgroup title="India"> <option value="delhi">Delhi</option> <option value="mumbai">Mumbai</option> <option value="hyderabad">Hyderabad</option> </optgroup> </select> <table columns="3" align="LCR"> <tr> <td>Col 1</td> <td>Col 2</td> <td>Col 3</td> </tr> <tr> <td>A</td>
  • 34. www.ignousolvedassignments.com The above program is built in Adobe Dreamweaver under WML page type. Question 2: A) Differentiate between 2-tier and 3-tier architectures. Explain any two HTTP methods with the help of an example each. Also explain the concept of web container with the help of an example. Solution: - Difference between 2-tier & 3- tier architecture: Design Consideration Description Security The topic of security is a tough one because arguments can be made either way for 2 vs. 3-tiers. In my experience, the 3-tier architecture has the potential for better security, but if great care isn’t taken during development it frequently ends up less secure. With a 2-tier approach, the application authenticates to and communicates directly to the database, which simplifies the attack surface area and is one less boundary to be concerned about. Depending on the details of the application server, there could be, for example, many complex REST APIs that could each have their own attack weaknesses. This one topic could be covered in a book, so
  • 35. www.ignousolvedassignments.com I’m simply calling this one in favor of 2-tier even though direct access to the data sounds unsafe. Cost 2-tier applications are generally easier to build and because of their lower complexity are less expensive all around. Ease of maintenance Although part of cost consideration, ease of maintenance is worth analyzing separately. Keeping the client up to date in a 2-tier architecture can be a trouble point that is not an issue with most 3-tier designs. However, in a 3-tiered architecture, keeping the application tier up to date is much more difficult in the long run. For example, sometimes security patches required to keep the application tier secure are not compatible with your code and require you to make code changes, which can be extensive. Performance Performance in a 2-tiered architecture is more sensitive to the hardware the client is running on, as well as the speed of the network connection. Deployment In a 3-tiered architecture, typically users point their browsers to the application server to start using the application. However, the setup of that environment can be considerably more complex than setting up a database for the users to connect to and making the installer for the client available.
  • 36. www.ignousolvedassignments.com HTTP Methods: 1) GET Method A GET request retrieves data from a web server by specifying parameters in the URL portion of the request. This is the main method used for document retrieval. Following is a simple example which makes use of GET method to fetch hello.htm: GET /hello.htm HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT) Host: www.tutorialspoint.com Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive 2) POST Method The POST method is used when you want to send some data to the server, for example file update, form data etc. Following is a simple example which makes use of POST method to send a form data to the server which will be processed by a process.cgi and finally a response will be returned: POST /cgi-bin/process.cgi HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
  • 37. www.ignousolvedassignments.com Host: www.tutorialspoint.com Content-Type: text/xml; charset=utf-8 Content-Length: 88 Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://clearforest.com/">string</string> Web container: A Web container is a runtime environment for Web applications. It processes servlets, JSP files, and other types of server-side components. Each application server runtime has one logical Web container, which can be modified but not created or removed. Each Web container provides:  Web container transport chains The Web container inbound transport chain handles requests. It consists of a TCP inbound channel that provides the connection to the network, an HTTP inbound channel that serves HTTP 1.0 and 1.1 requests, and a Web container channel that sends requests for servlets and JSPs to the Web container for processing.  Servlet processing when it handles servlets, a Web container creates a request object and a response object and then invokes the servlet service method. The Web container also invokes the servlet destroy method when appropriate and unloads the servlet, after which the JVM™ performs garbage collection.  HTML and other static content processing Requests for HTML and other static content that are directed to the Web container are served by the Web container inbound chain. However, in most cases, using an external Web server and a Web server plug-in as a Web container interface is more appropriate for a production environment.
  • 38. www.ignousolvedassignments.com  Session management The Web container provides support for the javax.servlet.http.HttpSession interface as described in the API specification for the servlet. Figure 1 illustrates the Web container and its place in the application server. B) Explain the JSP life cycle with the help of a diagram. Explain the action elements of JSP with the help of an example each. Solution: - The key to understanding the low-level functionality of JSP is to understand the simple life cycle they follow. A JSP life cycle can be defined as the entire process from its creation till the destruction which is similar to a servlet life cycle with an additional step which is required to compile a JSP into servlet. The following are the paths followed by a JSP
  • 39. www.ignousolvedassignments.com  Compilation  Initialization  Execution  Cleanup The four major phases of JSP life cycle are very similar to Servlet Life Cycle and they are as follows: JSP Action elements:- The <jsp:include> Action: This action lets you insert files into the page being generated. The syntax looks like this: Example: Let us define following two files (a)date.jps and (b) main.jsp as follows: Following is the content of date.jsp file: <p> Today's date: <%= (new java.util.Date()).toLocaleString()%> </p> Here is the content of main.jsp file: <html> <head> <title>The include Action Example</title> </head>
  • 40. www.ignousolvedassignments.com <body> <center> <h2>The include action Example</h2> <jsp:include page="date.jsp" flush="true" /> </center> </body> </html> Now let us keep all these files in root directory and try to access main.jsp. This would display result something like this: The include action Example Today's date: 12-Sep-2010 14:54:22 The <jsp:useBean> Action: The useBean action is quite versatile. It first searches for an existing object utilizing the id and scope variables. If an object is not found, it then tries to create the specified object. The simplest way to load a bean is as follows: <jsp:useBean id="name" /> The <jsp:setProperty> Action: The setProperty action sets the properties of a Bean. The Bean must have been previously defined before this action. There are two basic ways to use the setProperty action: You can use jsp:setProperty after, but outside of, a jsp:useBean element, as below: <jsp:useBean id="myName" ... /> ... <jsp:setProperty name="myName" property="someProperty" .../> In this case, the jsp:setProperty is executed regardless of whether a new bean was instantiated or an existing bean was found. A second context in which jsp:setProperty can appear is inside the body of a jsp:useBean element, as below: <jsp:useBean id="myName" ... >
  • 41. www.ignousolvedassignments.com ... <jsp:setProperty name="myName" property="someProperty" .../> </jsp:useBean> The <jsp:getProperty> Action: The getProperty action is used to retrieve the value of a given property and converts it to a string, and finally inserts it into the output. The getProperty action has only two attributes, both of which are required ans simple syntax is as follows: <jsp:useBean id="myName" ... /> ... <jsp:getProperty name="myName" property="someProperty" .../> Example: Let us define a test bean which we will use in our example: /* File: TestBean.java */ package action; public class TestBean { private String message = "No message specified"; public String getMessage() { return(message); } public void setMessage(String message) { this.message = message;
  • 42. www.ignousolvedassignments.com } } Compile above code to generated TestBean.class file and make sure that you copied TestBean.class in C:apache-tomcat-7.0.2webappsWEB-INFclassesaction folder and CLASSPATH variable should also be set to this folder: Now use the following code in main.jsp file which loads the bean and sets/gets a simple String parameter: <html> <head> <title>Using JavaBeans in JSP</title> </head> <body> <center> <h2>Using JavaBeans in JSP</h2> <jsp:useBean id="test" class="action.TestBean" /> <jsp:setProperty name="test" property="message" value="Hello JSP..." /> <p>Got message....</p> <jsp:getProperty name="test" property="message" /> </center> </body> </html> Now try to access main.jsp, it would display following result: Using JavaBeans in JSP Got message.... Hello JSP... The <jsp:forward> Action: The forward action terminates the action of the current page and forwards the request to another resource such as a static page, another JSP page, or a Java Servlet. The simple syntax of this action is as follows: <jsp:forward page="Relative URL" /> Example:
  • 43. www.ignousolvedassignments.com Let us reuse following two files (a) date.jps and (b) main.jsp as follows: Following is the content of date.jsp file: <p> Today's date: <%= (new java.util.Date()).toLocaleString()%> </p> Here is the content of main.jsp file: <html> <head> <title>The include Action Example</title> </head> <body> <center> <h2>The include action Example</h2> <jsp:forward page="date.jsp" /> </center> </body> </html> Now let us keep all these files in root directory and try to access main.jsp. This would display result something like as below. Here it discarded content from main page and displayed content from forwarded page only. Today's date: 12-Sep-2010 14:54:22 The <jsp:plugin> Action: The plugin action is used to insert Java components into a JSP page. It determines the type of browser and inserts the <object> or <embed> tags as needed. If the needed plugin is not present, it downloads the plugin and then executes the Java component. The Java component can be either an Applet or a JavaBean. The plugin action has several attributes that correspond to common HTML tags used to format Java components. The <param> element can also be used to send parameters to the Applet or Bean. Following is the typical syntax of using plugin action:
  • 44. www.ignousolvedassignments.com <jsp:plugin type="applet" codebase="dirname" code="MyApplet.class" width="60" height="80"> <jsp:param name="fontcolor" value="red" /> <jsp:param name="background" value="black" /> <jsp:fallback> Unable to initialize Java Plugin </jsp:fallback> </jsp:plugin> The <jsp:element> Action, The <jsp:attribute> Action, The <jsp:body> Action The <jsp:element>, lt;jsp:attribute> and <jsp:body> actions are used to define XML elements dynamically. The word dynamically is important, because it means that the XML elements can be generated at request time rather than statically at compile time. Following is a simple example to define XML elements dynamically: <@page language="java" contentType="text/html"%> <html xmlns="http://www.w3c.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page"> <head> <title>Generate XML Element</title> </head> <body> <jsp:element name="xmlElement"> <jsp:attribute name="xmlElementAttr"> Value for the attribute </jsp:attribute> <jsp:body> Body for XML element </jsp:body> </jsp:element> </body> </html> This would produce following HTML code at run time:
  • 45. www.ignousolvedassignments.com <html xmlns="http://www.w3c.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page"> <head><title>Generate XML Element</title></head> <body> <xmlElement xmlElementAttr="Value for the attribute"> Body for XML element </xmlElement> </body> </html> The <jsp:text> Action: The <jsp:text> action can be used to write template text in JSP pages and documents. Following is the simple syntax for this action: <jsp:text>Template data</jsp:text> The body fo the template cannot contain other elements; it can only contain text and EL expressions ( Note:- EL expressions are explained in subsequent chapter). Note that in XML files, you cannot use expressions such as ${whatever > 0}, because the greater than signs are illegal. Instead, use the gt form, such as ${whatever gt 0} or an alternative is to embed the value in a CDATA section. <jsp:text><![CDATA[<br>]]></jsp:text> If you need to include a DOCTYPE declaration, for instance for XHTML, you must also use the <jsp:text> element as follows: <jsp:text><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">]]> </jsp:text> <head><title>jsp:text action</title></head> <body>
  • 46. www.ignousolvedassignments.com <books><book><jsp:text> Welcome to JSP Programming </jsp:text></book></books> </body> </html> Try above example with and without <jsp:text> action. C) What is the need of a session in a JSP based website? Explain the URL rewriting, and use of Hidden Objects in the context of session management with the help of examples. List any two methods of session objects and explain each one of them with the help of an example each. Solution:- JSP Sessions:- On a typical web site, a visitor might visit several pages and perform several interactions. If you are programming the site, it is very helpful to be able to associate some data with each visitor. For this purpose, “session“s can be used in JSP. A session is an object associated with a visitor. Data can be put in the session and retrieved from it, much like a Hashtable. A different set of data is kept for each visitor to the site. Here is a set of pages that put a user’s name in the session, and display it elsewhere. First we have a form, let us call it GetName.html <HTML> <BODY> <FORM METHOD=POST ACTION="SaveName.jsp"> What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20> <P><INPUT TYPE=SUBMIT> </FORM> </BODY> </HTML> The target of the form is “SaveName.jsp”, which saves the user’s name in the session. Note the variable “session“. This is another variable that is normally made available in JSPs, just like out and request variables. (In the @page directive, you can indicate that you do not need sessions, in which case the “session” variable will not be made available.)
  • 47. www.ignousolvedassignments.com <% String name = request.getParameter( "username" ); session.setAttribute( "theName", name ); %> <HTML> <BODY> <A HREF="NextPage.jsp">Continue</A> </BODY> </HTML> The SaveName.jsp saves the user’s name in the session, and puts a link to another page, NextPage.jsp. NextPage.jsp shows how to retrieve the saved name. <HTML> <BODY> Hello, <%= session.getAttribute( "theName" ) %> </BODY> </HTML> If you bring up two different browsers (not different windows of the same browser), or run two browsers from two different machines, you can put one name in one browser and another name in another browser, and both names will be kept track of. The session is kept around until a timeout period. Then it is assumed the user is no longer visiting the site, and the session is discarded.
  • 48. www.ignousolvedassignments.com What Is URL Rewriting? If you were writing a letter to your bank, you would probably open your word processor and create a file named something like lettertobank.doc. The file might sit in your Documents directory, with a full path likeC:WindowsusersjulieDocumentslettertobank.doc. One file path = one document. Similarly, if you were creating a banking website, you might create a page named page1.html, upload it, and then point your browser tohttp://www.mybanksite.com/page1.html. One URL = one resource. In this case, the resource is a physical Web page, but it could be a page or product drawn from a CMS. URL rewriting changes all that. It allows you to completely separate the URL from the resource. With URL rewriting, you could have http://www.mybanksite.com/aboutus.html taking the user to …/page1.html or to …/about-us/ or to …/about-this-website-and-me/ or to …/youll-never-find-out-about-me- hahaha-Xy2834/. Or to all of these. It’s a bit like shortcuts or symbolic links on your hard drive. One URL = one way to find a resource. With URL rewriting, the URL and the resource that it leads to can be completely independent of each other. In practice, they’re usually not wholly independent: the URL usually contains some code or number or name that enables the CMS to look up the resource. But in theory, this is what URL rewriting provides: a complete separation. For More Ignou Solved Assignments Please Visit - www.ignousolvedassignments.com Connect on Facebook : http://www.facebook.com/pages/IgnouSolvedAssignmentscom/346544145433550 Subscribe and Get Solved Assignments Direct to your Inbox : http://feedburner.google.com/fb/a/mailverify?uri=ignousolvedassignments_com