7. What are the two commonly used Request
methods?
The request methods tell the script how it
was invoked. Based on this information, the
Script decides how to act. The request method
is passed to the script using environment
Variable called REQUEST- METHOD. The two most
common request methods used are GET and POST.
GET
GET is a request for data, the same method
used for obtaining static documents. The
GET method sends request information as
parameter tacked onto the end of the URL. These parameters are passed to the
CGI program in the environment variable QUERY-STRING. E.g.: If the script is
called myprog.exe and is invoked from a link with the form
<A HREF="cgi-bin/myprog.exe?
lname=blow&fname=joe"> The REQUEST_METHOD will be the string GET,
and the QUERY_STRING will contain lname=blow & fname=joe. A mandatory
question mark separates the name of the script from the beginning of the
QUERY_STRING. If a slash is used instead of the question mark; the server
passes the information to script using the PATH_INFO variable instead of the
QUERY_STRING variable.
POST
POST operation occurs when the browser sends
data from a fill-in form to the server.
With POST, the QUERY_STRING mayor may not be
blank, depending on the server.The data from a POSTed query gets passed from
the server to the script using STDIN. Because STDIN is a stream and the script
needs to know how much valid data is waiting, the server also Supplies another
variable, CONTENT_LENGTH, to indicate the size in bytes of the incoming
"data.
The format for POSTed data is
Variable1=value1 & variable2=value2
&etc.
After the required data is available, the
script executes and writes its output to the STDOUT. The MIME code that the
server sends to the browser indicates the type of the file that is being sent.
This information that precedes the file is usually called the header. Since the script generates the output on the fly the server will
not be able to create a header for that information. Hence this information has
to be supplied by the script itself. Failure will result in the browser
receiving information that it does not know how to display.
8. What do you mean by JDBC?
JDBC Part of the Java Development Kit which
defines an application-programming interface for Java for standard SQL access
to databases from Java programs.
9. Define ODBC.
It is a standard for accessing different
database systems. There are interfaces for Visual Basic, Visual C++, SQL and
the ODBC driver pack contains drivers for the Access, Paradox, dBase, Text,
Excel and Betrieve databases.
10. List any two keyboard events?
1. OnKeypress
2 .onKeyUp
3. OnKeyDown
11. List any two mouse events?
l. onMouseUp
2. OnMouseDown
3. OnMouseOver
4. OnClick
No comments:
Post a Comment