How to change the context? [message #156076] |
Thu, 12 January 2006 06:16  |
Eclipse User |
|
|
|
Originally posted by: bierwagen.gmx.de
I have got problems with the applicationcontext. Normaly I would place my
parameters like "Resource" or "Realm" in a context file which is placed in
"$TOMCAT_HOME/Catalina/localhost/webappname.xml". But I fail if I try to
use a resource via JNDI in my webapplication. I tried to add the
information manually in the "$Workspace/Servers/Tomcat v5.5 Server @
localhost-config/server.xml" but without success. I just get the message
that my server.xml is corrupt.
Does anybody knows what is to do to enable JNDI-resources with the
webtools?
WTP 1.0
Eclipse 3.1.0
JSDK: 1.5.0.1
WinXP
|
|
|
|
Re: How to change the context? [message #156122 is a reply to message #156076] |
Thu, 12 January 2006 08:05  |
Eclipse User |
|
|
|
It should be possible to add your context configuration to the
"$Workspace/Servers/Tomcat v5.5 Server @ localhost-config/server.xml".
As far as I know, if WTP complains about your changes, then there is
some error in those changes. Can you supply the context configuration
you are trying to add?
There is a risk to putting this directly in server.xml. If you remove
the project from the server, this configuration disappears. If you
later added the project back to the server, you would have to recreate
it. A better alternative is to create a META-INF/context.xml under the
WebContent, or equivalent, directory in your project. When the server
is published, this context configuration will be added to the
"...local-config/server.xml" context element as it is copied to its
runtime location (typically under
" $Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tm p? "). This
way the context configuration is part of your project and will be
included in any Tomcat server you add it to.
Cheers,
Larry
Jörg Bierwagen wrote:
> I have got problems with the applicationcontext. Normaly I would place
> my parameters like "Resource" or "Realm" in a context file which is
> placed in "$TOMCAT_HOME/Catalina/localhost/webappname.xml". But I fail
> if I try to use a resource via JNDI in my webapplication. I tried to add
> the information manually in the "$Workspace/Servers/Tomcat v5.5 Server @
> localhost-config/server.xml" but without success. I just get the message
> that my server.xml is corrupt.
> Does anybody knows what is to do to enable JNDI-resources with the
> webtools?
>
> WTP 1.0
> Eclipse 3.1.0
> JSDK: 1.5.0.1
> WinXP
>
|
|
|
Powered by
FUDForum. Page generated in 0.03217 seconds