Deploying JNDI datasource with Tomcat 5.x and IDEA 4.5

I have a web application that requires a JNDI data datasource. I have a resource-ref element in the web.xml but I need a way to tell IDEA to create the resource under the correct context when it deploys the application.

I can do this using NetBeans 4.1 (where I originally developed the application) but I am trying to move to IDEA. Any suggestions as to how this can be done?

2 comments
Comment actions Permalink

Hello Clark,

I have a web application that requires a JNDI data datasource. I have
a resource-ref element in the web.xml but I need a way to tell IDEA to
create the resource under the correct context when it deploys the
application.

I can do this using NetBeans 4.1 (where I originally developed the
application) but I am trying to move to IDEA. Any suggestions as to
how this can be done?


You have to define all datasources and additional options in the file
named for your context. For instance, define all the options in
mycontext.xml file placed into ]]>/conf/Catalina/localhost
directory, then choose 'mycontext' context in the deployment settings
in the Tomcat Run/Debug configuration. IDEA will take your
mycontext.xml file, change some necessary settings and put it into the
temporary directory used when launching your web application.

--
Serge Baranov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Sorry for the delay in my response but I wanted to thank you. Your advice worked perfectly and your response was extremely quick. Thanks again!

0

Please sign in to leave a comment.