Running ASP on a Linux Server

Introducing Sun Java System Web Server 7.0

© Mark Alexander Bain

Sep 16, 2008
ASP For Linux, Mark Alexander Bain
The great thing about Sun Java System Web Server 7.0 is not that it's a free web server, it's that it is a free web server that runs ASP on Linux

Mention ASP (Active Server Pages) to any Linux programmer and they'll probably do one of three things:

  • explain that ASP can't be done on Linux and to use PHP instead
  • explain that Apache servers can have an additional module to allow ASP (except that the pages will have to be rewritten in Perl)
  • explain that ASP pages are only available on a Windows based web server

That is, of course, if they don't know about Sun Java System Web Server 7.0 - with Sun Java System Web Server 7.0 installed a programmer can develop ASP on a Linux system.

Sun Java System Web Server 7.0 Platforms

Sun Java System Web Server 7.0 is not soley available on Linux, it is also available for:

  • AIX
  • Solaris
  • Unix
  • Windows

This is the big advantage to any ASP programmers - they are no longer bound to Windows only; they can now move to any platform, benefiting from the reductions in cost (since the Linux operating system is free).

Installing Sun Java System Web Server 7.0

Sun Java System Web Server 7.0 may be downloaded from the Sun Download Center (http://www.sun.com/download/) by using the Sun Download Manager. Once the required files have been downloaded and uncompressed then a simple installation program can be run to install and to start the server.

Adding ASP Support to Sun Java System Web Server 7.0

Sun Java System Web Server 7.0 does not support ASP by default - for that Sun Active Server Pages 4.0.3 must be installed as well.

Sun Active Server Pages 4.0.3 is also available from the Sun Download Center, and again it is downloaded using the Sun Download Manager. However, unlike Sun Java System Web Server 7.0, a Sun online account is required in order to download ASP 4.0.3 - fortunately creating that account is free and only takes a few minutes.

With the account in place and the files downloaded then it's just a matter of running another installation script - this one will automatically update and restart the web server.

Creating a Sun Active Server Pages 4.0.3 Web Page

If Sun Java System Web Server 7.0 has been installed on a Linux system then the installation process will have created a directory named something like:

/sun/webserver7/https-<host name>/docs

for example, for host name 'aeneas' the process will have created:

/sun/webserver7/https-aeneas/docs

it is this directory that will contain the pages for the web site, for example a simple page called hello.asp:

<html>
<body>
<%
response.write("This is ASP on Linux")
%>
</body>
</html>

This ASP will now be run correctly regardless of whether the ASP is on a Linux server or a Windows server.

Conclusion

ASP has now become a cross-platform programming language thanks to Sun Java System Web Server 7.0 - a web server which is:

  • like Apache (but unlike Windows) in that it is free and available for a number of different operating systems (in particularly Windows and Linux)
  • like Windows (but unlike Apache) in that it supports ASP applications

With Sun Java System Web Server 7.0 a web developer can have best of both worlds - the reliablity and security of Linux and the power and versatility of ASP.


The copyright of the article Running ASP on a Linux Server in ASP Programming is owned by Mark Alexander Bain. Permission to republish Running ASP on a Linux Server in print or online must be granted by the author in writing.


ASP For Linux, Mark Alexander Bain
A Simple ASP File, Mark Alexander Bain
     


Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo

Comments
May 5, 2009 10:17 PM
Guest :
This article is very useful to those people how are interested to run asp file on Linux
1 Comment: