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

1y ago
54 Views
1 Downloads
805.63 KB
9 Pages
Last View : 18d ago
Last Download : 5m 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 .

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

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

Pemrograman Web dengan PHP dan MySQL Achmad Solichin ([email protected]) 7 Bab 1 Pengenalan Web Server dan Server Side Scripting Pengenalan Web Server Instalasi dan Konfigurasi Web Server Instalasi dan Konfigurasi PHP Testing Web Server dan PHP Web Server Web Server merupakan sebuah perangk

Introduction A web service is a software system designed to support computer-to-computer interaction over . Wikipedia, the free Web encyclopedia, it is defined as Web 2.0 is a term often applied to a perceived . AJAX, tagging,

1. Computer Fundamentals by P.K.Sinha _ Unit I: Introduction to Computers: Introduction, Definition, .Characteristics of computer, Evolution of Computer, Block Diagram Of a computer, Generations of Computer, Classification Of Computers, Applications of Computer, Capabilities and limitations of computer. Unit II: Basic Computer Organization:

What is Computer Architecture? “Computer Architecture is the science and art of selecting and interconnecting hardware components to create computers that meet functional, performance and cost goals.” - WWW Computer Architecture Page An analogy to architecture of File Size: 1MBPage Count: 12Explore further(PDF) Lecture Notes on Computer Architecturewww.researchgate.netComputer Architecture - an overview ScienceDirect Topicswww.sciencedirect.comWhat is Computer Architecture? - Definition from Techopediawww.techopedia.com1. An Introduction to Computer Architecture - Designing .www.oreilly.comWhat is Computer Architecture? - University of Washingtoncourses.cs.washington.eduRecommended to you b

Class Is/Im/Ir devices 2 Class IIa devices 4 Class IIb Annex VIII rule 12 devices 8 Class IIb implantable – Well-Established Technologies (WET) 10 Class IIb non-implantable non rule 12 devices (non WET) 10 Class IIb implantable devices (excluding WET) 14 Class III non-implantable devices 16 Class III implantable devices 18 Custom-made Class III implantable .

This article explores security issues specific to Web services and illustrates the engineering and testing practices required to ensure security throughout the Web services development life cycle. Common Threats to Web Services and Web Sites A Web service is an application that can be described, published, located, and invoked over the Web. A

Web Accessibility @ W3C "Before and After" demonstration Web sites W3C's Web Accessibility Initiative Web Content Accessibility Guidelines 1.0 Web Content Accessibility Guidelines 2.0 Multi-stakeholder development of int'l standards Content, authoring tools, user ag

Web Developers' Guide 7 When you register a Web address, also known as a domain name, such as tutorialspoint.com you have to specify the IP address of the Web server that will host the site. We will see different type of Web servers in a separate chapter. What is Web Browser? Web Browsers are software installed on your PC.

Opera etc to access web documents called web pages. First page which is displayed in the web browser when it connects to the web site is called the home page.( The file name of the home page is normally index.html or default.html) A Web server is the computer program (housed in a computer) that serves requested HTML pages or files.

developed an integrated computer architecture labo-ratory called CAL2 that features a flexible, hierarch-ical, graphical simulator of an educational computer system (SimECS) and a web-based software system for Computer Architecture Learning and Self-Testing (CALKAS). The educational computer system (ECS) is designed to demonstrate a broad .

Amp Rating 1 - 6003 - 600 10 - 600 5 - 600 601 - 1200 0.5 - 300.25 - 30 Interrupting Rating 200,000 RMS Symmetrical Amps Current Limit-ing Class J Class RK5 Class RK1 Class T Class L Class CC Agency Approvals UL Listed Class J Guide JDDZ File E162363 CSA Certified HRCI-J per C22.2, No. 248.8 File 700489 RoH

NCERT Solutions for Class 9 Subjectwise Class 9 Maths Class 9 Science Class 9 Science – Chemistry Class 9 Science – Biology Class 9 Science – Physics Class 9 Social Science – Histor

CLASS DEFINITION INSTANCE OF AN OBJECT TYPE vs OF A CLASS class name is the type class Coordinate(object) class is defined generically use self to refer to some instance while defining the class (self.x – self.y)**2 selfis a parameter to methods in class definition class defines data

Buna N Class4 Class 4 Butyl Rubber Class4 Class 4 Delrin Class4 Class 4 Kel-F Class1 to 3 Class 1 to 3 Depends on actual grade Polyethylene Class 2 to 4 Class 2 to 4 Depends on actual grade/ Vendor Silicon Class 2 to 4 Class 2 to 4 Depend

GRADE: K . Strand: READING STANDARDS FOR LITERATURE Cluster 1: Key Ideas and Details STANDARD CODE STANDARD LAFS.K.RL.1.1 With prompting and support, ask and answer questions about key details in a text. Cognitive Complexity: Level 2: Basic Application of Skills & Concepts LAFS.K.RL.1.2 With prompting and support, retell familiar stories, including key details. Cognitive Complexity: Level 2 .