Looking through the cvs history (ain't it grand) I see that
Dispatcher.MAVERICK_APPLICATION_KEY was changed on Feb 12, 2003 from
"maverickApplicationKey" to "mav.dispatcher". You might look in your derived
dispatcher and make sure that you are referencing the constant and not using
the string "maverickApplicationKey" directly when storing the attribute.

--jim

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pierre de Soyres
Sent: Wednesday, November 26, 2003 12:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [Mav-user] OS dependent while retrieving Dispatcher : the right
message

i made some more logs :

System.out.println(Dispatcher.MAVERICK_APPLICATION_KEY);

-> mav.dispatcher

System.out.println(this.getCtx().getServletContext().getAttribute(Dispatcher
.MAVERICK_APPLICATION_KEY));

-> null

Enumeration enum = this.getCtx().getServletContext().getAttributeNames();
while (enum.hasMoreElements()) {
        String o = (String) enum.nextElement();
        System.out.println(o);
}

->
org.apache.catalina.jsp_classpath
javax.servlet.context.tempdir
maverickApplicationKey
org.apache.catalina.resources
org.apache.catalina.Registry
org.apache.catalina.MBeanServer
org.apache.catalina.WELCOME_FILES


We can see that there is the "maverickApplicationKey" attribute name 
(instead of "mav.dispatcher")

Pierre

On Wed, 26 Nov 2003 09:38:51 -0000, jim moore <[EMAIL PROTECTED]> wrote:

> This sounds really odd to me. Have you tried adding a log message or
> stepping through with a debugger to inspect the value of
> Dispatcher.MAVERICK_APPLICATION_KEY at runtime. It sounds like this 
> value is
> getting lost somewhere...
>
> --jim
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Pierre de 
> Soyres
> Sent: Wednesday, November 26, 2003 7:57 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Mav-user] OS dependent while retrieving Dispatcher : the 
> right
> message
>
> Hello,
>
> My own AdminDispatcher extends org.infohazard.maverick.Dispatcher. it
> overrides the init(ServletConfig) method (from GenericServlet)
> in order to set some init-parameters values.
>
> In my controller, (that extends
> org.infohazard.maverick.ctl.ThrowawayBean2), the code :
>       
>
this.getCtx().getServletContext().getAttribute(Dispatcher.MAVERICK_APPLICATI
> ON_KEY);
> returns null;
> But the code :
>       
> this.getCtx().getServletContext().getAttribute("maverickApplicationKey");
> returns my AdminDispatcher
>
> under linux, with the same code,
>       
>
this.getCtx().getServletContext().getAttribute(Dispatcher.MAVERICK_APPLICATI
> ON_KEY);
> works fine.
>
> On Tue, 25 Nov 2003 13:28:54 -0800, Schnitzer, Jeff <[EMAIL PROTECTED]>
> wrote:
>
>> Are you sure you have the exact same versions of everything?
>>
>> When you say "doesn't work" do you mean the value you get is null?
>>
>> If this is really happening, it would be a bug in your container.  What
>> container?
>>
>> 3jeff
>>
>>> -----Original Message-----
>>> From: Pierre de Soyres [mailto:[EMAIL PROTECTED]
>>> Sent: Monday, November 24, 2003 5:49 AM
>>> To: [EMAIL PROTECTED]
>>> Subject: [Mav-user] OS dependent while retrieving Dispatcher : the
>> right
>>> message
>>>
>>> Hello,
>>>
>>> (Sorry for the last message that contained mistakes)
>>>
>>> I saw a strange comportment while retrieving the Dispatcher :
>>>
>>> -> Under Windows XP, this code doesn't work (but it should) and i
>> still
>>> can't understand why :
>>> protected Dispatcher getDispatcher() {
>>> return
>>>
>> (Dispatcher)this.getCtx().getServletContext().getAttribute(Dispatcher.MA
>> VE
>>> RICK_APPLICATION_KEY);
>>> }
>>>
>>> -> but this one works fine (which tooks me a long time before finding
>> it)
>>> :
>>> protected Dispatcher getDispatcher() {
>>> return
>>>
>> (Dispatcher)this.getCtx().getServletContext().getAttribute("maverickAppl
>> ic
>>> ationKey");
>>> }
>>>
>>>
>>> -> Under linux : the right one works fine :
>>> protected Dispatcher getDispatcher() {
>>> return
>>>
>> (Dispatcher)this.getCtx().getServletContext().getAttribute(Dispatcher.MA
>> VE
>>> RICK_APPLICATION_KEY);
>>> }
>>>
>>> Strange ! isn't it !!
>>> Any idea ?
>>>
>>> Thanks.
>>>
>>> -------------------
>>> Pierre de Soyres
>>>
>>>
>>>
>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>>> Les informations contenues dans ce courrier electronique et dans les
>>> fichiers
>>> qui y sont attachees sont confidentielles et peuvent etre protegees
>>> legalement.
>>> Elles ne sont adressees qu'au destinataire. L'acces a ce courrier
>>> electronique
>>> par toute autre personne n'est pas autorise. Si vous n'etes pas le
>>> destinataire voulu, toute divulgation, copie ou diffusion de ce
>> courrier
>>> electronique est interdite et peut etre illegale.
>>> Sauf mention contraire dans le corps du message, la presence de cette
>> note
>>> prouve egalement que ce message electronique a ete verifie par un
>> logiciel
>>> anti-virus.
>>>
>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>>> This email and any attached file are confidential and intended solely
>> for
>>> the use of the individual or entity to whom they are addressed.
>>> Accessing this email by anyone else than the recipient is forbidden
>> and
>>> may
>>> be illegal.
>>> If you received this email by error please notify the system
>>> administrator.
>>> This footnote also confirms that this message has been scanned by an
>> anti-
>>> virus
>>> software.
>>>
>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>>>
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.net email is sponsored by: SF.net Giveback Program.
>>> Does SourceForge.net help you be more productive?  Does it
>>> help you create better code?  SHARE THE LOVE, and help us help
>>> YOU!  Click Here: http://sourceforge.net/donate/
>>> [INVALID FOOTER]
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: SF.net Giveback Program.
>> Does SourceForge.net help you be more productive?  Does it
>> help you create better code?  SHARE THE LOVE, and help us help
>> YOU!  Click Here: http://sourceforge.net/donate/
>> [INVALID FOOTER]
>>
>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>> Les informations contenues dans ce courrier electronique et dans les
>> fichiers
>> qui y sont attachees sont confidentielles et peuvent etre protegees
>> legalement.
>> Elles ne sont adressees qu'au destinataire. L'acces a ce courrier
>> electronique
>> par toute autre personne n'est pas autorise. Si vous n'etes pas le
>> destinataire voulu, toute divulgation, copie ou diffusion de ce courrier
>> electronique est interdite et peut etre illegale.
>> Sauf mention contraire dans le corps du message, la presence de cette
>> note
>> prouve egalement que ce message electronique a ete verifie par un
>> logiciel
>> anti-virus.
>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>> This email and any attached file are confidential and intended solely 
>> for
>> the use of the individual or entity to whom they are addressed.
>> Accessing this email by anyone else than the recipient is forbidden and
>> may
>> be illegal.
>> If you received this email by error please notify the system
>> administrator.
>> This footnote also confirms that this message has been scanned by an
>> anti-virus
>> software.
>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>>
>
>
>



-- 
------------------------------------------
Pierre de Soyres
Ing�nieur d'�tudes

e-Manation
14 Bd du Mar�chal Juin
44100 Nantes
FRANCE

Tel: +33 (0)2 40 43 06 11
Fax: +33 (0)2 40 43 30 02
www.e-manation.com
------------------------------------------


*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Les informations contenues dans ce courrier electronique et dans les
fichiers
qui y sont attachees sont confidentielles et peuvent etre protegees
legalement.
Elles ne sont adressees qu'au destinataire. L'acces a ce courrier
electronique
par toute autre personne n'est pas autorise. Si vous n'etes pas le
destinataire voulu, toute divulgation, copie ou diffusion de ce courrier
electronique est interdite et peut etre illegale.
Sauf mention contraire dans le corps du message, la presence de cette note
prouve egalement que ce message electronique a ete verifie par un logiciel
anti-virus.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
This email and any attached file are confidential and intended solely for
the use of the individual or entity to whom they are addressed.
Accessing this email by anyone else than the recipient is forbidden and may
be illegal.
If you received this email by error please notify the system administrator.
This footnote also confirms that this message has been scanned by an
anti-virus
software.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
[INVALID FOOTER]



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
[INVALID FOOTER]

Reply via email to