How to get ASP support on Linux
Back when I was in 5th semester, we had this subject called E-Commerce, it also had a lab attached to it which required us to code in ASP. Now I for one am staunch supporter and user of Linux and Open source applications, so I did not have windows required to run ASP. I looked high and low Google on how to get ASP working on Linux and just when I was about to give up hope, I found it: Arrowhead
Arrowhead is a Java servelet that will run on any Java servelet server to parse your ASP/VBScript code on Linux for you. So lets get started shall we?
Step 1: Following the requisites listed on this page, we’d need the following software installed on your linux system…
JDK 1.4.2 – Tested with 1.4.2. Available Here.
Java Servlet Server – Tested with Jakarta Tomcat version 5.0.27. Available Here.
Log4j – Tested with 1.2.8. Available Here.
JRegEx – Tested with 1.2_01. Available Here.
Step 2: Then you will need to download Arrowhead, from here (It’s a jar file).
Step 3: You must now have root access because it is required that you copy all of the above downloaded .jar files to /usr/share/tomcat (considering you have Tomcat Java servelet server installed).
Fire up the terminal and navigate to /usr/share/tomcat
$ cd /usr/share/tomcat
Create a directory called webapps
$ sudo mkdir webapps
Change to webapps directory
$ cd webapps/
Create a directory called aspfiles and then enter that directory
$ sudo mkdir aspfiles
$ cd aspfiles/
Create a directory called WEB-INF (yes, it must be in capitals)
$ sudo mkdir WEB-INF/
$ cd WEB-INF/
Create a directory called lib
$ sudo mkdir lib
$ cd lib
Now, copy all the files arrowhead-0.x.x.jar, log4j-1.2.8.jar, jregex1.2.01.jar to this directory (ie., /usr/share/tomcat/webapps/aspfiles/lib/)
Assuming all the jar files are on your /home/<username>
$ sudo cp ~/*.jar /usr/share/tomcat/webapps/aspfiles/lib/
Then you can check whether all files have been successfully copied by issuing the following command…
$ ls /usr/share/tomcat/webapps/aspfiles/lib/
Step 4: Download the sample xml file from here, it’s going to be saved as a .txt file which of course you must rename to a .xml file (ie., web.xml)
Now copy the web.xml file into your WEB-INF directory
$ sudo cp ~/web.xml /usr/share/tomcat/webapps/aspfiles/WEB-INF/
Step 5: Create a test file called say hello.asp with the following code in it…
<% response.write “Hello World” %>
and then copy the hello.asp to /opt/tomcat/webapps/aspfiles/ by issuing the command
$ sudo ~/hello.asp /usr/share/tomcat/webapps/aspfiles/
Step 6: If you are running Tomcat server, the port for access to it will be 8080 so all you have to do now is open up your browser and type
and that’s all there is to it, It should render the text Hello World
However should you run into problems, please leave back a comment on this blog post and hopefully I should be able to help you out!