Example of a custom {ContextPath}.xml file [message #1143828] |
Fri, 18 October 2013 12:58 |
William Suetholz Messages: 5 Registered: October 2013 |
Junior Member |
|
|
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.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03240 seconds