Netmar User's Guide Netmar.com
Contact Netmar
Order Webhosting

Linux control panel

   

Chapter 8
Using Java Servlets and Java for XML Parsing



Note:  These technologies are currently unsupported by Netmar. This page was created as a convenience for Netmar customers, courtesy of Steve Barr.  For support, please see the available public support resources available through http://www.javasoft.com/, http://www.apache.org, and http://java.apache.org/jserv.

Account Configuration

It is recommended for ease of development that you set up a similar configuration on your own computers so you can do the bulk of your development and testing locally.  You can then FTP the files up to your account for final testing and production deployment.

Determine Netmar's configuration:

Activate Servlets in your account: If you wish to compile programs in your account, you should add java to your path by set PATH=(/opt/java $PATH) or by adding it to your set path statement in your .cshrc file.  You will also want to add environment variables to your .cshrc file:
# for Java Servlets and Java API for XML Parsing
setenv JAVA /opt/java
setenv JAVA_HOME $JAVA/jdk1.1.8
setenv CLASSPATH .:$JAVA/jdk1.1.8/lib/classes.zip:$JAVA/jaxp1.0/jaxp.jar:$JAVA/jaxp1.0/parser.jar:$JAVA/JSDK2.0/lib/jsdk.jar

At the prompt type:


Testing Your Configuration

Once you have your account configured, you can FTP a servlet class file from your copy of the servlet development kit into your zone and see if you can launch it from your browser: http://www.yourdomain.com/js.account/servletname .  You can FTP a servlet or XML Java source file to your account and compile it by javac file.java.  You can run a non-servlet Java class by java file .  If you get a "core dump" message, try changing the line limit coredumpsize 0 to limit coredumpsize 200 and then source your .cshrc file.

Resources

Start with these links to learn more:
Apache: http://www.apache.org, http://java.apache.org/
Java: http://www.javasoft.com, http://web2.java.sun.com/docs/books/tutorial/
XML: http://www.xml.org

Quick Start Guide :: Visit the old Guide :: Dedicated Server Guide

All content © 2002,2003 NetMar, Inc.