Page 214 - PYTHON-12
P. 214

(viii)  Its syntax is similar to that of C and Perl languages which makes it easy to use.
                        (ix)  PHP files can have one of the following extensions: PHP, PHP3 or PHTML.
                      The structure of PHP Script is as follows:

                      <HTML>

                      <HEAD>

                      <TITLE>PHP Test</TITLE>
                      </HEAD>

                      <BODY>
                      <?php echo'<p>Hello World</p>'?>

                      </BODY>
                      </HTML>

               (b) Server-Side Script

                   Server-side scripting gets executed on the server before displaying the information requested.

                   1.  ASP (Active Server Pages)

                      It is a technology that is used to create dynamic web pages so that the user can see these
                       pages without any specific web browser. The user does not require any specific web browser
                       to view these pages. To create active server pages, a default scripting language is used, viz.
                       VBScript and sometimes JSCRIPT. ASP pages are saved with the extension .ASP and not by
                       .html. Any web page that contains ASP code cannot be run simply by executing it through
                       web browser; instead, the page must be requested through a web server that supports
                       ASP. When a browser requests an ASP, the web server generates a page with HTML code
                       and sends it back to the browser. ASP is also the short term used for Application Service
                       Provider.
                       Various services offered by ASP are:

                          (i)  It helps in creating interactive and dynamic web pages.
                         (ii)  It allows access to any data or databases and returns the result to web browser.

                        (iii)  It allows the user to dynamically edit, change or add any content of a web page.
                        (iv)  It provides security to a page as it is not executed by a web browser.

                       JSP (Java Server Pages)
                   2.   Java Server Pages (JSP) is a technology that helps software developers to create dynamic
           Computer Science with Python–XII  8.60  Microsystems. JSP is similar to PHP, but it uses the Java programming language. JSPs have

                       web pages based on HTML, XML or other document types. It was released in 1999 by Sun


                       dynamic scripting capability that is embedded in an HTML code. Java server pages can be
                       run by a compatible web server with a servlet container, such as Apache Tomcat or Jetty.
                       To process a JSP file, developers need a JSP engine, which is connected to a Web server. The
                       JSP page is then compiled into a servlet, which is handled by the servlet engine. This phase
                       is known as translation. The servlet engine then loads the servlet class and executes it to
                       create dynamic HTML, which is then sent to the browser. A Java Server Pages compiler is a
                       program that parses JSPs and converts them into executable Java Servlets.
   209   210   211   212   213   214   215   216   217   218   219