than just evaluating of HTML forms Dynamic content needed for: Sophisticated user interaction (e.g. search engines, shopping carts) Content changes often (e.g. weather forecast, news headlines) Web gateways to database-based applications (e.g. prices of products, online ticket reservations) (5/95) Communication between Web server and external programs How should Web server communicate with external programs? Passing parameters, getting response, etc. Standardized communication mechanism Standard created by Web consortium (6/95) Common Gateway Interface (CGI) CGI is a specification of communication between Web server and external programs Current version CGI 1.1 http://hoohoo.ncsa.uiuc.edu/cgi/interface.html Very general approach, can be applied for different applications Not only HTML form evaluation Web server must implement CGI specification All major Web servers do! (e.g. Apache, IIS, etc.) (7/95) CGI Specification(1/4) Environment variables System specific variables set by Web server External program reads environment variables and obtains data about client request CONTENT_LENGTH, CONTENT_TYPE, REMOTE_ADDR, REMOTE_HOST, etc. Command line Using a special HTML tag user sends a command line to the server Command line executed on the server (8/95) CGI Specification(2/4) Standard Input Used by the server to send client data to external program Standard Output Usedbyexternalprogramtosendresponsetotheserver(writeHTML to standard output) (9/95) CGI Specification(3/4) HTTP method used by the client: GET or...
Website: coronet.iicm.tugraz.at | Filesize: 229kb
No of Page(s): 95
Download Server-side Technologies CGI, PHP, Java Servlets, JSP.pdf
No comments:
Post a Comment