Web-Module Application Context

I just setup a web module and did all the definitions. Now some questions arise:
- I define application-context.xml file which defines all resources and the document root. This file is normally deployed to Tomcat webapps directory. Do i have to this before starting Tomcat from Idea or is there a way to configure that.
- I have different configurations (locale / Test / Production) which are generated using Ant at deployment time. Is it possible to generate a Ant script from all the settings made in IDEA or is it possible to include custom actions when building the jar/deploy directory.

Thanks for any help in advance

Reto

3 comments
Comment actions Permalink


"Reto Badertscher" <rbadertscher@swissonline.ch> wrote in message news:14070964.1074034340761.JavaMail.itn@is.intellij.net...

I just setup a web module and did all the definitions. Now some questions arise:
- I define application-context.xml file which defines all resources and the document root. This file is normally deployed to

Tomcat webapps directory. Do i have to this before starting Tomcat from Idea or is there a way to configure that.

You can place the file in a directory and mark it as 'web resource' with relative path '/WEB-INF'. In that case, directory content
will be copied into WEB-INF (inside WAR or exploded directory) during make.

- I have different configurations (locale / Test / Production) which are generated using Ant at deployment time. Is it possible to

generate a Ant script from all the settings made in IDEA or is it possible to include custom actions when building the jar/deploy
directory.

You can setup your ant task to run after make (for ant target select execute on/after compilation).
As to auto generate ant task, this is not supported and is discussible.
There are several possible outcomes:
- provide custom ant task which will do J2EE make based on the IDEA project settings
- provide possibility to embed user ant tasks into J2EE make process at various stages
What others think ?

--
regards,
Alexey Kudravtsev
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Alexey Kudravtsev (JetBrains) wrote:

"Reto Badertscher" <rbadertscher@swissonline.ch> wrote in message news:14070964.1074034340761.JavaMail.itn@is.intellij.net...

>>I just setup a web module and did all the definitions. Now some questions arise:
>>- I define application-context.xml file which defines all resources and the document root. This file is normally deployed to


Tomcat webapps directory. Do i have to this before starting Tomcat from Idea or is there a way to configure that.

You can place the file in a directory and mark it as 'web resource' with relative path '/WEB-INF'. In that case, directory content
will be copied into WEB-INF (inside WAR or exploded directory) during make.


>>- I have different configurations (locale / Test / Production) which are generated using Ant at deployment time. Is it possible to


generate a Ant script from all the settings made in IDEA or is it possible to include custom actions when building the jar/deploy
directory.

You can setup your ant task to run after make (for ant target select execute on/after compilation).
As to auto generate ant task, this is not supported and is discussible.
There are several possible outcomes:
- provide custom ant task which will do J2EE make based on the IDEA project settings
- provide possibility to embed user ant tasks into J2EE make process at various stages
What others think ?


+ 1 on either count. Works for me.

R

0
Comment actions Permalink

>You can place the file in a directory and mark it as 'web resource' with relative path '/WEB-INF'. In that case, directory content
will be copied into WEB-INF (inside WAR or exploded directory) during make.

I thought that this file must be in a directory Tomcat knows about for loading the context?

>You can setup your ant task to run after make (for ant target select execute on/after compilation).

How/where can i specify this? In one project i could use this to run a class enhancer after compilation.

Thanks for your help

Reto Badertscher

0

Please sign in to leave a comment.