|
Run Web Applications With JRun 4
Find out why Macromedia JRun is one of the most popular commercial Web containers and app servers.
by Budi Kurniawan
Posted November 14, 2002
Macromedia JRun 4 is an application server that's compatible with—and certified to run on—Java 2 Enterprise Edition (J2EE) 1.3. It supports Java Servlet 2.3 technology, JavaServer Pages (JSP) 1.2, and Enterprise JavaBeans (EJB) 2.0. This app server comes with its own servlet/JSP container at its front end and you can integrate it seamlessly with a robust HTTP server, such as Apache HTTP Server or Microsoft Internet Information Service (IIS).
In this article, I'll show you how straightforward it is to install and run JRun 4 and deploy Web applications with it.
Install JRun
JRun 4 works on Windows, Linux, and Unix. You can use the free Developer version to service requests coming from the same machine, which is not too restrictive for development purposes. For production purposes, Macromedia allows you to download a Trial version and evaluate it for 30 days. You can also read documentation online to get you started (see Resources).
Installing JRun is pretty easy. It takes less than five minutes, and a wizard guides you through a series of dialog boxes that are so comprehensive that even beginners can do it without much effort. Note that one of the dialog boxes prompts you for a username and password. Write those down because you will need them to log in to the JRun Management Console (JMC) later on.
Once you're finished with the installation, you'll have a directory structure under the installation directory:
The installation directory is called jrun_root. Pay special attention to the servers directory. It consists of four subdirectories, three of which (admin, default, and samples) represent the three servers that the installation process creates by default. The fourth, lib, contains general library files that might be needed by applications deployed under JRun. The admin server controls all applications deployed with JRun, the samples server contains various sample applications, and the default server is for you to deploy your applications. You can add more servers if you wish (see the section, "Create a New Server").
Start and Stop JRun
You can run JRun right away. First start the servers. JRun administrators can use either the command line or JRun Launcher, a Swing application that starts, stops, and restarts all available servers (see Figure 1).
In Windows, you start JRun Launcher by choosing Start | Programs | Macromedia JRun 4 | JRun Launcher or by double-clicking on the jrun.exe file in the bin directory under jrun_root. In Linux or Unix you invoke JRun Launcher by running the jrun.exe file.
To start a server, just select its name and click on the Start button. Alternatively, you can use the command line (see Table 1), whose syntax is:
jrun {options} {server-name}
Use the JRun Management Console
The JRun Management Console allows you to administer your applications. JMC is a Web application that runs with Netscape 4.77 or later, Internet Explorer 5.5 or later, or Mozilla .096 or later. To use JMC, you must first run the admin server. Invoke the JMC by entering this URL in the Location or Address box of your browser:
http://localhost:8000
That's right, the admin server runs by default on port 8000 rather than port 80.
Back to top
|