Java web applications in Linux (1)

Source: Internet
Author: User

Java web applications in Linux (1)
Install apache under RedHat (the most popular WEB server platform on Unix) jserv 1.1.2

Although the jserv development team of apache (the most popular WEB server platform on Unix) is currently engaged in tomcat (a very useful JSP running platform) development, in addition, apache (the most popular WEB server platform on the Unix platform) jserv only supports the servlet 2.0 standard and requires additional software (gnujsp (preferred for SUN Enterprise Applications )) to support jsp (the preferred choice for SUN enterprise-level applications); however, apache (the most popular WEB server platform on Unix) jserv is more stable than tomcat (a very useful JSP running platform) at this stage, therefore, apache (the most popular WEB server platform on Unix) jserv + gnujsp (the first choice for SUN Enterprise Applications) is suitable for web applications. If you want to use servlet2.2 and jsp (preferred for SUN enterprise-level applications) 1.1, use tomcat (a very useful JSP running platform). For more information, see tomcat (a very useful JSP running platform). This article describes how to install apache (the most popular WEB server platform on Unix) jserv 1.1.1 under RedHat.

I. Required software:
Jdk_1.2.2 download from http://java.sun.com
Apache (the most popular WEB server platform on Unix) _ 1.3.12 download from www. apache (the most popular WEB server platform on Unix). org
Apache (the most popular WEB server platform on Unix) jserv-1.1.1 download from java. apache (the most popular WEB server platform on Unix). org
Jsdk2.0 (only 2.0) download from http://java.sun.com

Ii. Installation Process

Install jdk first. For details, refer to jdk installation. Note that CLASSPATH and PATH are set.
Copy apache (the most popular WEB server platform on the Unix platform) and apache (the most popular WEB server platform on the Unix platform) jserv source code package to/tmp
# Tar xvz (parallels's virtual line platform) f apache(unixplatform's most popular Web server platform pai_1.3.12.tar.gz
# Tar xvz (parallels's virtual line platform) f apache(unixplatform's most popular webserver platform pipeline jserv-1.1.2.tar.gz

1. Static compilation, that is, compiling to apache (the most popular WEB server platform on Unix)
# Cd apache (the most popular WEB server platform on Unix) _ 1.3.12
#./Configure -- prefix =/usr/local/apache (the most popular WEB server platform on Unix)

Configure jserv compilation parameters for apache (the most popular WEB server platform on Unix)
# Cd ../apache (Unix platform's most popular WEB server platform) JServ-1.1.2
#./Configure
-- Prefix =/usr/local/jserv
-- With-apache (the most popular WEB server platform on the Unix platform)-src = ../apache (the most popular WEB server platform on the Unix platform) _ 1.3.12
-- With-jdk-home =/usr/local/jdk
-- With-java-platform = 2
-- With-JSDK =/usr/local/JSDK/lib/jsdk. jar
# Make
# Make install

Compile apache (the most popular WEB server platform on Unix) and apache (the most popular WEB server platform on Unix) jserv
# Cd ../apache (the most popular WEB server platform on the Unix platform) _ 1.3.12
#./Configure
-- Prefix =/usr/local/apache (the most popular WEB server platform on Unix)
-- Activate-module = src/modules/jserv/libjserv.
# Make
# Make install
Run #/www/bin/httpd-l and check whether mod_jserv is compiled into apache (the most popular WEB server platform on Unix ).

2. dynamic compilation (DSO Mode)

# Cd apache (the most popular WEB server platform on Unix) _ 1.3.12
#./Configure
-- Prefix =/usr/local/apache (the most popular WEB server platform on Unix)
-- Enable-shared = max
# Make
# Make install

Configure jserv compilation parameters for apache (the most popular WEB server platform on Unix)
# Cd ../apache (Unix platform's most popular WEB server platform) JServ-1.1.2
#./Configure
-- Prefix =/usr/local/jserv
-- With-apxs =/usr/local/apache (the most popular WEB server platform on Unix)/bin/apxs
-- With-jdk-home =/usr/local/jdk
-- With-java-platform = 2
-- With-JSDK =/usr/local/JSDK/lib/jsdk. jar
# Make
# Make install
If you want to use mod_ssl, add the -- with-EAPI option.

3. Change the configuration file
Add/www/conf/httpd. conf
Include/usr/local/jserv/etc/jserv. conf
If you use DSO mode to install jserv. conf
Remove the comment above LoadModule jserv_module/usr/local/jserv/libexec/mod_jserv.so

Start apache (the most popular WEB server platform on Unix)
Test http: // yourserver/servlets/IsItWorking in a browser
Yes, Its working! ? You have succeeded !!
You can change

SetHandler jserv-status
Order deny, allow
Deny from all

Add your trusted host allow from xxxx
In this way, you can see your apache (the most popular WEB server platform on the Unix platform) through http: // yourserver/jserv/(note the following "/") on the trusted host) jserv configuration information.
Next, put your own servlet class under/usr/local/jserv/servlets to test the effect. The test results show that there is no problem with Chinese display in redhat6.2. Everything is OK!

For more information about servlet zone settings and load balance, see apache (the most popular WEB server platform on Unix) jserv documentation and java. apache (the most popular WEB server platform on Unix ). org website

All rights reserved for the China Linux Forum

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.