You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Justin Fagnani <ju...@fagnani.com> on 2005/07/07 15:33:11 UTC

Using Cocoon's build system for my webapp

Hello Cocoon'ers,

It's been a long while since I've done any Cocoon work. I've been playing with 
the new (to me) build system and so far I like it. I've been able to easily 
pair down the build with the local blocks and build properties.

Now I want to start setting up the sitemap and writing some custom components. 
I'd like to use the current build system but I'm getting some errors. Maybe 
it's not the right way to do it, but so far I haven't seen any documentation 
on what the suggested build setup is.

First I figured I'd edit the sitemap in src/webapp. I removed some unneeded 
matchers and quickly got errors with confpatch, specifically mount-table. I 
added back the api section to the sitemap just to get going, but I wonder 
what the correct solution is.

Should I create my own target xml file? Should I remove mount-table.xmap from 
src/confpatch ?

My second issue has to do with components. I want to wrap an object as an 
Avalon component and have it instantiated when Cocoon is launched. Before I 
did this with a user.roles file and editing cocoon.xconf. I went to the 
documentation to make sure I remembered how to do it, but I couldn't find 
much, just one reference to creating a my.roles file. To use the build system 
would I just put my.roles in the src/webapp/WEB-INF directory?

My big concern is that it'll be difficult to upgrade when a new version of 
Cocoon comes out. On the other hand I've created a nice minimal Cocoon setup, 
but I might need more blocks later. I like the idea of being able to edit 
local.blocks.properties and get the blocks I need, and then rebuild my whole 
webapp.

Any suggestions or advice would be greatly appreciated.

Thanks,
  Justin


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


Re: Using Cocoon without XSPs

Posted by Antonio Gallardo <ag...@agssa.net>.
On Jue, 20 de Enero de 2005, 15:35, Oleg Konovalov dijo:
> Hi,
>
> I am Cocoon newbie, trying to reverse-engineer
> several Cocoon [2.0.4] apps written in 2002-2003
> (original developers long gone, nobody around ever
> worked with Cocoon). Deployed on JBoss 3.0.7.
>
> Learning from "Cocoon Developer's Handbook" by Mocsar/Aston,
> it looks like all Cocoon apps have to use XSP logicsheets.
> However, there is absolutely no XSPs in these apps,
> only Project.xmap, XSL, Java, XML, HTML, some SQL files.
>
> Was XSP introduced in Cocoon 2?
> How do you develop with Cocoon without XSPs ?
>
> Judging by Java packages, it had Acting, Generation, Selection,
> Tasks, Transformation, Data and Util.
> And most SQL things are done in XSL/XML files.
> There are tons on XSLs (under XSLT).
>  Is that what was used before/instead of XSPs ?
>
> Are there any resources describing Cocoon development
> without XSPs ?

Yep, there is:

http://www.amazon.com/exec/obidos/ASIN/0735712352/

from the "Masters": Carsten Ziegeler and Matthew Langham. ;-)

Really very good!

Best Regards,

Antonio Gallardo


>
>
> Thank you in advance,
> Oleg.
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Using Cocoon without XSPs

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Oleg Konovalov wrote:

> Are there any resources describing Cocoon development
> without XSPs ?

XSP and actions are not recommended for new development. study
http://cocoon.apache.org/2.1/userdocs/flow/index.html

-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org


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


Re: Access to the app root only

Posted by Ugo Cei <ug...@apache.org>.
Il giorno 09/giu/05, alle 23:37, Oleg Konovalov ha scritto:

> How do I restrict access to the root only ?

I don't think it's possible using container-based authentication.

	Ugo

-- 
Ugo Cei
Tech Blog: http://agylen.com/
Open Source Zone: http://oszone.org/
Wine & Food Blog: http://www.divinocibo.it/

Re: Access to user role

Posted by Oleg Konovalov <ol...@yahoo.com>.
I just checked: on that non-initial page (xslt/common.xsl) the
value of variable isUser is an empty string.

What is that:
/root/secure:securityProfile/secure:roles/secure:role[.="mbr-user"]'
  ?
Is that a page parameter, securityProfile or retrieved from the
database?  Any pointers ?

I am new to Cocoon and XSLT.

Thank you in advance,
Oleg.

--- Oleg Konovalov <ol...@yahoo.com> wrote:

> Hi,
> 
> I am modifying somebody else's Cocoon application.
> I need to disallow users with some specific role
> to see certain parts of the screen (pseudo-menu).
> 
> An existing mechanism for that is:
> <xsl:variable name='isUser'
>
select='/root/secure:securityProfile/secure:roles/secure:role[.="mbr-user"]'/>
> 
> ...
> 
> <xsl:if test='not($isUser)'> 	
>   <td><a href="sil/main_sil" target="_parent"> 
>     <img src="images/common/sitenav.gif" width="114"
> height="45"
> border="0" /></a></td>
> </xsl:if>	
> 
> That "mbr-user" role is configured in web.xml & database,
> the user has this role [defined in the database].
> 
> That seems to work on initial page [index.xsl],
> but doesn't work on subsequent pages (in another folder).
> 
> Any clues why it doesn't and how to fix that?
> (everything else works fine)
> 
> Thank you in advance,
> Oleg.
> 
> --- Oleg Konovalov <ol...@yahoo.com> wrote:
> 
> > Hi,
> > 
> > I am trying to configure my Cocoon application
> > so that particular role has access only to
> > the app root [login.xsl, index.xsl]
> > but not to other directories.
> > 
> > But is seems that as soon as I put "/" or "/*",
> > it gets access to all directories under the root.
> > 
> > Snippet from web.xml:
> > <security-constraint>
> >      <web-resource-collection>
> >         <web-resource-name>App Root only</web-resource-name>
> > 	<url-pattern>/*</url-pattern>
> >      </web-resource-collection>
> >      <auth-constraint>	
> > 	<role-name>role1</role-name>	
> >      </auth-constraint>
> >   </security-constraint>
> > 
> > How do I restrict access to the root only ?
> > 
> > 
> > Thank you in advance,
> > Oleg.
> > 
> >
>
---------------------------------------------------------------------
> > 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


Access to user role

Posted by Oleg Konovalov <ol...@yahoo.com>.
Hi,

I am modifying somebody else's Cocoon application.
I need to disallow users with some specific role
to see certain parts of the screen (pseudo-menu).

An existing mechanism for that is:
<xsl:variable name='isUser'
select='/root/secure:securityProfile/secure:roles/secure:role[.="mbr-user"]'/>

...

<xsl:if test='not($isUser)'> 	
  <td><a href="sil/main_sil" target="_parent"> 
    <img src="images/common/sitenav.gif" width="114" height="45"
border="0" /></a></td>
</xsl:if>	

That "mbr-user" role is configured in web.xml & database,
the user has this role [defined in the database].

That seems to work on initial page [index.xsl],
but doesn't work on subsequent pages (in another folder).

Any clues why it doesn't and how to fix that?
(everything else works fine)

Thank you in advance,
Oleg.

--- Oleg Konovalov <ol...@yahoo.com> wrote:

> Hi,
> 
> I am trying to configure my Cocoon application
> so that particular role has access only to
> the app root [login.xsl, index.xsl]
> but not to other directories.
> 
> But is seems that as soon as I put "/" or "/*",
> it gets access to all directories under the root.
> 
> Snippet from web.xml:
> <security-constraint>
>      <web-resource-collection>
>         <web-resource-name>App Root only</web-resource-name>
> 	<url-pattern>/*</url-pattern>
>      </web-resource-collection>
>      <auth-constraint>	
> 	<role-name>role1</role-name>	
>      </auth-constraint>
>   </security-constraint>
> 
> How do I restrict access to the root only ?
> 
> 
> Thank you in advance,
> Oleg.
> 
>
---------------------------------------------------------------------
> 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


Access to the app root only

Posted by Oleg Konovalov <ol...@yahoo.com>.
Hi,

I am trying to configure my Cocoon application
so that particular role has access only to
the app root [login.xsl, index.xsl]
but not to other directories.

But is seems that as soon as I put "/" or "/*",
it gets access to all directories under the root.

Snippet from web.xml:
<security-constraint>
     <web-resource-collection>
        <web-resource-name>App Root only</web-resource-name>
	<url-pattern>/*</url-pattern>
     </web-resource-collection>
     <auth-constraint>	
	<role-name>role1</role-name>	
     </auth-constraint>
  </security-constraint>

How do I restrict access to the root only ?


Thank you in advance,
Oleg.

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


RE: Using Cocoon's build system for my webappThanks Ada,

Posted by Adam Ratcliffe <ad...@mrigitech.com>.
Hi Justin

Your component doesn't need to be a singleton, unless you want it to be, in
which
case it should implement the Avalon
org.apache.avalon.framework.thread.ThreadSafe interface.

My understanding is that the container (ECM) pools component instances, with
the pool
parameters configurable in cocoon.xconf. Maybe someone who is more familiar
with Cocoon
internals can give you some more pointers on pool configuration, to date I
haven't had any
problems with running with the system defaults.

The example I gave of looking up a component was using the flowscript
syntax. If you haven't
already read about flow it fulfils the controller role in cocoon MVC
applications, see
http://cocoon.apache.org/2.1/userdocs/flow/index.html. The sitemap matches
URIs to top-level
functions in the flow layer which in turn typically delegate business
functions to Java objects.

If you wanted to lookup your Avalon component from another component such as
a customer generator
you would use this syntax:

MyComponent comp =
(MyComponent)this.serviceManager.lookup(MyComponent.ROLE);

In this example your sitemap component would need to implement the
org.apache.avalon.framework.service.Servicable
interface so that it would be provided with a reference to the
ServiceManager when it was
instantiated.

As you may know the Avalon project has been closed, I believe some of the
docs have since been posted
to the Apache Excalibur site.

Cheers
Adam

-----Original Message-----
From: Justin Fagnani [mailto:justin3@fagnani.com]
Sent: Friday, 8 July 2005 2:36 a.m.
To: users@cocoon.apache.org
Subject: Re: Using Cocoon's build system for my webappThanks Ada,


Thanks Adam,

You answered most of my questions.

The only thing left (assuming I understand the wiki docs) is that the
component I'm setting up need to be a singleton instantiated when Cocoon
launches.

I remember using a ComponentManager to get my components. I didn't use XSP
much though, so I'm wondering if this:

> var myComp = cocoon.getComponent(Packages.com.example.MyComponent.ROLE);

Is how I would do it inside a Generator, or if that's maybe XSP specific. Is
the cocoon object now passed to pipeline components through the objectModel?

Also, I need to make sure that the instance I get is the same that was
created
at launch time. This is setup in the sitemap, right?

Ahh, knockin the rust off.

Thanks again,
  Justin

On Thursday 13 January 2005 19:05, Adam Ratcliffe wrote:
> Hi Justin
>
> The Cocoon wiki has some good resources on tailoring the Cocoon webapp and
> developing your project
> against it, see http://wiki.apache.org/cocoon/YourCocoonBasedProjectAnt16
> and http://wiki.apache.org/cocoon/ProjectBuilding
>
> The first doc has a link to an Ant build script that will help with
setting
> up a directory structure
> that decouples your project's resources from the cocoon source tree, and
> targets for patching the
> cocoon configuration files with your project's specific configuration.
>
> I've successfully used this approach to upgrade a webapp from the 2.1.5 to
> 2.1.6 release.
>
> If you're already familiar with developing Avalon components for Cocoon
> deploying them is
> not too difficult.  Briefly:
>
> - Create your component roles file e.g.
>
> <role-list>
>   <role name="com.example.MyComponent"
> 	shorthand="myComp"
> 	default-class="com.example.MyComponent"/>
> ...
> </role-list>
>
> - Register these with Cocoon by adding a 'user-roles' attribute to the
root
> element in cocoon.xconf
>
> <cocoon user-roles="my.roles">
>
> - The component's lifecycle methods will be invoked when you
lookup/release
> the component, for example
> in flowscript:
>
> var myComp = cocoon.getComponent(Packages.com.example.MyComponent.ROLE);
>
> HTH
> Adam
>
>
>
>
>
> -----Original Message-----
> From: Justin Fagnani [mailto:justin3@fagnani.com]
> Sent: Friday, 8 July 2005 1:33 a.m.
> To: users@cocoon.apache.org
> Subject: Using Cocoon's build system for my webapp
>
>
> Hello Cocoon'ers,
>
> It's been a long while since I've done any Cocoon work. I've been playing
> with
> the new (to me) build system and so far I like it. I've been able to
easily
> pair down the build with the local blocks and build properties.
>
> Now I want to start setting up the sitemap and writing some custom
> components.
> I'd like to use the current build system but I'm getting some errors.
Maybe
> it's not the right way to do it, but so far I haven't seen any
> documentation on what the suggested build setup is.
>
> First I figured I'd edit the sitemap in src/webapp. I removed some
unneeded
> matchers and quickly got errors with confpatch, specifically mount-table.
I
> added back the api section to the sitemap just to get going, but I wonder
> what the correct solution is.
>
> Should I create my own target xml file? Should I remove mount-table.xmap
> from
> src/confpatch ?
>
> My second issue has to do with components. I want to wrap an object as an
> Avalon component and have it instantiated when Cocoon is launched. Before
I
> did this with a user.roles file and editing cocoon.xconf. I went to the
> documentation to make sure I remembered how to do it, but I couldn't find
> much, just one reference to creating a my.roles file. To use the build
> system
> would I just put my.roles in the src/webapp/WEB-INF directory?
>
> My big concern is that it'll be difficult to upgrade when a new version of
> Cocoon comes out. On the other hand I've created a nice minimal Cocoon
> setup,
> but I might need more blocks later. I like the idea of being able to edit
> local.blocks.properties and get the blocks I need, and then rebuild my
> whole webapp.
>
> Any suggestions or advice would be greatly appreciated.
>
> Thanks,
>   Justin
>
>
> ---------------------------------------------------------------------
> 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


ErrorHandler problem

Posted by Oleg Konovalov <ol...@yahoo.com>.
Hi,

I am deploying a bunch of Cocoon 2.04 apps
on JBoss 3.0.7/Tomcat 4.1.24 [& Apache 2.0.48] on Solaris 9.

Everything works fine, but when the server
is starting, getting the following errors in the console:

...
16:23:13,302 INFO  [XMLLoginConfig] Starting
16:23:13,385 ERROR [STDERR] Warning: validation was turned on
but an org.xml.sax.ErrorHandler was not
16:23:13,386 ERROR [STDERR] set, which is probably not what is
desired.  Parser will use a default
16:23:13,387 ERROR [STDERR] ErrorHandler to print the first 10
errors.  Please call
16:23:13,387 ERROR [STDERR] the 'setErrorHandler' method to fix
this.
16:23:13,387 ERROR [STDERR] Error: URI=null Line=140: Element
"authentication" does not allow "module-option"
here.
16:23:13,388 ERROR [STDERR] Error: URI=null Line=141: Element
"authentication" does not allow "module-option"
here.
16:23:13,389 ERROR [STDERR] Error: URI=null Line=142: Element
"authentication" does not allow "module-option"
here.
16:23:13,407 INFO  [XMLLoginConfig] Started
....

Is that a Cocoon or JBoss problem ?
[seem to be coming from Xerces JAR]

It doesn't seem to be harmful, but I would like
to get rid of it. 
It happens on our testing server,
but not in production  ;-)

Any help is very appreciated.

Thank you,
Oleg.


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


Re: Using Cocoon without XSPs

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 20 janv. 05, à 22:35, Oleg Konovalov a écrit :

> ...Are there any resources describing Cocoon development
> without XSPs ?..

I'm going to throw my usual "have a look at the supersonic tour" line 
here ;-)

To run it you need to install a recent version of Cocoon (which is 
really easy, just follow INSTALL.TXT in the distribution), start it and 
go to the "samples / blocks with samples" page.

The tour will give you a quick overview of how to use Cocoon today, it 
should give you a good starting point, but your mileage may of course 
vary depending on what your application does and how it's built.

HTH
-Bertrand

Re: Using Cocoon without XSPs

Posted by Ralph Goers <Ra...@dslextreme.com>.
Oleg Konovalov wrote:

>Hi,
>
>I am Cocoon newbie, trying to reverse-engineer
>several Cocoon [2.0.4] apps written in 2002-2003
>(original developers long gone, nobody around ever
>worked with Cocoon). Deployed on JBoss 3.0.7.
>
>Learning from "Cocoon Developer's Handbook" by Mocsar/Aston,
>it looks like all Cocoon apps have to use XSP logicsheets.
>However, there is absolutely no XSPs in these apps,
>only Project.xmap, XSL, Java, XML, HTML, some SQL files.
>
>Was XSP introduced in Cocoon 2?
>How do you develop with Cocoon without XSPs ?
>
>Judging by Java packages, it had Acting, Generation, Selection,
>Tasks, Transformation, Data and Util.
>And most SQL things are done in XSL/XML files.
>There are tons on XSLs (under XSLT). 
> Is that what was used before/instead of XSPs ?
>
>Are there any resources describing Cocoon development
>without XSPs ?
>
>
>Thank you in advance,
>Oleg.
>  
>
The Cocoon developer's handbook is a good book but very out of date.  
XSP's are similar to JSPs and have many of the same problems.  The use 
of XSPs is not recommended in version 2.1 as their are better ways of 
getting work done.  The recommended approach is to use business objects 
in conjunction with flowscript of javaflow.  There is actually quite a 
bit of information on this at the Cocoon web site, on the wiki and even 
in a few published articles.

Having said all that, if you have an app developed in 2.0.4 it should be 
converted to 2.1 fairly easily. The biggest change is that classes that 
implement Composable must be converted to implement Serviceable instead.

HTH
Ralph

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


Using Cocoon without XSPs

Posted by Oleg Konovalov <ol...@yahoo.com>.
Hi,

I am Cocoon newbie, trying to reverse-engineer
several Cocoon [2.0.4] apps written in 2002-2003
(original developers long gone, nobody around ever
worked with Cocoon). Deployed on JBoss 3.0.7.

Learning from "Cocoon Developer's Handbook" by Mocsar/Aston,
it looks like all Cocoon apps have to use XSP logicsheets.
However, there is absolutely no XSPs in these apps,
only Project.xmap, XSL, Java, XML, HTML, some SQL files.

Was XSP introduced in Cocoon 2?
How do you develop with Cocoon without XSPs ?

Judging by Java packages, it had Acting, Generation, Selection,
Tasks, Transformation, Data and Util.
And most SQL things are done in XSL/XML files.
There are tons on XSLs (under XSLT). 
 Is that what was used before/instead of XSPs ?

Are there any resources describing Cocoon development
without XSPs ?


Thank you in advance,
Oleg.



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


Re: Error 403

Posted by Oleg Konovalov <ol...@yahoo.com>.
Hello Matt,

I doubt it is a client problem.

We have tried to login as one of these unfortunate users
from 3 different PCs, and it never worked.
Similarly, if it works for me, I can login
from any PC on the intranet, so it seems to be independent
on client PC.

Thank you,
Oleg.



--- Matt Robinson <ma...@robinsonfamily-au.org> wrote:

> Hello Oleg.
> 
> It sounds to me like a client problem.  Have you tried these
> users logins 
> from working systems?
> 
> Regards
> Matt.
> ----- Original Message ----- 
> From: "Oleg Konovalov" <ol...@yahoo.com>
> To: <us...@cocoon.apache.org>
> Sent: Saturday, February 19, 2005 2:26 AM
> Subject: Error 403
> 
> 
> > Hi,
> >
> > I have a misterious problem:
> > a few users can not login to (only) one of my Cocoon
> > applications,
> > they are getting error 403 "Access to the requested resource
> has
> > been denied".
> >
> > LDAP authentication (for them) is successfull, there are no
> > error messages in any logs, nothing looks suspicious.
> > These users have same access privileges as any others
> > and can login to the main app [sort of portal]
> > and all other apps [except that particular one,
> > either directly or through the link in the portal].
> >
> > All other users can login to everything they are allowed.
> >
> > I am new to Cocoon [and have to support cocoon apps
> > written by the people who are long gone].
> > Using Cocoon 2.0.4 on JBoss 3.0.7
> >
> > I doubt that it is something like a bad cookie [or their PC
> > setting, or spyware],
> > because if I try to login as on of these unhappy users
> > from my PC, have the same problem, althoough can login there
> > as myself.
> >
> > Any help is very appreciated.
> >
> >
> > Thank you in advance,
> > Oleg.
> >
> > P.S.: How do you debug Cocoon apps?
> > Small portion of it is written in Java [including
> > SecurityTransformer]  Can I debug it from Eclipse ?
> > Any techniques to set it up ?
> >
> >
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > 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


Re: Error 403

Posted by Matt Robinson <ma...@robinsonfamily-au.org>.
Hello Oleg.

It sounds to me like a client problem.  Have you tried these users logins 
from working systems?

Regards
Matt.
----- Original Message ----- 
From: "Oleg Konovalov" <ol...@yahoo.com>
To: <us...@cocoon.apache.org>
Sent: Saturday, February 19, 2005 2:26 AM
Subject: Error 403


> Hi,
>
> I have a misterious problem:
> a few users can not login to (only) one of my Cocoon
> applications,
> they are getting error 403 "Access to the requested resource has
> been denied".
>
> LDAP authentication (for them) is successfull, there are no
> error messages in any logs, nothing looks suspicious.
> These users have same access privileges as any others
> and can login to the main app [sort of portal]
> and all other apps [except that particular one,
> either directly or through the link in the portal].
>
> All other users can login to everything they are allowed.
>
> I am new to Cocoon [and have to support cocoon apps
> written by the people who are long gone].
> Using Cocoon 2.0.4 on JBoss 3.0.7
>
> I doubt that it is something like a bad cookie [or their PC
> setting, or spyware],
> because if I try to login as on of these unhappy users
> from my PC, have the same problem, althoough can login there
> as myself.
>
> Any help is very appreciated.
>
>
> Thank you in advance,
> Oleg.
>
> P.S.: How do you debug Cocoon apps?
> Small portion of it is written in Java [including
> SecurityTransformer]  Can I debug it from Eclipse ?
> Any techniques to set it up ?
>
>
>
>
>
> ---------------------------------------------------------------------
> 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


Error 403

Posted by Oleg Konovalov <ol...@yahoo.com>.
Hi,

I have a misterious problem:
a few users can not login to (only) one of my Cocoon
applications,
they are getting error 403 "Access to the requested resource has
been denied".

LDAP authentication (for them) is successfull, there are no
error messages in any logs, nothing looks suspicious.
These users have same access privileges as any others
and can login to the main app [sort of portal]
and all other apps [except that particular one,
either directly or through the link in the portal].

All other users can login to everything they are allowed.

I am new to Cocoon [and have to support cocoon apps
written by the people who are long gone].
Using Cocoon 2.0.4 on JBoss 3.0.7

I doubt that it is something like a bad cookie [or their PC
setting, or spyware],
because if I try to login as on of these unhappy users
from my PC, have the same problem, althoough can login there
as myself.

Any help is very appreciated.


Thank you in advance,
Oleg.

P.S.: How do you debug Cocoon apps?
Small portion of it is written in Java [including
SecurityTransformer]  Can I debug it from Eclipse ?
Any techniques to set it up ?





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


Re: MSAccess database problem

Posted by Roberto <rm...@montefiore.ch>.
Stupid reply...but do you have the properly jar file in the properly folder?
Cheers
Roberto

----- Original Message ----- 
From: "yssr" <ys...@yahoo.com>
To: <us...@cocoon.apache.org>
Sent: Thursday, January 20, 2005 12:43 PM
Subject: Re: MSAccess database problem


> Hi 
>   the below also I tried but it is saying that
> "Datasource not found"(in log)
> 1. my web.xml entry in load classes
>   <!-- For ODBC -->
>         sun.jdbc.odbc.JdbcOdbcDriver
>    
> 2.my cocoon.xconf entry
>  <jdbc name="JDBCODBCdb">
>               <pool-controller min="2" max="20"/>
>               <auto-commit>false</auto-commit>
>               <dburl>jdbc:odbc:SSPer</dburl>
>               <user></user>
>               <password></password>
>     </jdbc>
> 
> SSPer is datasource name I gave in ODBC(control panel 
> etc....)
> 3.in XSP
>  <?xml version="1.0"?>
> <xsp:page language="java"
>   xmlns:esql="http://apache.org/cocoon/SQL/v2" 
>           xmlns:xsp="http://apache.org/xsp">
> <emp>
>   <esql:connection>
>   <esql:pool>JDBCODBCdb</esql:pool>
>   <esql:execute-query>
>     <esql:query>SELECT id,name,place FROM
> emp</esql:query>
>     <esql:results>
>       <table>
>         <esql:row-results>
>           <tr>
>              <td><esql:get-string column="id"/></td>
>              <td><esql:get-string column="name"/></td>
>        <td><esql:get-string column="place"/></td> 
>           </tr>
>         </esql:row-results>
>       </table>
>     </esql:results>
>     <esql:no-results>
>        <p>Sorry, no results!</p>
>     </esql:no-results>
>   </esql:execute-query>
>   </esql:connection> 
>   <h1>Test</h1>
> </emp>
> </xsp:page>
> 
> 
> But still a problem...
> 
> any sugession.
> ===========
> Thanks
> yssr
> 
> 
> --- gounis@osmosis.gr wrote:
> 
> > 
> > in windows platform you can create an ODBC entry for
> > your .mdb file
> > and use the connection string:
> > 
> > jdbc:odbc:{your_dsn_entry}
> > 
> > that work for me 
> > 
> > --stavros 
> > 
> > 
> > 
> > On Thu, 20 Jan 2005, yssr wrote:
> > 
> > > Hi All,
> > > 
> > >    How can i retrieve a MSAccess databases.
> > > now I am using "Atinav Access Component" but I it
> > is
> > > not working properly
> > > 
> > > 1.I placed the jar in the lib
> > > 2.Added entry in load-class(web.xml)
> > > 3.database pool (cocoon.xconf)
> > >    <jdbc name="MSdb">
> > >           <pool-controller min="2" max="20"/>
> > >           <auto-commit>false</auto-commit>
> > >               
> > >
> >
> <dburl>jdbc:atinav:localhost:7227:d:\\testdatabase\db1.mdb</dburl>
> > >           <user></user>
> > >           <password></password>
> > >     </jdbc>
> > > 4.stated 3rd party service
> > > 
> > >  Problem is nothing comming , when I place it in
> > > simple xsp i.e,
> > >    <?xml version="1.0"?>
> > > <xsp:page language="java"
> > >   xmlns:esql="http://apache.org/cocoon/SQL/v2" 
> > >           xmlns:xsp="http://apache.org/xsp">
> > > <emp>
> > >   <esql:connection>
> > >   <esql:pool>MSdb</esql:pool>
> > >   <esql:execute-query>
> > >     <esql:query>SELECT id,name,place FROM
> > > emp</esql:query>
> > >     <esql:results>
> > >       <table>
> > >         <esql:row-results>
> > >           <tr>
> > >              <td><esql:get-string
> > column="id"/></td>
> > >              <td><esql:get-string
> > column="name"/></td>
> > >       <td><esql:get-string column="place"/></td> 
> > >           </tr>
> > >         </esql:row-results>
> > >       </table>
> > >     </esql:results>
> > >     <esql:no-results>
> > >        <p>Sorry, no results!</p>
> > >     </esql:no-results>
> > >   </esql:execute-query>
> > >   </esql:connection> 
> > >   <h1>Test</h1>
> > > </emp>
> > > </xsp:page>
> > > 
> > > when I use serialize type as html
> > > nothing is comming.
> > > when I use serialize type as xml 
> > > it is showing error (root tag is mandatory)[i can
> > > guess i.e, because there is no data in response]
> > > 
> > > Any sugession will help a lot....
> > > 
> > > Is there any other way to access "MSAccess"
> > > 
> > > Thanks
> > > yssr
> > > 
> > > 
> > > 
> > > __________________________________ 
> > > Do you Yahoo!? 
> > > Take Yahoo! Mail with you! Get it on your mobile
> > phone. 
> > > http://mobile.yahoo.com/maildemo 
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > 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
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> 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


Re: MSAccess database problem

Posted by go...@osmosis.gr.
this work for me 

		<jdbc name="hotpoints">
			<pool-controller min="5" max="10"/>
			<dburl>jdbc:odbc:hotpoints-1.1</dburl>
		</jdbc>

where just like you "hotpoints-1.1" is how i have register my .mdb in 
odbci dont know .. but have you try to remove elements for username and 
passwd?

--stavros 


On Thu, 20 Jan 2005, yssr wrote:

> Hi 
>   the below also I tried but it is saying that
> "Datasource not found"(in log)
> 1. my web.xml entry in load classes
>   <!-- For ODBC -->
>         	sun.jdbc.odbc.JdbcOdbcDriver
>    
> 2.my cocoon.xconf entry
>  <jdbc name="JDBCODBCdb">
>               <pool-controller min="2" max="20"/>
>               <auto-commit>false</auto-commit>
>               <dburl>jdbc:odbc:SSPer</dburl>
>               <user></user>
>               <password></password>
>     </jdbc>
> 
> SSPer is datasource name I gave in ODBC(control panel 
> etc....)
> 3.in XSP
>  <?xml version="1.0"?>
> <xsp:page language="java"
> 	  xmlns:esql="http://apache.org/cocoon/SQL/v2"	
>           xmlns:xsp="http://apache.org/xsp">
> <emp>
>   <esql:connection>
>   <esql:pool>JDBCODBCdb</esql:pool>
>   <esql:execute-query>
>     <esql:query>SELECT id,name,place FROM
> emp</esql:query>
>     <esql:results>
>       <table>
>         <esql:row-results>
>           <tr>
>              <td><esql:get-string column="id"/></td>
>              <td><esql:get-string column="name"/></td>
>  	     <td><esql:get-string column="place"/></td>	
>           </tr>
>         </esql:row-results>
>       </table>
>     </esql:results>
>     <esql:no-results>
>        <p>Sorry, no results!</p>
>     </esql:no-results>
>   </esql:execute-query>
>   </esql:connection> 
>   <h1>Test</h1>
> </emp>
> </xsp:page>
> 
> 
> But still a problem...
> 
> any sugession.
> ===========
> Thanks
> yssr
> 
> 
> --- gounis@osmosis.gr wrote:
> 
> > 
> > in windows platform you can create an ODBC entry for
> > your .mdb file
> > and use the connection string:
> > 
> > jdbc:odbc:{your_dsn_entry}
> > 
> > that work for me 
> > 
> > --stavros 
> > 
> > 
> > 
> > On Thu, 20 Jan 2005, yssr wrote:
> > 
> > > Hi All,
> > > 
> > >    How can i retrieve a MSAccess databases.
> > > now I am using "Atinav Access Component" but I it
> > is
> > > not working properly
> > > 
> > > 1.I placed the jar in the lib
> > > 2.Added entry in load-class(web.xml)
> > > 3.database pool (cocoon.xconf)
> > >    <jdbc name="MSdb">
> > >           <pool-controller min="2" max="20"/>
> > >           <auto-commit>false</auto-commit>
> > >               
> > >
> >
> <dburl>jdbc:atinav:localhost:7227:d:\\testdatabase\db1.mdb</dburl>
> > >           <user></user>
> > >           <password></password>
> > >     </jdbc>
> > > 4.stated 3rd party service
> > > 
> > >  Problem is nothing comming , when I place it in
> > > simple xsp i.e,
> > >    <?xml version="1.0"?>
> > > <xsp:page language="java"
> > > 	  xmlns:esql="http://apache.org/cocoon/SQL/v2"	
> > >           xmlns:xsp="http://apache.org/xsp">
> > > <emp>
> > >   <esql:connection>
> > >   <esql:pool>MSdb</esql:pool>
> > >   <esql:execute-query>
> > >     <esql:query>SELECT id,name,place FROM
> > > emp</esql:query>
> > >     <esql:results>
> > >       <table>
> > >         <esql:row-results>
> > >           <tr>
> > >              <td><esql:get-string
> > column="id"/></td>
> > >              <td><esql:get-string
> > column="name"/></td>
> > >  	     <td><esql:get-string column="place"/></td>	
> > >           </tr>
> > >         </esql:row-results>
> > >       </table>
> > >     </esql:results>
> > >     <esql:no-results>
> > >        <p>Sorry, no results!</p>
> > >     </esql:no-results>
> > >   </esql:execute-query>
> > >   </esql:connection> 
> > >   <h1>Test</h1>
> > > </emp>
> > > </xsp:page>
> > > 
> > > when I use serialize type as html
> > > nothing is comming.
> > > when I use serialize type as xml 
> > > it is showing error (root tag is mandatory)[i can
> > > guess i.e, because there is no data in response]
> > > 
> > > Any sugession will help a lot....
> > > 
> > > Is there any other way to access "MSAccess"
> > > 
> > > Thanks
> > > yssr
> > > 
> > > 
> > > 		
> > > __________________________________ 
> > > Do you Yahoo!? 
> > > Take Yahoo! Mail with you! Get it on your mobile
> > phone. 
> > > http://mobile.yahoo.com/maildemo 
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > 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
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> 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


Re: MSAccess database problem

Posted by yssr <ys...@yahoo.com>.
Hi 
  the below also I tried but it is saying that
"Datasource not found"(in log)
1. my web.xml entry in load classes
  <!-- For ODBC -->
        	sun.jdbc.odbc.JdbcOdbcDriver
   
2.my cocoon.xconf entry
 <jdbc name="JDBCODBCdb">
              <pool-controller min="2" max="20"/>
              <auto-commit>false</auto-commit>
              <dburl>jdbc:odbc:SSPer</dburl>
              <user></user>
              <password></password>
    </jdbc>

SSPer is datasource name I gave in ODBC(control panel 
etc....)
3.in XSP
 <?xml version="1.0"?>
<xsp:page language="java"
	  xmlns:esql="http://apache.org/cocoon/SQL/v2"	
          xmlns:xsp="http://apache.org/xsp">
<emp>
  <esql:connection>
  <esql:pool>JDBCODBCdb</esql:pool>
  <esql:execute-query>
    <esql:query>SELECT id,name,place FROM
emp</esql:query>
    <esql:results>
      <table>
        <esql:row-results>
          <tr>
             <td><esql:get-string column="id"/></td>
             <td><esql:get-string column="name"/></td>
 	     <td><esql:get-string column="place"/></td>	
          </tr>
        </esql:row-results>
      </table>
    </esql:results>
    <esql:no-results>
       <p>Sorry, no results!</p>
    </esql:no-results>
  </esql:execute-query>
  </esql:connection> 
  <h1>Test</h1>
</emp>
</xsp:page>


But still a problem...

any sugession.
===========
Thanks
yssr


--- gounis@osmosis.gr wrote:

> 
> in windows platform you can create an ODBC entry for
> your .mdb file
> and use the connection string:
> 
> jdbc:odbc:{your_dsn_entry}
> 
> that work for me 
> 
> --stavros 
> 
> 
> 
> On Thu, 20 Jan 2005, yssr wrote:
> 
> > Hi All,
> > 
> >    How can i retrieve a MSAccess databases.
> > now I am using "Atinav Access Component" but I it
> is
> > not working properly
> > 
> > 1.I placed the jar in the lib
> > 2.Added entry in load-class(web.xml)
> > 3.database pool (cocoon.xconf)
> >    <jdbc name="MSdb">
> >           <pool-controller min="2" max="20"/>
> >           <auto-commit>false</auto-commit>
> >               
> >
>
<dburl>jdbc:atinav:localhost:7227:d:\\testdatabase\db1.mdb</dburl>
> >           <user></user>
> >           <password></password>
> >     </jdbc>
> > 4.stated 3rd party service
> > 
> >  Problem is nothing comming , when I place it in
> > simple xsp i.e,
> >    <?xml version="1.0"?>
> > <xsp:page language="java"
> > 	  xmlns:esql="http://apache.org/cocoon/SQL/v2"	
> >           xmlns:xsp="http://apache.org/xsp">
> > <emp>
> >   <esql:connection>
> >   <esql:pool>MSdb</esql:pool>
> >   <esql:execute-query>
> >     <esql:query>SELECT id,name,place FROM
> > emp</esql:query>
> >     <esql:results>
> >       <table>
> >         <esql:row-results>
> >           <tr>
> >              <td><esql:get-string
> column="id"/></td>
> >              <td><esql:get-string
> column="name"/></td>
> >  	     <td><esql:get-string column="place"/></td>	
> >           </tr>
> >         </esql:row-results>
> >       </table>
> >     </esql:results>
> >     <esql:no-results>
> >        <p>Sorry, no results!</p>
> >     </esql:no-results>
> >   </esql:execute-query>
> >   </esql:connection> 
> >   <h1>Test</h1>
> > </emp>
> > </xsp:page>
> > 
> > when I use serialize type as html
> > nothing is comming.
> > when I use serialize type as xml 
> > it is showing error (root tag is mandatory)[i can
> > guess i.e, because there is no data in response]
> > 
> > Any sugession will help a lot....
> > 
> > Is there any other way to access "MSAccess"
> > 
> > Thanks
> > yssr
> > 
> > 
> > 		
> > __________________________________ 
> > Do you Yahoo!? 
> > Take Yahoo! Mail with you! Get it on your mobile
> phone. 
> > http://mobile.yahoo.com/maildemo 
> > 
> >
>
---------------------------------------------------------------------
> > 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: MSAccess database problem

Posted by go...@osmosis.gr.
in windows platform you can create an ODBC entry for your .mdb file
and use the connection string:

jdbc:odbc:{your_dsn_entry}

that work for me 

--stavros 



On Thu, 20 Jan 2005, yssr wrote:

> Hi All,
> 
>    How can i retrieve a MSAccess databases.
> now I am using "Atinav Access Component" but I it is
> not working properly
> 
> 1.I placed the jar in the lib
> 2.Added entry in load-class(web.xml)
> 3.database pool (cocoon.xconf)
>    <jdbc name="MSdb">
>           <pool-controller min="2" max="20"/>
>           <auto-commit>false</auto-commit>
>               
> <dburl>jdbc:atinav:localhost:7227:d:\\testdatabase\db1.mdb</dburl>
>           <user></user>
>           <password></password>
>     </jdbc>
> 4.stated 3rd party service
> 
>  Problem is nothing comming , when I place it in
> simple xsp i.e,
>    <?xml version="1.0"?>
> <xsp:page language="java"
> 	  xmlns:esql="http://apache.org/cocoon/SQL/v2"	
>           xmlns:xsp="http://apache.org/xsp">
> <emp>
>   <esql:connection>
>   <esql:pool>MSdb</esql:pool>
>   <esql:execute-query>
>     <esql:query>SELECT id,name,place FROM
> emp</esql:query>
>     <esql:results>
>       <table>
>         <esql:row-results>
>           <tr>
>              <td><esql:get-string column="id"/></td>
>              <td><esql:get-string column="name"/></td>
>  	     <td><esql:get-string column="place"/></td>	
>           </tr>
>         </esql:row-results>
>       </table>
>     </esql:results>
>     <esql:no-results>
>        <p>Sorry, no results!</p>
>     </esql:no-results>
>   </esql:execute-query>
>   </esql:connection> 
>   <h1>Test</h1>
> </emp>
> </xsp:page>
> 
> when I use serialize type as html
> nothing is comming.
> when I use serialize type as xml 
> it is showing error (root tag is mandatory)[i can
> guess i.e, because there is no data in response]
> 
> Any sugession will help a lot....
> 
> Is there any other way to access "MSAccess"
> 
> Thanks
> yssr
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Take Yahoo! Mail with you! Get it on your mobile phone. 
> http://mobile.yahoo.com/maildemo 
> 
> ---------------------------------------------------------------------
> 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


MSAccess database problem

Posted by yssr <ys...@yahoo.com>.
Hi All,

   How can i retrieve a MSAccess databases.
now I am using "Atinav Access Component" but I it is
not working properly

1.I placed the jar in the lib
2.Added entry in load-class(web.xml)
3.database pool (cocoon.xconf)
   <jdbc name="MSdb">
          <pool-controller min="2" max="20"/>
          <auto-commit>false</auto-commit>
              
<dburl>jdbc:atinav:localhost:7227:d:\\testdatabase\db1.mdb</dburl>
          <user></user>
          <password></password>
    </jdbc>
4.stated 3rd party service

 Problem is nothing comming , when I place it in
simple xsp i.e,
   <?xml version="1.0"?>
<xsp:page language="java"
	  xmlns:esql="http://apache.org/cocoon/SQL/v2"	
          xmlns:xsp="http://apache.org/xsp">
<emp>
  <esql:connection>
  <esql:pool>MSdb</esql:pool>
  <esql:execute-query>
    <esql:query>SELECT id,name,place FROM
emp</esql:query>
    <esql:results>
      <table>
        <esql:row-results>
          <tr>
             <td><esql:get-string column="id"/></td>
             <td><esql:get-string column="name"/></td>
 	     <td><esql:get-string column="place"/></td>	
          </tr>
        </esql:row-results>
      </table>
    </esql:results>
    <esql:no-results>
       <p>Sorry, no results!</p>
    </esql:no-results>
  </esql:execute-query>
  </esql:connection> 
  <h1>Test</h1>
</emp>
</xsp:page>

when I use serialize type as html
nothing is comming.
when I use serialize type as xml 
it is showing error (root tag is mandatory)[i can
guess i.e, because there is no data in response]

Any sugession will help a lot....

Is there any other way to access "MSAccess"

Thanks
yssr


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

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


Re: Using Cocoon's build system for my webappThanks Ada,

Posted by Justin Fagnani <ju...@fagnani.com>.
Thanks Adam,

You answered most of my questions. 

The only thing left (assuming I understand the wiki docs) is that the 
component I'm setting up need to be a singleton instantiated when Cocoon 
launches.

I remember using a ComponentManager to get my components. I didn't use XSP 
much though, so I'm wondering if this:

> var myComp = cocoon.getComponent(Packages.com.example.MyComponent.ROLE);

Is how I would do it inside a Generator, or if that's maybe XSP specific. Is 
the cocoon object now passed to pipeline components through the objectModel?

Also, I need to make sure that the instance I get is the same that was created 
at launch time. This is setup in the sitemap, right?

Ahh, knockin the rust off.

Thanks again,
  Justin

On Thursday 13 January 2005 19:05, Adam Ratcliffe wrote:
> Hi Justin
>
> The Cocoon wiki has some good resources on tailoring the Cocoon webapp and
> developing your project
> against it, see http://wiki.apache.org/cocoon/YourCocoonBasedProjectAnt16
> and http://wiki.apache.org/cocoon/ProjectBuilding
>
> The first doc has a link to an Ant build script that will help with setting
> up a directory structure
> that decouples your project's resources from the cocoon source tree, and
> targets for patching the
> cocoon configuration files with your project's specific configuration.
>
> I've successfully used this approach to upgrade a webapp from the 2.1.5 to
> 2.1.6 release.
>
> If you're already familiar with developing Avalon components for Cocoon
> deploying them is
> not too difficult.  Briefly:
>
> - Create your component roles file e.g.
>
> <role-list>
>   <role name="com.example.MyComponent"
> 	shorthand="myComp"
> 	default-class="com.example.MyComponent"/>
> ...
> </role-list>
>
> - Register these with Cocoon by adding a 'user-roles' attribute to the root
> element in cocoon.xconf
>
> <cocoon user-roles="my.roles">
>
> - The component's lifecycle methods will be invoked when you lookup/release
> the component, for example
> in flowscript:
>
> var myComp = cocoon.getComponent(Packages.com.example.MyComponent.ROLE);
>
> HTH
> Adam
>
>
>
>
>
> -----Original Message-----
> From: Justin Fagnani [mailto:justin3@fagnani.com]
> Sent: Friday, 8 July 2005 1:33 a.m.
> To: users@cocoon.apache.org
> Subject: Using Cocoon's build system for my webapp
>
>
> Hello Cocoon'ers,
>
> It's been a long while since I've done any Cocoon work. I've been playing
> with
> the new (to me) build system and so far I like it. I've been able to easily
> pair down the build with the local blocks and build properties.
>
> Now I want to start setting up the sitemap and writing some custom
> components.
> I'd like to use the current build system but I'm getting some errors. Maybe
> it's not the right way to do it, but so far I haven't seen any
> documentation on what the suggested build setup is.
>
> First I figured I'd edit the sitemap in src/webapp. I removed some unneeded
> matchers and quickly got errors with confpatch, specifically mount-table. I
> added back the api section to the sitemap just to get going, but I wonder
> what the correct solution is.
>
> Should I create my own target xml file? Should I remove mount-table.xmap
> from
> src/confpatch ?
>
> My second issue has to do with components. I want to wrap an object as an
> Avalon component and have it instantiated when Cocoon is launched. Before I
> did this with a user.roles file and editing cocoon.xconf. I went to the
> documentation to make sure I remembered how to do it, but I couldn't find
> much, just one reference to creating a my.roles file. To use the build
> system
> would I just put my.roles in the src/webapp/WEB-INF directory?
>
> My big concern is that it'll be difficult to upgrade when a new version of
> Cocoon comes out. On the other hand I've created a nice minimal Cocoon
> setup,
> but I might need more blocks later. I like the idea of being able to edit
> local.blocks.properties and get the blocks I need, and then rebuild my
> whole webapp.
>
> Any suggestions or advice would be greatly appreciated.
>
> Thanks,
>   Justin
>
>
> ---------------------------------------------------------------------
> 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


RE: Using Cocoon's build system for my webapp

Posted by Adam Ratcliffe <ad...@mrigitech.com>.
Hi Justin

The Cocoon wiki has some good resources on tailoring the Cocoon webapp and
developing your project
against it, see http://wiki.apache.org/cocoon/YourCocoonBasedProjectAnt16
and http://wiki.apache.org/cocoon/ProjectBuilding

The first doc has a link to an Ant build script that will help with setting
up a directory structure
that decouples your project's resources from the cocoon source tree, and
targets for patching the
cocoon configuration files with your project's specific configuration.

I've successfully used this approach to upgrade a webapp from the 2.1.5 to
2.1.6 release.

If you're already familiar with developing Avalon components for Cocoon
deploying them is
not too difficult.  Briefly:

- Create your component roles file e.g.

<role-list>
  <role name="com.example.MyComponent"
	shorthand="myComp"
	default-class="com.example.MyComponent"/>
...
</role-list>

- Register these with Cocoon by adding a 'user-roles' attribute to the root
element in cocoon.xconf

<cocoon user-roles="my.roles">

- The component's lifecycle methods will be invoked when you lookup/release
the component, for example
in flowscript:

var myComp = cocoon.getComponent(Packages.com.example.MyComponent.ROLE);

HTH
Adam





-----Original Message-----
From: Justin Fagnani [mailto:justin3@fagnani.com]
Sent: Friday, 8 July 2005 1:33 a.m.
To: users@cocoon.apache.org
Subject: Using Cocoon's build system for my webapp


Hello Cocoon'ers,

It's been a long while since I've done any Cocoon work. I've been playing
with
the new (to me) build system and so far I like it. I've been able to easily
pair down the build with the local blocks and build properties.

Now I want to start setting up the sitemap and writing some custom
components.
I'd like to use the current build system but I'm getting some errors. Maybe
it's not the right way to do it, but so far I haven't seen any documentation
on what the suggested build setup is.

First I figured I'd edit the sitemap in src/webapp. I removed some unneeded
matchers and quickly got errors with confpatch, specifically mount-table. I
added back the api section to the sitemap just to get going, but I wonder
what the correct solution is.

Should I create my own target xml file? Should I remove mount-table.xmap
from
src/confpatch ?

My second issue has to do with components. I want to wrap an object as an
Avalon component and have it instantiated when Cocoon is launched. Before I
did this with a user.roles file and editing cocoon.xconf. I went to the
documentation to make sure I remembered how to do it, but I couldn't find
much, just one reference to creating a my.roles file. To use the build
system
would I just put my.roles in the src/webapp/WEB-INF directory?

My big concern is that it'll be difficult to upgrade when a new version of
Cocoon comes out. On the other hand I've created a nice minimal Cocoon
setup,
but I might need more blocks later. I like the idea of being able to edit
local.blocks.properties and get the blocks I need, and then rebuild my whole
webapp.

Any suggestions or advice would be greatly appreciated.

Thanks,
  Justin


---------------------------------------------------------------------
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