Docsity

Server-Side Web Programming with Active Server Pages and Server Side Includes (SSI), Slides of Fundamentals of E-Commerce

Partial preview of the text

Download Server-Side Web Programming with Active Server Pages and Server Side Includes (SSI) and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Server-Side Web Programming

with Active Server Pages

Server Side Includes (SSI)

Server Side Includes (SSI)

  • A technology supported by many

webservers.

  • Server parses HTML files and replaces

special codes with data (e.g., file timestamp).

  • Codes inserted as HTML comments.• Example:

SSI Examples

File Includes This works in all ASP pages on default NT Server configuration. Timestamp Includes This works only on .stm, .shtm, and .shtml files on default NT Server

configuration.

SSI Considerations

-^

SSI codes work on most UNIX servers.

-^

File includes supported in .asp pages on mostMicrosoft webservers -- other includes dependenton server configuration.

-^

On Windows webservers, try using .shm or .shtmlfile extension to support other SSIs

-^

If using FrontPage, consider using file includesupported by FrontPage Extensions.

ASP & SSI Considerations

  • Included ASP scripts must be in a code

block or will be displayed.^ <% 'CONSTANTSconst BkgrndColor = '#ffffff'const TitleColor

= '#000000'

%>

ASP & SSI Considerations

  • File includes are inserted into the ASP page

BEFORE

the ASP code is interpreted.

  • Cannot dynamically determine file to include: NO

BUT <% Select Case pickFile

Case 1: %><% Case Else: %><% End Select %>