Archive for 2月 9th, 2012

  1. Hello, ASP World!

    Posted on 2月 9th, 2012 by cx20

    ASP

    ASP(Active Server Pages)は、マイクロソフトの Web サーバー(IIS)でプログラムを動作させる技術の一つである。既定の言語として VBScript が用いられるが、JScript や Active Scripting に対応した他の言語でも記述が可能である。現在は、後継技術の ASP.NET が登場しており、ASP(レガシー ASP)はあまり使われることは無くなってきている。
    ASP の類似技術としては、Java Servlet、JSP(JavaServer Pages)、PHP 等がある。

    OS IIS 4.0 IIS 5.0 IIS 5.1 IIS 6.0 IIS 7.0 IIS 7.5
    Windows NT 4.0
    Windows 2000
    Windows XP
    Windows 2003
    Windows Vista
    Windows 2008
    Windows 7
    Windows 2008 R2

    ソースコード(VBScript)

    <%@ Language="VBScript" %>
    <html>
      <head>
        <title>Hello, World!</title>
      </head>
      <body>
        <p><% Response.Write "Hello, ASP World!" %></p>
      </body>
    </html>

    ソースコード(JScript)

    <%@ Language="JScript" %>
    <html>
      <head>
        <title>Hello, World!</title>
      </head>
      <body>
        <p><% Response.Write( "Hello, ASP World!" ); %></p>
      </body>
    </html>

    実行方法

    1. IIS の公開フォルダ に配置
    2. ブラウザで表示
       http://localhost/doc/hello.asp

    実行結果

    Hello, ASP World!