by Dinesh Thakur Category: introduction to Servlet

• The text that allows non-sequential access through hyper link is called as “hyper text”.

• Protocol http defines set of rules that are required to pass hyper text between browser to server and server to browser.

 
by Dinesh Thakur Category: introduction to Servlet

When four requests are given to a Servlet program.

a) The Servlet container creates one object of that Servlet class.

b) Servlet container starts 4 threads on that object representing 4 requests on per request basis.

 
by Dinesh Thakur Category: introduction to Servlet

Client side programs can be written using different client side technologies. These are given to develop client side web resources such as html (Web), JavaScript (Netscape), VBScript (Microsoft), AJAX (asynchronous JavaScript and xml) programming languages.

 
by Dinesh Thakur Category: introduction to Servlet

• Listens to client request continuously (HTTP Request).

• Traps and takes client generated HTTP Request.

• Passes the HTTP request to an appropriate web resource program of web application (deployed web application).

 
by Dinesh Thakur Category: introduction to Servlet

• Once web server is started one daemon process will be started to listen to clients continuously and to trap and take the client generated Http request.

• The process that runs continuously is called as daemon process.

 
by Dinesh Thakur Category: introduction to Servlet

Important terms used in web application are discussed here.

 
by Dinesh Thakur Category: introduction to Servlet

Servlets are platform independent and can work with almost all the web servers. They can be executed on any web server that supports the servlet API. Some of the web servers having built-in support for Java servlets are Tomcat server (Apache), Java web server (Sun Microsystems), Enterprise server (Netscape), Zeus web server (Zeus Technology), Tengah application server (Weblogic) and Sun web server (Sun Microsystems).



 
by Dinesh Thakur Category: introduction to Servlet

* Response status code indicates the status of generated response to display on the browser window.

* Every generated http response contains one http status code, default status code is 200.

* If web resource program generates warnings based web page then the status code is 100-199.   

* If web resource program generates successful web page then the status code is 200-299.

* If request given to one web site is forwarded to another web site then the status code will be 300-399.

* If our web resource program is incomplete or invalid to process the request then the status code will be 400-499.

* If server fails to execute our web application the status code will be 500-599.     

* 400-599 are error status codes, Using them the programmer can debug the problems related       to web application execution and server.

* 100-399 indicates success response status codes that means they display web pages on browser window having output content. So these status codes will not appear on the web pages.

* For related information on http response status codes refer page no 49 and 50.      

* Response headers provide instructions to browser window through web server towards displaying web pages on the browser window.

* The content type we have placed in PW.println statements becomes response body http response.



 
by Dinesh Thakur Category: introduction to Servlet

Apache Tomcat is a Open source java based web server software. At present tomcat 7.0 is compatible with jdk1.6/1.7. Tomcat default port no is 8080(changeable).To download tomcat we use www.apache.org.



 
by Dinesh Thakur Category: introduction to Servlet

The ServletRequest is a predefined interface present in javax.serviet package. The object of ServletRequest interface deals with the client request and fetches it to the servlet program. This object is created by the servlet container and is used as the argument of service method (life cycle method).



 
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content