Java Reference
In-Depth Information
The rules that characterize the container, as well as how it interacts with the
applications it supports, are defined in the appropriate specification documents:
A portion of the Servlet specification is devoted to defining how a servlet con-
tainer must act, and a portion of the
EJB
specification is devoted to defining
how an
EJB
container must act, for example.
IDEA
comes with built-in integration support for both the Tomcat and
WebLogic application servers. When properly configured,
IDEA
is able to start
and stop these servers, deploy and undeploy enterprise applications on these
servers, and remotely attach a debugging session to these servers.
If you're using an application server other than Tomcat or WebLogic, don't
panic!
IDEA
's web server integration features are supported by a public
API
that
allows developers to extend support to other web servers through plugins. Plug-
ins for a number of other popular servers (including Caucho's Resin server and
JB
oss) either already exist or are currently in development. Once installed, an
application server plugin adds additional server options to the
Application Serv-
ers
settings. The options and setup requirements depend on the server and the
plugin's features.
If you can't locate support for your application server through the plugin
library, you still have some options. Although they won't be as tightly integrated,
you can still debug your applications and, in some cases, control your server from
within
IDEA
by configuring a generic application server. Another alternative is to
use a supported server, such as Tomcat, for development, and then do final test-
ing on your production server.
Application server integration is managed through the
Application Servers
settings dialog. You can access this window by selecting
File | Settings | Applica-
tion Servers
entry.
11.3.1
Integrating IDEA with Tomcat
Tomcat is a servlet container produced by the Apache Jakarta Project, part of the
Apache Software Foundation dedicated to open-source server-side Java technolo-
gies. Tomcat has the distinction of being the official reference implementation
for the Servlet and JavaServer Pages technologies. It's an open-source servlet
container, which makes it very useful for running and testing servlets and
JSP
s.
When you add a new reference to an installed Tomcat server,
IDEA
shows the
dialog as in figure 11.16. The
Tomcat home
and
Tomcat base directory
fields
specify the paths used by your Tomcat installation (refer to the Tomcat documen-
tation for a full explanation of the usage of these paths). The read-only
Detected
To m c a t v e r s i o n
label displays the version of Tomcat located in the specified