Java Reference
In-Depth Information
11.4.1
Running your web application
With the appropriate tab selected for your application server in the Run/Debug
Configurations window (for example, the To m c a t tab), you can add a configura-
tion by clicking the plus ( + ) button, just like adding a configuration for a plain
Java application. Adding a new configuration for a web application, however,
demands that you specify whether the application server is local or remote. This
choice refers to the location of the web application server: whether it's installed on
the local machine or on a remote one (over which you have no automated control).
The options for the Run configuration you're creating differ depending on
whether you specify the configuration as being local or remote. If you specify
the configuration as being local, IDEA assumes that you have full control over the
server and prompts you for options such as VM parameters for the server's virtual
machine and startup/shutdown scripts. If you specify the configuration as being
remote, IDEA instead prompts you for the remote connection settings.
Additionally, the options for the Run configuration differ depending on the
target application server. For example, local Tomcat configurations have a
Deployment tab that lets you choose which web modules in your project are
deployed on server startup, whereas local WebLogic configurations allow you to
deploy J2EE and EJB modules in addition to web modules (Tomcat is a servlet
container, and WebLogic is a full J2EE container), and generic application servers
don't have a deployment tab at all (because there's no standard deployment
mechanism that all generic application servers adhere to).
11.4.2
Running the ACME web application on Tomcat
It's time to see your web application in action. Let's create a new run configura-
tion profile that is configured to start the Tomcat web application server, deploy
the ACME web application, and open a browser to the appropriate page. Follow
these steps:
Select Run | Edit Configurations from the main menu.
1
In the Run/Debug Configurations window, select the To m c a t S e r v e r tab.
2
Click the plus ( + ) button to create a new Run configuration. Select Local
from the drop-down that appears. A new Run configuration (with default
values) is created with a unique name.
3
In the Name field, enter ACME webapp .
4
Select the Server tab in the configuration panel if it isn't already selected.
5
 
 
 
 
 
 
Search WWH ::




Custom Search