Web Server Programming - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Web Server Programming

Description:

Allow parts of documents to be generated dynamically. Executed by server (not by client) ... Uses VBScript, PerlScript (=Perl) or Jscript ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 17
Provided by: wlem
Category:

less

Transcript and Presenter's Notes

Title: Web Server Programming


1
Web Server Programming
  • 3. Server side includes

2
HTML (hole) technologies
  • Uses HTML, HTML (or XML) extended with code.
  • Very many different varieties.
  • SSI (Server Side Includes) (Apache)
  • PHP (Personal Home Page)
  • HTML code (SSI,PHP,ASP, etc.)

3
Server Side Includes
  • Program fragments mixed with text
  • Allow parts of documents to be generated
    dynamically
  • Executed by server (not by client)

4
Server Side Includes
  • SSI (http//httpd.apache.org/docs/mod/mod_include.
    html)
  • PHP (http//www.php.net/)
  • ASP (http//stardeveloper.com8080/articles/041600
    -1.shtml)
  • JSP (http//java.sun.com/products/jsp/index.html)
  • XSP (http//xml.apache.org/cocoon/xsp.html)
  • ColdFusion (http//www.macromedia.com/software/col
    dfusion/)

5
Principles Implementations
  • Reinier

6
JSP
  • SUN standard
  • For HTML or XML
  • Processing instruction tags
  • XML extensions
  • predefined ltjspsetProperty .. /gt, etc.
  • custom
  • Uses JAVA
  • Gives access to Servlet packages

7
Most Important JSP Tags
  • lt_at_page importjava.io,java.util gt
  • lt_at_include filerelativeURL gt
  • lt!String name gt
  • lt namerequest.getParameter(name) gt
  • lt name gt
  • lt-- comment --gt

8
HTML Interleaving
  • lt for (int i 0 i lt 10 i) gt
  • lttdgtlta href
  • lt \ urlPrefix i \ gt
  • gttextlt/agtlt/tdgt
  • lt gt

9
Implicit Objects
  • config ServletConfig object
  • request ServletRequest object
  • response ServletResponse object
  • application ServletContext object
  • session HttpSession object
  • out Writer for output data

10
JSP XML
  • Alternative syntax
  • JSP lt a b gt
  • XML ltjspscriptletgt a b lt/jspscriptletgt
  • Tag libraries
  • lt_at_ taglib uripqr prefixstugt
  • ltstuloopgt lt/stuloopgt
  • Directives
  • ltjspplugin typeapplet codexyz

11
ASP
  • Microsoft product
  • Extends HTML pages
  • Tags lt and gt
  • Uses VBScript, PerlScript (Perl) or Jscript
  • Built-in objects Application, ASPError, Request,
    Response, Server, Session

12
ASP versus JSP
  • ASP
  • Microsoft license
  • IIS or PWS
  • Interpreted
  • ActiveX components
  • HTML
  • Fixed tags
  • JSP
  • SUN open standard
  • Apache, etc.
  • Compiled (JIT)
  • JavaBeans
  • HTML, XML
  • Extensible tags

13
Assignment 3
  • Translate servlet WCHelp to a JSP page in such a
    way that each time it is activated a different
    text is shown.

14
XML-based Web Programming
  • WSDL Web Services Description Language (services
    ports messages)
  • UDDI Universal Description, Discovery and
    Integration (registry)
  • XML-based Remote Procedure Calls (SOAP) (protocol)

15
Cocoon
  • Uses XML data
  • Uses XSLT transformations
  • Pipelining of operations

16
More Information
  • J2EE tutorial http//java.sun.com/j2ee/1.4/docs/t
    utorial/doc/index.html
  • Servlet API http//java.sun.com/j2ee/1.4/docs/api
    /index.html
  • JSP specification http//java.sun.com/products/js
    p/index.jspspecs
Write a Comment
User Comments (0)
About PowerShow.com