Example of a custom {ContextPath}.xml file [message #1143828] |
Fri, 18 October 2013 08:58  |
Eclipse User |
|
|
|
Hello,
We have a servlet that in the past we documented changing the unpacked web.xml file to set custom parameters. In Virgo that solution is unworkable, since we don't have easy access to an unpacked web.xml. I was reading that in order to set a custom context, you need to put a file in the configuration/Catalina/localhost directory named for the servlet context path. If my servlet context path shows in the Virgo bundle as /app then the context file should be app.xml is my understanding. So, being that I'm not much of a servlet designer and have some rather wide gaps in my understanding, thought that just copying the web.xml to app.xml in the proper location would be enough to give me a customizable servlet. But, while I see the file being read in the debug logs, it gives a warning for each element saying that it doesn't understand it.. Actual message is "org.apache.tomcat.util.digester.Digester No rules found matching 'web-app/servlet/init-param'" for every element in the file.
So, I assume I'm missing something that I should just "know", but I don't. Can somebody point out what I'm missing, and the proper format of this context file please?
I have looked through the examples and if its there I've missed it.
I have been seeing that the way that Virgo wants these kind of customizations is with a configuration class supplying beans, but this servlet needs to be able to play nice with any other servlet container, and while we've done some minor changes to produce a jar bundle as well as the normal war, I don't see how switching the configuration to osgi beans would be portable.
Thank you in advance for any advice given....
Bill S.
|
|
|
|
|
|
Re: Example of a custom {ContextPath}.xml file [message #1148556 is a reply to message #1148216] |
Mon, 21 October 2013 11:44  |
Eclipse User |
|
|
|
Violeta Georgieva wrote on Mon, 21 October 2013 06:55Hi,
Quote:
We have a servlet that in the past we documented changing the unpacked web.xml file to set custom parameters. In Virgo that solution is unworkable, since we don't have easy access to an unpacked web.xml. I was reading that in order to set a custom context, you need to put a file in the configuration/Catalina/localhost
You are mixing the things a lot.
What do you mean - web.xml or context.xml.
There is no such feature in Tomcat that web.xml to be copied to configuration/Catalina/localhost. Only the context.xml is copied to that directory.
Thank you, yes I knew I was mixing things up.. Your response plus the other response I believe will be enough to help me unmix things.
|
|
|
Powered by
FUDForum. Page generated in 0.25042 seconds