You're right. That is why I wrote: 'I don't think you can'... 'maybe you can'...

I never said impossible ;) ;)

Daniel Gibby

Shapira, Yoav wrote:

Howdy,
It wouldn't hurt to read the Context documentation before saying that
it's impossible ;)
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html

You should be able to do what he's trying to do.  Doing it in web.xml
via context-param as you suggest is the spec-compliant, portable, and
therefore preferred way.  I don't know the cause for the original
poster's problem.

Yoav Shapira
Millennium ChemInformatics




-----Original Message-----
From: Daniel Gibby [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 3:07 PM
To: Tomcat Users List
Subject: Re: Parameters from context.xml not being picked up.

I believe the <Parameter line is wrong.

It should be in the format of

<context-param>
<param-name>SyslogConfig</param-name>
<param-value>/usr/local/etc/rr/sales-syslog.xml</param-value>
<description>File containing the Syslog configuration for this
webapp</description>
</context-param>
And this should be in your web.xml... I don't think that you can put


the


parameters into server.xml in the context... maybe you can, but not


that


I know about.

Daniel Gibby

Rick Szeto wrote:



Hi,
I am exploring TC 5.0.18 and found that the <Parameter> are not


being


set to the ServletContext.
Here is my context.xml:
<Context path="/explorer" docBase="explorer" debug="0"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="explorer_log." suffix=".txt" timestamp="true"/>
<Environment name="maxExemptions" type="java.lang.Integer"


value="15"/>


<Parameter name="country" value="Canada" override="false"/>
</Context>

In my InitServlet.init() method, I call:
ServletConfig conf = ..
ServletContext ctx = conf.getServletContext();
String paramValue = ctx.getInitParameter("country");

paramValue is NULL. Is this a know bug/issue? Or am I not doing
somthing right?

Rick Szeto


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to