Adding Application Server to Module Problem

I am using IntelliJ IDEA Ultimate 10.5.1 on Windows XP (32-bi). The JDK reported by the About screen is 1.6.0_22.

I tried 2 different ways to create a new project and include an application server, and the second method does not work:

First method:

Create the new project and module, and include an application server (such as GlassFish or JBoss) during the creation of the module. In this way, the application server will show up in the "External Libraries" and I can include javax.servlet.* .This method works.

Second method:

Same as above, but DO NOT include application server when creating the module. The application server will NOT show up in the "External Libraries". Then, use Run...Edit Configuration to add the application server. Everything seems alright except the application server will never show up under the "External Libraries" and javax.servlet.* will not work.

I'd like to ask what is wrong with the second method. Say, if I create a project and did not (forgot) to include an application server. Later stage during coding, I'd add GlassFish to it. How to get it working in this way?



1 comment
Comment actions Permalink

When you setup an app server in the module wizard it is automatically added to the dependencies list of the module. However you can do it by hand.
Just open the 'Dependencies' tab of the module settings in 'Project Structure' dialog, click 'Add' button, select 'Library' item and then choose the
server under 'Application Server Libraries' group.

Nikolay Chashnikov
Software Developer
JetBrains, Inc
"Develop with pleasure!"


Please sign in to leave a comment.