JRUN4.0 and Apache integration
sequence:
Under JRUN3.1, the integration configuration with Apache is very convenient. In the JRUN Management Console interface, configure the admin server's External Web Server; dynamically load servlet can also pass directly by clicking {server_name} -> Web Applications> {Application_name } -> Servlet Definitions for configuration.
JRUN4.0 is really uncomfortable, and there is a lot of bending roads on the configuration, and the basic procedure is written so much. I hope that the newcomers that configure JRUN4.0 are a bit helpful. For the first time, I also hope that many friends will pay more, and more advice. MSN: chinawdn@hotmail.com
In the case of the transaction, the WINDOW and Linux system environment, JRUN and APACHE integration steps are basically similar, and this paper is in connection with Linux.
1. Ready to work:
(1) Establish a file directory:
/ home / httpd / html / sdsms store JSP files
/ home / httpd / np / com / np / sdsms store Java programs
(2) Install the relevant software:
2. Preliminary use configuration:
(1) Configure the ClassPath of JDK:
(2) Configure the httpd.conf file of Apache and restart:
DocumentRoot "/ home / httpd / html"
(3) Configure and restart JRUN:
a. Add a virtual directory:
{JRUN_ROOT} / servers / {server name} /default-ear/default-war/web-inf/jrun-web.xml Add
virtual-maping>
b. Dynamic loading related servlet:
{JRUN_ROOT} / Servers / {Server_Name} /Default-ear/default-war/web-inf/web.xml Add
...
init-param>
servlet>
...
web-app>
C. Optimize JSP:
{JRUN_ROOT} / servers / {server name} /server-inf/default-web.xml Update JSPSERVLET:
...
init-param>
servlet>
d. Configure an empty web application (web appalication, *. War)
CD / home / httpd / html /
Mkdir Jane
CD Jane
Mkdir Web-INF
CP {JRUN_ROOT} / {app_server_name} /default-ear/default-war/web-inf/web.xml web-inf /
Start Admin Server from the console / background and prepare the target App Server for the web application (set port = 8100)
Click on this server, then click the Add button under the Web Application.
Fill in / home / httpd / html / jane in Source File Path, click Deploy button
In the Overview page, you can modify the CONTEXT PATH name, continue to click Apply button
Ok, build a Test.jsp file in the Jane directory, try access http: // localhost: 8100 / jane / test.jspj
e. Related Server adds necessary ClassPath
Start JRun Admin Server, run the Jrun Management Console interface, (http: // localhost: 8000)
Setting: Click {server_name} -> settings-> add classpaths for java vm Add related classpath
3. Integrated configuration:
(1) JRUN integrate Apache, run command:
{JRUN_ROOT} / lib / java -jar wsconfig.jar -ws apache -dir {apache_root / conf} -server {server_name} can also be directly
{JRUN_ROOT} / lib / java -jar wsconfig.jar -ws apache -dir {apache_root / conf}, integrate ApacheDefault and JRun's Default Server (default JRun Server)
(2) If you need to delete the integration with Apache, run the command:
{JRUN_ROOT} / lib / java -jar wsconfig.jar -ws apache -dir {apache_root / conf} -r
Note: Write method under Windows: Start menu -> JRun program group-> Web Server Configuration Tool
4. Test:
(1) Test related catalog:
/ home / httpd / html / new file Test.jsp:
Test code: <% out.print ("apache documentroot");%>
/ home / httpd / html / sdsms / new file Test.jsp:
Test code: <% out.print ("JRun Default Server's Virtual Root Named /" Sdero / ");%> (2) Now restart Apache and JRun, enter the browser separately:
http://localhost/test.jsp
http://localhost/sdhero/test.jsp
Attached, bachelor's bart jrun command: ./ jrun -start {servername} 1> {jrun.rootdir} / logs / {servername} -out.log 2> {jrun.rootdir} / logs / {servername} -error.log &
(3) Run command: tail -f access_log | grep test, you can monitor it through the Apache's diary file, it is basically OK here! ^ _ ^
reference:
JRUN 4.0 comes with document {JRUN_ROOT} /DOCS/dochome.html