Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
5Activity
0 of .
Results for:
No results containing your search query
P. 1
Previous Question Paper MSc III Semister - 3B Internet Programming

Previous Question Paper MSc III Semister - 3B Internet Programming

Ratings: (0)|Views: 38 |Likes:
Published by Seshadri Krishna

More info:

Published by: Seshadri Krishna on Nov 08, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

12/13/2012

pdf

text

original

 
Write brief answers to the following questions.1.
 
What are the different methods CGI uses for returning HTTP ? 3
CGI.pm has two methods for returning HTTP headers: header and redirect.They correspond to the two ways you can return data from CGI scripts: you can return a document,or you can redirect to another document.
2.
 
Which are the file locks available in peri ? 3
A
shared lock
allows more than one program (or other process) to access the file at the same time.A program should use a shared lock when reading from a file.An
exclusive lock
allows only one program or process to access the file while the lock is held. Aprogram should use an exclusive lock when writing to a file.File locking is accomplished in Perl using the Fcntl module, EG: use Fcntl qw(:flock);
3. How do you set the environmental variables manually? 34. What are the common errors in programming with Perl? 3
Problem Typical Error Message
Application permissions 403 ForbiddenThe pound-bang line 403 ForbiddenLine endings 500 Internal Server Error
“Malformedheader
500 Internal Server Error
5. What are the advantages of XML? 3The real power of XML comes from the fact that with XML, not only can you define your ownset of tags, but the rules specified by those tags need not be limited to formatting rules. XMLallows you to define all sorts of tags with all sorts of rules, such as tags representing businessrules or tags representing data description or data relationships.Some of the benefits are:
 
With XML, the GUI is extracted. Thus, changes to display do not require futzingwith the data. Instead, a separate style sheet will specify a table display or a listdisplay.
 
 
Searching the data is easy and efficient. Search engines can simply parse thedescription bearing tags rather than muddling in the data. Tags provide thesearch engines with the intelligence they lack.
 
Complex relationships like trees and inheritance can be communicated.
 
The code is much more legible to a person coming into the environment with noprior knowledge.
 
In the above example, it is obvious that <ID>002</ID> represents an ID whereas<LI>002 might not. XML is self-describing.
 
Data is provided in a way that makes it easily transportable via HTTP.
 
By and large, tags make up the majority of XML markup. A tag is pretty muchanything between angular brackets < >6. Explain the syntax of HTML template. 4Example 7-1. current_time.tmpl<HTML><HEAD><TITLE>Current Time</TITLE></HEAD>
<BODY BGCOLOR=”white”>
 <H1>Current Time</H1><P>Welcome. The current
time is <TMPL_VAR NAME=”current_time”>.</P>
 </BODY></HTML>7. Explain the structure of CGI program. 3Perl has three types of variables:
Scalars
:
Scalar variables are variables that can hold only one value at a time. A scalar variable isdefined in Perl
by using “$”,
 
Arrays
:
An array stores a list of values. While a scalar variable can only store one value, an array canstore many. Perl array names are prefixed with an at-sign (@)
 
Hashes
:A hash is a special kind of array - an associative array, or paired group of elements. Perl hashnames are prefixed with a percent sign (%), and consist of pairs of elements - a key and a datavalue.---------1.
 
What is CGI? Explain with a diagram. 5
Ans:
The Common Gateway Interface, or CGI, is a standard for external gatewayprograms to interface with information servers such as HTTP servers. A plain HTMLdocument that the Web daemon retrieves is static, which means it exists in aconstant state: a text file that doesn't change. A CGI program, on the other hand, isexecuted in real-time, so that it can output dynamic information
. The interactions are illustrated in the followingdiagram:Web Web CGI Appl.Browser Internet Server Protocol ProgramHTTP Env. Var.request stdinSend --------------> Convert ----------> Process|HTTP |response stdout VReceive <----------- Convert <---------- ProcessThere are several basic rules with CGI:Web server provides most of the input information toapplication programs through environment variables.Data send in the HTTP request with the GET method isconverted to a special environment variable,QUERY_STRING.Data send in the HTTP request with the POST method isconverted to the standard input (stdin) channel.Data printed to the standard output (stdout) channel isconverted to the HTTP response
----------1.
 
What is Virtual Document
Virtual, or dynamic, document creation is in the heart of CGI. Virtual documents are created on
the fly in response to a user’s information request. Virtual HTML, plain text, image and even
audio documents can be created 
 

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->