Costin,
If one does define a context in apps-XXXX.xml can one sent context-param tags in it
that are then accessible as part of that ServletContext?
More generally, can anything from webl.xml be put in server.xml inside a Context tag's
scope?
See for example the context-param below where this file is an apps-XXXX.xml that is in
the conf directory. Is this legal and will it work when one does a getInitParameter in
a doPost below?
If one does this and it works then a further question: Suppose the web.xml defines the
pdf-out-path and then the server.xml/apps-XXXX.xml redefines it again for the same
context. Will the
latter value _replace_ the former value?
<?xml version="1.0" encoding="ISO-8859-1"?>
<webapps>
<!-- Setting special properties for /examples
( as an example of overriding the defaults )
-->
<Context path="/strutsdoc"
docBase="webapps/struts-documentation"
debug="0"
reloadable="true" >
<SimpleRealm filename="conf/users/strutsdoc-users.xml" />
<LogSetter name="strutsdoc_tc.log" path="logs/strutsdoc.log" />
<LogSetter name="strutsdoc_servlet_log"
path="logs/servlet_strutsdoc.log"
servletLogger="true"/>
<context-param>
<param-name>pdf-out-path</param-name>
<param-value>\reports\graphics\</param-value>
</context-param>
</Context>
Then in a doPost do:
String PdfOutPath = this.getServletContext().getInitParameter("pdf-out-path");
javax.servlet.ServletConfig.getServletContext();
javax.servlet.jsp.PageContext
On Sun, 5 Aug 2001 00:30:03 -0700 (PDT), [EMAIL PROTECTED] wrote:
>I believe the behavior is correct - you have 2 contexts with the same
>docbase ( one defined in a config file, one automatically ). They are
>completely independent of each other ( you can look into work and you'll
>see one work dir for each ). If you write a simple test servlet, you'll
>see the 2 contexts have different ServletContext objects, and behave like
>2 separate webapps.