cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhir reddy <sud00...@yahoo.com>
Subject RE: Authentication problem cocoon 2.1.2
Date Tue, 02 Mar 2004 10:51:31 GMT
hi all,

i have created  handlers after that i have tried to
use  
login 

 <!-- Try to log in an admin. -->
    <map:match pattern="adminLogin">
        <map:act type="auth-login">
          <map:parameter name="handler"
value="adminAuthHandler"/>
          <map:parameter name="parameter_userName" 
		value="{request-param:userName}"/>
          <map:parameter name="parameter_password" 
value="{request-param:password}"/>

          <map:read src="myapp/authSuccessful.html"/>
        </map:act>

        <!-- Authentication failed -->
        <map:read src="myapp/authFailed.html"/>
    </map:match>

when i'm refreshing my page i'm getting this error
Internal Server Error

Message: Failed to execute pipeline.

org.apache.avalon.framework.configuration.ConfigurationException:
Type 'auth-login' is not defined for 'act'

please any one can help i have missed out anything?

Advance thanks

rgds
sudhi

--- Jean-Luc Mathieu <jean-luc.mathieu@virtualys.com>
wrote:
> Yes, i had already thought about it, but i can't
> access to Cocoon environment -
> i wanted to get access to action parameters for
> instance. Perhaps if I pool the
> action, is there a method that is run only once,
> like an
> init-before-saved-object-in-the-pool method ? I have
> to search more in Avalon
> framework I think ...
> 
> > -----Message d'origine-----
> > De : news [mailto:news@sea.gmane.org] De la part
> de Jorg Heymans
> > Envoyé : mardi 2 mars 2004 11:00
> > À : users@cocoon.apache.org
> > Objet : Re: Sub-sitemap static initialization
> > 
> > how about using a static initializer block in the
> action ?
> > 
> > ie
> > class mybla extends action
> > static{
> > //your stuff gets executed only once when the
> class is loaded
> > 
> > }
> > 
> > You can then have different actions for different
> subsitemaps.
> > 
> > it's a bit of a bodge but could do the trick here.
> > 
> > 
> > Jean-Luc Mathieu wrote:
> > 
> > > I'm new to this mailing list (and Cocoon), I
> didn't new this expression,
> > but it
> > > sounds great ! I will print it and put it on the
> wall in front of me .. :-D
> > >
> > > In fact, I have to run a static method in a
> class which configure my
> > > application. This method must be run once,
> before some sub-sitemaps that
> > use
> > > initialized data run. So the operations are :
> > >
> > > - Cocoon starts
> > > - A user requests a page that is served by a
> sub-sitemap, say
> > /cocoon/sub1/...
> > > - The init static method is run
> > > - The page is built and served
> > > - Another user request a page in the same
> sub-sitemap (/cocoon/sub1/...)
> > > - The page is directly built and served
> > > ...
> > >
> > > One way to do it is to initialize all data in
> the init process of the
> > > CocoonServlet, but I have to override
> CocoonServlet, and i lose sitemap
> > > hierarchy and scalability - but it works. Second
> way is what
> > > Unico said, but the action is always run, not
> only the first time the
> > > sub-sitemap is mounted - it can become a
> potential performance bottleneck.
> > I'm
> > > sure there is a lot of other ways to do it ...
> > >
> > > Regards,
> > > JL
> > >
> > >
> > >>-----Message d'origine-----
> > >>De : news [mailto:news@sea.gmane.org] De la part
> de Jorg Heymans
> > >>Envoyé : mardi 2 mars 2004 10:04
> > >>À : users@cocoon.apache.org
> > >>Objet : Re: Sub-sitemap static initialization
> > >>
> > >>Can you explain your use-case a bit more?
> Remember TUIMTOWTDIIC
> > >>- there usually is more than one way to do it in
> Cocoon :)
> > >>Jean-Luc Mathieu wrote:
> > >>
> > >>
> > >>>Hmm, I tested it, and you're right. Finally,
> it's not completely what I
> > >>
> > >>wanted
> > >>
> > >>>to do. Any other ideas ?
> > >>>
> > >>>
> > >>>
> > >>>>-----Message d'origine-----
> > >>>>De : news [mailto:news@sea.gmane.org] De la
> part de Jorg Heymans
> > >>>>Envoyé : mardi 2 mars 2004 08:47
> > >>>>À : users@cocoon.apache.org
> > >>>>Objet : Re: Sub-sitemap static initialization
> > >>>>
> > >>>>
> > >>>>
> > >>>>>One thing I can think of that you could do is
> to wrap your sitemap mount
> > >>>>>with an action.
> > >>>>>
> > >>>>>The mounting sitemap:
> > >>>>>
> > >>>>><map:match pattern="blah/**">
> > >>>>> <map:act type="initscript">
> > >>>>>   <map:mount src="sitemap" uri-prefix="blah"
> />
> > >>>>> </map:act>
> > >>>>></map:match>
> > >>>>>
> > >>>>How does the above guarantee that the action
> is only run once?
> > >>>>Subsequent requests to blah/whatever from
> different users will run the
> > >>>>action again IMO, unless there is something in
> the action that knows it
> > >>>>has been run once.
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>>The initscript would execute the script only
> once.
> > >>>>>
> > >>>>>Hope that helps,
> > >>>>>Unico
> > >>>>>
> > >>>>>Jean-Luc Mathieu wrote:
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>>Hello !
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>I have to launch an init script (a Java
> piece of program) at Cocoon
> > >>>>>>startup
> > >>>>>>(more precisely on the time the first user
> to connect requests a
> > specific
> > >>>>>>sub-sitemap). Is it a simple way to do this
> using for example sitemaps
> > >>>>>>only, or
> > >>>>>>I have to override CocoonServlet ?
> > >>>>>>Thank you in advance.
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>Jean-Luc
> > >>>>>>
> > >>>>>>
> > >>>>
> > >>>>
> >
>
>>>>---------------------------------------------------------------------
> > >>>>To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> > >>>>For additional commands, e-mail:
> users-help@cocoon.apache.org
> > >>>
> > >>>
> > >>
> >
>
>>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> > >>For additional commands, e-mail:
> users-help@cocoon.apache.org
> > >
> > >
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> users-help@cocoon.apache.org
> > 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message