Pages

Tuesday, September 3, 2013

Complete Guide to Web Programming - Step 1

What are text nodes?
If a node contains text, it is represented as a text node. For example, in<p id-node2>"This is the <b>initial</b>text.</p>, there are text nodes "This is the", "initial", and "text".

 What is CGI? Give examples of CGI application.
Common Gateway Interface is a specification, which allows Web users to run programs from their computers. CGI is not a programming language but rather a specification that allows programs and scripts written in other language to be run over the Internet.

What is Query String?
QUERY_STRING:The query information passed to the program. It is appended to the URL with a ?when the browser sends it to the server. The name value pairs are then stored in this environment variable.

 What is Extra Path Information?
Besides passing query information to a CGI script, you can also pass additional data known as extra path information as part of the URL. The server gauges where the CGI program name ends; anything following that is deemed as extra path information and stored in the PATH_INFO environment variable. For example the following line calls a script with extra path information:

 What is a web server?
The Web server is the software responsible for accepting browsers' requests, retrieving the specified file or executing the script, and returning its content to the browser. Popular Web servers include Tomcat, Apache, and IIS.

 List out differences between web server and application server.
The main differences between Web servers and application servers are:
A Web server is where Web components are deployed and run. An application server is where components that implement the business logic are deployed. For example, in a JSP-EJB Web application, the JSP pages will be deployed on the Web server whereas the EJB components will be deployed on the application servers.
A Web server usually supports only HTTP (and sometimes SMTP and FTP). However, an application server supports HTTP as well as various other protocols such as SOAP.
In other word
Difference between AppServer and a Web server
(1) Webserver serves pages for viewing in web browser, application server provides exposes business logic for client applications through various protocols
(2) Webserver exclusively handles http requests. Application server serves business logic to application programs through any number of protocols.
(3) Webserver delegation model is fairly simple, when the request comes into the web server, it simply passes the request to the program best able to handle it(Server side program). It may not support transactions and database connection pooling.
(4) Application server is more capable of dynamic behavior than webserver. We can also configure application server to work as a web server.Simplyapplication server is a superset of web server.

1 Describe role of deployment descriptors.
A deployment descriptor is an XML document that defines all the components of an application along with related information such as initialization parameters and container managed security constraints that you want the server to enforce. This file helps the server to know crucial details about the application.

1What is a war file? Give its importance.
WAR or Web Application Archive file is packaged servlet Web application. Servlet applications are usually distributed as a WAR files.
                              WAR file (which stands for "web application archive" ) is a JAR file used to distribute a collection of JavaServer Pages, servlets, Javaclasses, XML files, tag libraries and static Web pages (HTML and related files) that together constitute a Web application.

How to specify session time out in Web.XML?
You can specify session timeout in the <session-timeout> attribute of the <session-config> element. For example, to specify a session timeout of 30 minutes use:
<session-config>
<session-timeout>30</session-timeout>
</session-config>

No comments:

Post a Comment