Yes!  That was perfect.  That hook provided the right solution... I was 
able to provide the dynamic link generation as I wanted based on the 
<param>-s in the maverick file  It's nice because the pages -- or should I 
say the commands -- that require ssl are configured in one place, in the 
mav.xml file.

Many, many thanks for you quick and thoughtful responses to this problem I 
was encountering!
Dan

At 11:28 PM 5/8/02 -0700, Jeff Schnitzer wrote:
>Oh!  Sorry.
>
>I just added a getConfigDocument() method to the Dispatcher, which
>returns the JDOM representation of the current configuration.
>
>You can get access to the Dispatcher by calling:
>
>ServletContext.getAttribute(Dispatcher.MAVERICK_APPLICATION_KEY)
>
>It's a little crude, but it gets you access to maverick.xml, and it's in
>CVS right now :-)
>
>Jeff Schnitzer
>[EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Dan Finkelstein [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 08, 2002 10:58 PM
> > To: Jeff Schnitzer
> > Subject: RE: [Mav-user] Access to maverick.xml
> >
> > This isn't quite what I meant.  What I mean is that from within one
> > controller, I wish to have access to the params of a different
><command>.
> >
> > Here's a more background on my idea...
> >
> > What I'm trying to do is massage the <a> href attribute, for example,
> > according to whether the command that is specified (in the href) is a
> > protected page or not _and_ whether the current page is protected.
>For
> > example, $model.link('login.m') would become https://domain/login.m,
>if
> > I'm
> > not on a secure page, but just login.m if I am.  That massaging would
>be
> > based on a <param> in mav.xml -- allowing me to abstract out the
>protocol
> > from the velocity pages.  As another example, say I'm on a secure page
>and
> > have an link to a non-secure page, by saying $model.link('catalog.m'),
>it
> > would be massaged into http://domain/catalog.m.  But if I'm on a non-
> > secure
> > page, it would be massaged to the same string, catalog.m.
> >
> > Does this make more sense?
> > Dan
> >
> >
> > At 10:27 PM 5/8/02 -0700, you wrote:
> > >I'm assuming you actually have commands to look something like this:
> > >
> > >   <command name="home">
> > >     <controller class="">
> > >       <param name="secure" value="true"/>
> > >     </controller>
> > >     ...
> > >
> > >For this example, have your secure controllers extend from a common
> > >controller that has a bean property "secure"; it will be populated
>just
> > >like the form request parameters.
> > >
> > >However, do you really want to do this?  Is ever the case that the
> > >controller for home would not be secure?  Usually I find it a lot
>more
> > >convenient to have a ControllerProtected base class which secures
> > >things, and a different base class which does not.  It doesn't seem
>like
> > >the kind of thing that changes so often that it needs to be
>configurable
> > >(beyond changing an inheritance relationship).
> > >
> > >Jeff Schnitzer
> > >[EMAIL PROTECTED]
> > >BTW, I've started the refactoring for heterogeneous transforms.
> > >
> > > > -----Original Message-----
> > > > From: Dan Finkelstein [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, May 08, 2002 9:54 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [Mav-user] Access to maverick.xml
> > > >
> > > > Hi --
> > > >
> > > > In my controller, which doesn't extend from ControllerSingleton, I
> > >want to
> > > > be able to pluck out <param> values from a different command.
> > > >
> > > > So, on my velocity page, I might have something like:
> > > >
> > > >       <a href="$model.link('home.m')">Click here</a>
> > > >       <a href="$model.link(''browse.m')">Click here</a>
> > > >
> > > > And in my maverick.xml, I'd have something like
> > > >       <command name="home">
> > > >               <param name="secure" value="true"/>
> > > >               ....
> > > >       <command name="browse">
> > > >               <param name="secure" value="false"/>
> > > >               ....
> > > >
> > > >
> > > > And then in my base controller class, I'd have something like:
> > > >
> > > >       public String getLink(Sring command)
> > > >       {
> > > >               boolean secure = getSecureValueFromCommand(command);
> > > >
> > > >               // and something sort of like this...
> > > >               if(secure)
> > > >                       return "https://...."; + command;
> > > >               else
> > > >                       return command
> > > >       }
> > > >
> > > >
> > > > I'm been pulling by hair out trying to figure out how to write the
> > > > getSecureValueFromCommand() method.  I'm totally stumped.  I guess
> > >that
> > > > maverick.xml is parsed and stored as objects, such as
>Command-extended
> > > > objects.  I know with ControllerSingleton, this would be "trivial"
> > >problem
> > > > because a variable "params" stores exactly what I need.  Should
>there
> > >be a
> > > > similar init() method called with non-singleton controllers to
>give us
> > >a
> > > > chance to save this data?
> > > >
> > > > Thanks for any ideas...
> > > > Dan
> > > >
> > > >
> > > > _______________________________________________________________
> > > >
> > > > Have big pipes? SourceForge.net is looking for download mirrors.
>We
> > >supply
> > > > the hardware. You get the recognition. Email Us:
> > >[EMAIL PROTECTED]
> > > > _______________________________________________
> > > > Mav-user mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/mav-user
> > >
> > >_______________________________________________________________
> > >
> > >Have big pipes? SourceForge.net is looking for download mirrors. We
> > supply
> > >the hardware. You get the recognition. Email Us:
> > [EMAIL PROTECTED]
> > >_______________________________________________
> > >Mav-user mailing list
> > >[EMAIL PROTECTED]
> > >https://lists.sourceforge.net/lists/listinfo/mav-user
>
>
>_______________________________________________________________
>
>Have big pipes? SourceForge.net is looking for download mirrors. We supply
>the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
>_______________________________________________
>Mav-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/mav-user


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Mav-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mav-user

Reply via email to