Configuring the Apache Tomcat Server in Eclipse IDE
Configuring the Server
Eclipse provides integration for the Apache Tomcat Web environment and this can be used for rapid Stardust deployments within Eclipse.
Prerequisites
- Download Apache Tomcat from jakarta.apache.org/tomcat
- Extract the compressed file containing Apache Tomcat on your local file system.
To establish Tomcat integration in Eclipse:
- From the Eclipse main menu choose File > New > Other...
- Select Server > Server.
- Click Next.
Figure: Define a New Server - Select Tomcat vx.x Server
- Click Next.
Figure: Choose Tomcat version - Browse to the folder of your Tomcat installation.
Figure: Browse to Installation Folder - Select Finish.
Open the Servers view to see the server listed:
- In the main menu select Window > Show View.
- Choose Other... > Server > Servers.

Figure: The Server View
This server configuration can be used for multiple Web projects.
Setting the Server Launch Configuration
To avoid running out of PermGenSpace, increase the size of the permanent generation memory by setting the -XX:MaxPermSize argument in the run configuration for the server.
To set the server configuration:
- In the server view right-click your server and choose Open.
- Select Open launch configuration.

- In the Edit launch configuration properties dialog switch to the Arguments tab.
- In the VM arguments entry field enter the memory arguments for your server.
For example for a Tomcat server set: -Xms128m -Xmx1024m -XX:MaxPermSize=256m

Figure: Setting Server Arguments for Tomcat
Please note that you might increase the maximum perm size according to your requirements.
0 comments:
Post a Comment