Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
No Starch Press

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 67 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

HOWTO Home

Current HOWTO: Java CGI HOWTO


Java CGI HOWTO: Setting Up Your Server to Run Java CGI Programs (With Explanations) Next Previous Contents

2. Setting Up Your Server to Run Java CGI Programs (With Explanations)

This section will lead you through installing my Java CGI package with copious explanations so that you know what the effects of your actions will be. If you just want to install the programs and don't care about the whys & wherefores, skip to Setting Up Your Server to Run Java CGI Programs (The Short Form).

2.1 System Requirements

This software should work on any unix-like web server that has the Java Development Kit installed. I am using it on a Debian Linux system running apache as the HTTP daemon. If you find that it does not run on your server, please contact the mailing list. See The Mailing List for details.

Unfortunatly, the Java run-time interpreter seems to be something of a memory hog -- you may want to throw another few megabytes of RAM onto your server if you will be using Java CGI programs a lot.

2.2 Java CGI Add-On Software

The software that I wrote to aid in this is called Java CGI. You can get it from ftp://ftp.orbits.com/pub/software/java_cgi-0.5.tgz. (The version number may have changed.)

2.3 Unpacking the Source

Find a convenient directory to unpack this package into. (If you don't already have a standard place to put packages, I suggest that you use /usr/local/src.) Unpack the distribution with this command:

gzip -dc java_cgi-0.5.tgz | tar -xvf -
This will create a directory called java_cgi-0.5. In there you will find the files referenced in the rest of this document. (If the version number has changed, use the instructions from within that distribution from this point on.)

2.4 Decide On Your Local Path Policies

You need to decide where you want your Java CGI programs to live. Generally, you will want to put them in a directory in parallel with your cgi-bin directory. My apache server came configured to use /var/www/cgi-bin as the cgi-bin directory, so I use /var/www/javacgi as the directory to put Java CGI programs in. You probably do not want to put your Java CGI programs into one of the existing CLASSPATH directories. Edit the Makefile to reflect your system configuration. Make sure that you are logged in as the root user and run make install. This will compile the Java programs, modify the java.cgi script to fit in with your system and install the programs in the appropriate places. If you want the HTML version of this documentation and an HTML test document in addition, run make all instead.

2.5 Testing your installation.

Installed from the distribution are HTML documents called javacgitest.html, javaemailtest.html and javahtmltest.html. If you installed all in the previous section, it will be in the directory you specified for WEBDIR in the Makefile. If you didn't, you can run make test to build them from javacgitest.html-dist, javaemailtest.html-dist and javahtmltest.html-dist.

When you are sure that your installation is working correctly, you may wish to remove CGI_Test.class, Email_Test.class and HTML_Test.class from your JAVACGI directory and javacgitest.html, javaemailtest.html and javahtmltest.html from your WEBDIR directory as they show the user information that is normally only available to the server.


Next Previous Contents

The Linux Tutorial completely respects the rights of authors and artists to decide for themselves if and how their works can be used, independent of any existing licenses. This means if you are the author of any document presented on this site and do no wish it to be displayed as it is on this site or do not wish it to be displayed at all, please contact us and we will do our very best to accommodate you. If we are unable to accommodate you, we will, at your request, remove your document as quickly as possible.

If you are the author of any document presented on this site and would like a share of the advertising revenue, please contact us using the standard Feedback Form.


  




Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can help in many different ways.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.52 Seconds