Class: TE Computer Subject: Web Technology 2017-18 SEM II .

3y ago
103 Views
2 Downloads
805.63 KB
9 Pages
Last View : Today
Last Download : 3m ago
Upload by : Esmeralda Toy
Transcription

Class: TE ComputerSubject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper SolutionQ1a) Define the terms [5]Ans:1. Website: A website is a collection of related web pages, including multimedia content, typicallyidentified with a common domain name, and published on at least one web server. A website may beaccessible via a public Internet Protocol (IP) network, such as the Internet, or a private local areanetwork (LAN)2. Web Page: A web page or web page is a document commonly written in HyperText Markup Language(HTML) that is accessible through the Internet or other network using an Internet browser. A webpage is accessed by entering a URL address and may contain text, graphics, and hyperlinks to otherweb pages and files. The page you are reading now is an example of a web page.3. Web Server: Web server is a computer where the web content is stored. Basically web server is used tohost the web sites. A Web server is a program that uses HTTP (Hypertext Transfer Protocol) to servethe files that form Web pages to users, in response to their requests, which are forwarded by theircomputers' HTTP clients.4. URL: A URL (Uniform Resource Locator), as the name suggests, provides a way to locate a resource onthe web, the hypertext system that operates over the internet. The URL contains the name of theprotocol to be used to access the resource and a resource name. The first part of a URL identifies whatprotocol to use. The second part identifies the IP address or domain name where the resource islocated.5. Home Page: A home page or a start page is the initial or main web page of a website or a browser.Q1 b) Explain difference between Internal and External DTD. [5]Internal DTDYou can write rules inside XML document usingdeclaration. Scope of this DTD within thisdocument.Advantages is document validated by itselfwithout external reference.External DTDYou can write rules in a separate file (with .dtdextension). later this file linked to a XMLdocumentThis way you can linked several XML documentsrefer same DTD rules.Example: ?xmlversion ”1.0″standalone ”yes”? !DOCTYPE courses [ !ELEMENT courses (course) !ELEMENT course (date,url) !ELEMENT date (#PCDATA) !ELEMENT url (#PCDATA) ] courses course name XML Course /name url http://www.teach.com/xml/course /url /course course name Java Course /name url http://www.teach.com/java/course /url /course /courses ?xml version ”1.0″ standalone ”no”? !DOCTYPE courses SYSTEM “courses.dtd” courses course name XML Course /name url http://www.teach.com/xml/course /url /course course name Java Course /name url http://www.teach.com/java/course /url /course /courses “courses.dtd” file is the following. !ELEMENT courses (course) !ELEMENT course (date,url) !ELEMENT date (#PCDATA)

Class: TE ComputerSubject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper Solution !ELEMENT url (#PCDATA) Q2a) what are XML Schemas? How are they better that DTD. [5]Ans:DTD, or Document Type Definition, and XML Schema, which is also known as XSD, are two ways of describingthe structure and content of an XML document. DTD is the older of the two, and as such, it has limitations thatXML Schema has tried to improve.Reasons about why XSD are better than DTD:1. XML Schema is namespace aware, while DTD is not.2. XML Schemas are written in XML, while DTDs are not.3. XML Schema is strongly typed, while DTD is not.4. XML Schema has a wealth of derived and built-in data types that are not available in DTD.5. XML Schema does not allow inline definitions, while DTD does.Q2b) List and describe any five HTML tags. [5]Ans:Basic HTMLTag !DOCTYPE html head title body h1 to h6 p br hr !--.-- DescriptionDefines the document typeDefines an HTML documentDefines information about the documentDefines a title for the documentDefines the document's bodyDefines HTML headingsDefines a paragraphInserts a single line breakDefines a thematic change in the contentDefines a commentForms and InputTagDescription form Defines an HTML form for user input input Defines an input control textarea Defines a multiline input control (text area) button Defines a clickable button select Defines a drop-down listFramesTag frame DescriptionNotsupportedDefines a window (a frame) in a framesetinHTML5.

Class: TE Computer frameset ImagesTag img area Subject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper SolutionNotsupportedDefines a set of framesinHTML5.DescriptionDefines an imageDefines an area inside an image-mapListsTag ul ol li dl dt dd DescriptionDefines an unordered listDefines an ordered listDefines a list itemDefines a description listDefines a term/name in a description listDefines a description of a term/name in a description listQ3a) Explain difference between JavaScript and JQuery. [5]Ans: jQuery is a framework that lets you write JavaScript quicker and easier. The developers of jQuery created it to condense common JavaScript tasks into fewer lines of code. You can code most common JavaScript actions using jQuery (and you can actually check out their APIpage for a complete list of what you can do) It’s easy to install and get the code to understand jQuery. Remember that the biggest difference between jQuery and JavaScript is that jQuery has beenoptimized to work with a variety of browsers automatically. Unfortunately, JavaScript still has someissues with cross-browser compatibility due to poor JavaScript implementation practices on the partof web browser developers. Example: is designed to change the background color of a body tag using jQuery and JavaScriptrespectively:jQuery (‘body’) .css (‘background’, ‘#ccc’);JavaScriptFunction changeBachground(color) {Document.body.style.background color;}Onload ”changeBackground (‘red’);”jQuery code is much simpler and smaller as complared to JavaScriptQ3b) Write a HTML page and also provide a JavaScript for accepting a user ID and Passwordfrom the user to ensure the input is not empty. [5]Ans: html head script

Class: TE ComputerSubject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper SolutionFunction check(){Var a document.f1.t1.value;Var b document.f1.t2.value;If(a ‘ ‘ b ‘ ‘){Alert (“Kindly enter data for username and password”); }Else{Alert (“Thank you for entering username and password”); } } /script /head body form name ”f1” Username: input type ”text” name ”t1”required Password input type ”password” name ”t2” required input type ”button” value ”Login” onclick ”check()” /form /body /html Q4a) What is the purpose of DOM node tree? Draw node tree for simple HTMl page. [5]Ans:The HTML DOM views a HTML document as a tree-structure. The tree structure is called a node-tree.All nodes can be accessed through the tree. Their contents can be modified or deleted, and new elements canbe created.The node tree below shows the set of nodes, and the connections between them. The tree starts at the rootnode and branches out to the text nodes at the lowest level of the tree:Node Parents, Children, and SiblingsThe nodes in the node tree have a hierarchical relationship to each other.The terms parent, child, and sibling are used to describe the relationships. Parent nodes have children.Children on the same level are called siblings (brothers or sisters).

Class: TE Computer Subject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper SolutionIn a node tree, the top node is called the rootEvery node, except the root, has exactly one parent nodeA node can have any number of childrenA leaf is a node with no childrenSiblings are nodes with the same parentLook at the following HTML fragment: html head title DOM Tutorial /title /head body h1 DOM Lesson one /h1 p Hello world! /p /body /html In the HTML above, every node except for the document node has a parent node: The html node has no parent node; the root nodeThe parent node of the head and body nodes is the html nodeThe parent node of the "Hello world!" text node is the p nodeMost element nodes have child nodes: The html node has two child nodes; head and body The head node has one child node; the title nodeThe title node also has one child node; the text node "DOM Tutorial"The h1 and p nodes are siblings, and both child nodes of body Q4 b) List and brief any five functions in JavaScript. [5]Ans:1. Popping- The pop() method removes the last element from an array:Examplevar fruits ["Banana", "Orange", "Apple", "Mango"];fruits.pop();// Removes the last element ("Mango") from fruits2. Pushing- The push() method adds a new element to an array (at the end):Examplevar fruits ["Banana", "Orange", "Apple", "Mango"];fruits.push("Kiwi");// Adds a new element ("Kiwi") to fruits

Class: TE ComputerSubject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper Solution3. Sorting an Array-The sort() method sorts an array alphabetically:Examplevar fruits ["Banana", "Orange", "Apple", "Mango"];fruits.sort();// Sorts the elements of fruits4. The slice() Method- slice() extracts a part of a string and returns the extracted part in a newstring.The method takes 2 parameters: the starting index (position), and the ending index (position).This example slices out a portion of a string from position 7 to position 13:Examplevar str "Apple, Banana, Kiwi";var res str.slice(7, 13); // returns Banana5. Math.round()- Math.round(x) returns the value of x rounded to its nearest integer:ExampleMath.round(4.7); // returns 56. Math.pow()-Math.pow(x, y) returns the value of x to the power of y:ExampleMath.pow(8, 2);// returns 64Q5a)Write advantages of JSP over servlets? Also explain life cycle of a JSP. [5]Ans:Advantage of JSP over Servlet 1) Extension to Servlet JSP technology is the extension to servlet technology. We can use all the features of servlet in JSP. Inaddition to, we can use implicit objects, predefined tags, expression language and Custom tags in JSP,that makes JSP development easy. 2) Easy to maintain JSP can be easily managed because we can easily separate our business logic with presentation logic.In servlet technology, we mix our business logic with the presentation logic. 3) Fast Development: No need to recompile and redeploy If JSP page is modified, we don't need to recompile and redeploy the project. The servlet code needs tobe updated and recompiled if we have to change the look and feel of the application. 4) Less code than Servlet In JSP, we can use a lot of tags such as action tags, jstl, custom tags etc. that reduces the code.Moreover, we can use EL, implicit objects etc.Life cycle of a JSP Page The JSP pages follows these phases: Translation of JSP Page Compilation of JSP Page Classloading (class file is loaded by the classloader) Instantiation (Object of the Generated Servlet is created).

Class: TE Computer Subject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper SolutionInitialization ( jspInit() method is invoked by the container).Reqeust processing ( jspService() method is invoked by the container).Destroy ( jspDestroy() method is invoked by the container).Q5b)Create a servlet in java and get userID and password parameter which are entered in Login.htmlfile. [5]Ans:Login.html html body form method ”post” action ”loginServlet” Username: input type ”text” name ”t1” required Password input type ”password” name ”t2” required input type ”Submit” value ”Login” /form /body /html ervlet.http.HttpServletResponse;public class First extends HttpServlet {protected void doPost(HttpServletRequest request, HttpServletResponse response) throwsServletException, IOException {PrintWriter pw response.getWriter();

Class: TE ComputerSubject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper g uname request.getParameter("t1");String pass request.getParameter("t1");pw.println("User Name is" uname);pw.println("Password is" pass);pw.close();}}Q6a) Write a JSP scriplet for displaying even numbers between 1 to 50. [5]Ans: html body %out.println("Printing Even numbers between 1 and 50 ");for(int i 1; i 50; i ){if( i % 2 0){out.print(i " br ");}}% /body /html Q6b) What are the usage of JSP Directives and JSP Actions. [5]Ans:A JSP directive affects the overall structure of the servlet class. It usually has the following form %@ directive attribute "value" % Directives can have a number of attributes which you can list down as key-value pairs and separated bycommas.The blanks between the @ symbol and the directive name, and between the last attribute and the closing% , are optional.There are three types of directive tag S.No.12Directive & Description %@ page . % Defines page-dependent attributes, such as scripting language, error page, and bufferingrequirements. %@ include . % Includes a file during the translation phase.

Class: TE Computer3Subject: Web Technology2017-18 SEM II Staff Name: Prof. B.A.KhivsaraINSEM Paper Solution %@ taglib . % Declares a tag library, containing custom actions, used in the pageActions in JSP: These actions use constructs in XML syntax to control the behavior of the servlet engine.You can dynamically insert a file, reuse JavaBeans components, forward the user to another page, orgenerate HTML for the Java plugin.There is only one syntax for the Action element, as it conforms to the XML standard jsp:action name attribute "value" / Action elements are basically predefined functions. The following table lists out the available JSP actions S.No.12345678910Syntax & Purposejsp:include- Includes a file at the time the page is requested.jsp:useBean- Finds or instantiates a JavaBean.jsp:setProperty-Sets the property of a JavaBean.jsp:getProperty-Inserts the property of a JavaBean into the output.jsp:forward-Forwards the requester to a new page.jsp:plugin-Generates browser-specific code that makes an OBJECT or EMBED tag for theJava plugin.jsp:element-Defines XML elements dynamically.jsp:attribute-Defines dynamically-defined XML element's attribute.jsp:body-Defines dynamically-defined XML element's body.jsp:text-Used to write template text in JSP pages and documents.

3. Web Server: Web server is a computer where the web content is stored. Basically web server is used to host the web sites. A Web server is a program that uses HTTP (Hypertext Transfer Protocol) to serve the files that form Web pages to users, in response to their requests, which are forwarded by their computers' HTTP clients. 4.

Related Documents:

Mark Scheme 128 Unit 2 Paper 02 129 Mark Scheme 144 CAPE Food and Nutrition Subject Reports 2004 Subject Report 2005 Subject Report 2006 Subject Report 2007 Subject Report 2008 Subject Report (Trinidad and Tobago) 2008 Subject Report (Rest of the Caribbean) 2009 Subject Report 2010 Subject Report 2011 Subject Report 2012 Subject Report 2013 .

BOOGIE BOARD SYNC. ̶Voordelen: ‒Goedkoop en eenvoudig ‒Tekst zichtbaar ‒Wetenschappelijke notaties ‒1 week op batterij ̶Te verbeteren: ‒E

NCERT Solutions for Class 10 Subject-wise Class 10 Mathematics Class 10 Science – Physics, Biology, Chemistry Class 10 Social Science – History Class 10 Geography Class 10 Economics Class 10 Political Science Class 10 General Knowledge . 2/12 Choose the correct answer among the following: (a) Gastric juice contains .

Common Microsoft FrontPage tasks Work with and manage Web pages F8 Run the accessibility checker. CTRL N Create a new Web page. CTRL O Open a Web page. CTRL F4 Close a Web page. CTRL S Save a Web page. CTRL P Print a Web page. F5 Refresh a Web page; refresh the Folder List. CTRL TAB Switch between open Web pages. CTRL SHIFT B Preview a Web page .

Tanenbaum Computer Networks: Kalyani Publisher 2 Web Recourses Slide share, 3. Teaching Methods and techniques Presentations, Group discussion , Online classes( screen Sharing), Google classroom Class Bachelor of Computer Application(5th semester) Subject Code and Name Computer Networks (BCA-16-501) Time 45 min Internal /External Marks 10/65

Class Set – Group 1: Class Mammalia Class Set – Group 2: Class Aves Class Set – Group 3: Class Osteichthyes (The Bony Fishes) Class Set – Group 4: Class Chondrichthyes (The Cartilaginous Fishes) Class Set – Group 5: Class Reptilia Key – Using BLAST

CSEC Home Economics Textiles, Clothing and Fashion Subject Reports June 2008 Subject Report 356 June 2009 Subject Report 363 June 2010 Subject Report 369 June 2011 Subject Report 374 June 2012 Subject Report 381 June 2013 Subject Report 386 June 2014 Subject Report 393

00_Crawford_Price_BAB1407B0153_Prelims.indd 1 11/11/2014 7:36:56 PM. 1 INTRODUCING GROUPWORK Chapter summary In this chapter you will learn about the overall purpose, aims, scope and features of this book how the book is structured and the brief contents of each chapter how the book is aligned with a range of national standards and requirements related to professional social work .