You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Donald Ball <ba...@webslingerZ.com> on 2000/06/14 05:05:02 UTC

xsp castor taglib for editing databases via HTML forms

some of you had asked about this, so I packaged up my latest version and
have put it up on the web here:

http://www.webslingerZ.com/balld/wz-castor-0.2.zip

you will, of course, need cocoon, castor (http://castor.exolab.org/), and
a database that castor plays well with (postgresql, for instance - mysql
is out for the moment due to lack of transactions).

- donald


Re: cocoon really an option

Posted by Ulrich Mayring <ul...@denic.de>.
Eric SCHAEFFER wrote:
> 
> Can Turbine do this part of the job ?
> Cocoon is really great for publishing, and well enought for building
> applications. But it lacks some commun buildin functions...
> I don't know if all can be done with taglibs.

I can't vouch for Turbine, but I think there should also be a "standard"
or "preferred" way to do user and session management in cocoon. In my
mind the easiest thing would be to use a database - that way we could
use its advanced security and transaction features. Communication with
the database should be encrypted, so that passwords are not sent across
in the clear.

So, perhaps https with a database and the ServletEngine's session object
could solve these problems. Any comments?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: cocoon really an option

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
----- Original Message -----
From: Ulrich Mayring <ul...@denic.de>
To: <co...@xml.apache.org>
Sent: Monday, June 19, 2000 10:18 AM
Subject: Re: cocoon really an option


> Torsten Curdt wrote:
> >
> > We have to support multi-language, login
> > environment with shopping cart functions
> > and later on - WAP.
>
> Multi-language and WAP is pretty straightforward in cocoon. Security and
> Session management is not. It would be cool if someone wrote a taglib
> for that :)
>

Can Turbine do this part of the job ?
Cocoon is really great for publishing, and well enought for building
applications. But it lacks some commun buildin functions...
I don't know if all can be done with taglibs.

> > Is Cocoon scaleable enough?
>
> Try it out ;-)
>
> Seriously, cocoon2 should scale pretty well, cocoon1.* up to a certain
> point.
>
> > And I haven't found much documentation on
> > building such sites with Cocoon. (Have I
> > been looking at the wrong place?) A getting
> > started tutorial would be great!! Or at
> > least some more comlex samples!
>
> Building a site involves much more than cocoon provides. It is not a
> site-management tool, but something on which every site-management tool
> should be based :)
>
> I can only say cocoon has (like every software) a few shortcomings, but
> it is in another league than anything else I've ever used. Most cocoon
> users will say that it rocks. The important shortcomings will be dealt
> with in cocoon2, the rest is mostly stuff that no-one has found time to
> actually implement :)
>
> Ulrich
>
> --
> Ulrich Mayring
> DENIC eG, Systementwicklung
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


Re: cocoon really an option

Posted by Ulrich Mayring <ul...@denic.de>.
Torsten Curdt wrote:
> 
> Hm.. how stable is cocoon2 right now... what's up with session
> managment at cocoon2?!

I think it's pretty stable, but it's unreleased :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: Bug in Coccon when using

Posted by Andy Bosch <An...@csi.com>.
That is it !!!!

Thanks a lot,

Andy


Echoes wrote:

>
> Rob Parker wrote:
> >
> > I believe this is a bug in the xalan implementation. So you may want to
> > check the xalan archives
> > for a work-around.
>
>  Not exactly. It's a bug in xerces 1.0.3
> Just upgrade to 1.0.4 and everything will
> work as expected.
>
>         Fabrice
>


Re: Bug in Coccon when using

Posted by Echoes <ec...@free.fr>.
Rob Parker wrote:
> 
> I believe this is a bug in the xalan implementation. So you may want to
> check the xalan archives
> for a work-around.

 Not exactly. It's a bug in xerces 1.0.3
Just upgrade to 1.0.4 and everything will
work as expected.

	Fabrice

Re: Bug in Coccon when using

Posted by Mike Engelhart <me...@earthtrip.com>.
on 6/19/00 5:44 AM, Rob Parker at robert@webcybernetics.com wrote:

> I believe this is a bug in the xalan implementation. So you may want to
> check the xalan archives
> for a work-around.
It's a bug in the Xerces 1.0.3 distribution that comes with Cocoon 1.7.4
There is a 1.0.4 version of Xerces that fixes this but there are some issues
with Xalan that supposedly can cause problems.  I have been using 1.0.4 for
a while without noticing anything strange though.

Mike


Re: Bug in Coccon when using

Posted by Rob Parker <ro...@webcybernetics.com>.
I believe this is a bug in the xalan implementation. So you may want to
check the xalan archives
for a work-around.

----- Original Message -----
From: Andy Bosch <An...@csi.com>
To: <co...@xml.apache.org>
Sent: Monday, June 19, 2000 8:18 PM
Subject: Bug in Coccon when using <MAP></MAP>


> Hi,
>
> I am using cocoon for some month now. So  I am
> not a newbie. But now I found a strange behaviour:
>
> When I use imagemaps in xsl-files, cocoon drops my end-tag
> ( </map> ) during processing without any replacement. How could this
> be?
>
> My xsl-source is as follows:
> <map NAME="mymap">
> <AREA SHAPE="CIRCLE" COORDS="137,175,6" HREF="aaa.html""/>
> </map>
> <IMG SRC="/pic.gif" USEMAP="#mymap"/>
>
> The problem again is, that after processing the xml with the xsl-file, the
> </map>-Tag
> is missing.
>
> Thanks in advance,
> Andy
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>


Bug in Coccon when using

Posted by Andy Bosch <An...@csi.com>.
Hi,

I am using cocoon for some month now. So  I am
not a newbie. But now I found a strange behaviour:

When I use imagemaps in xsl-files, cocoon drops my end-tag
( </map> ) during processing without any replacement. How could this
be?

My xsl-source is as follows:
<map NAME="mymap">
<AREA SHAPE="CIRCLE" COORDS="137,175,6" HREF="aaa.html""/>
</map>
<IMG SRC="/pic.gif" USEMAP="#mymap"/>

The problem again is, that after processing the xml with the xsl-file, the
</map>-Tag
is missing.

Thanks in advance,
Andy



Re: cocoon really an option

Posted by Ulrich Mayring <ul...@denic.de>.
Torsten Curdt wrote:
> 
> Haaaa!! That sound good to me!! ... Any documentation, links,
> samples       ... please?!

Look in the file
/src/org/apache/cocoon/processor/xsp/library/java/session.xsl

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

RE: cocoon really an option

Posted by Michele Bianchi <mi...@research.telcordia.com>.
On Mon, 19 Jun 2000, Torsten Curdt wrote:

> [snip]
> > Worst case I could maybe write a Servlet that does the
> > > Session managment and uses Cocoon just for the display.
> > > But that would need this Servlet somehow function like
> > > a proxy... servlet chaining... don't know
> > You shouldn't have to write a 'proxy' servlet - you have full 
> > access to the
> > servlet session api in your xsp pages. You can either wrap native java in
> > <xsp:logic> tags or in cocoon1.x use the session taglib.
> 
> Haaaa!! That sound good to me!! ... Any documentation, links,
> samples       ... please?!


if can be useful, i did a special xml-tag (like <myns:login/>) that checks the
get/post parameter and/or the httpsession obj.  if the session in correct go
ahead, if not sendredirect to login-screen.xml page.  you can pass the local
page, so to go back after a sucessful login.

it's a very simple approach, i hadn't serious security problem.

now i'd like to investigate on producer and processor.  probably a producer can
do a good job of session control.  to the guru of the ml: any suggestion?

michele


RE: cocoon really an option

Posted by Torsten Curdt <tc...@dff.st>.
[snip]
> Worst case I could maybe write a Servlet that does the
> > Session managment and uses Cocoon just for the display.
> > But that would need this Servlet somehow function like
> > a proxy... servlet chaining... don't know
> You shouldn't have to write a 'proxy' servlet - you have full 
> access to the
> servlet session api in your xsp pages. You can either wrap native java in
> <xsp:logic> tags or in cocoon1.x use the session taglib.

Haaaa!! That sound good to me!! ... Any documentation, links,
samples       ... please?!

--
Torsten


RE: cocoon really an option

Posted by Torsten Curdt <tc...@dff.st>.
[snip]
> Just to attest to the efficacy of the 1.7.x session tag-lib, . . . works
> like a charm . . . I often wonder what people mean when they want 
> additional
> session management . . . almost everything (including the status 
> of the user
> in a secure realm (apache example) ) is available within the 
> session object

Where do I find a sample/docs !?
--
Torsten

Re: cocoon really an option

Posted by Mark Washeim <es...@canuck.com>.
on 19/6/00 11:02 am, Rob Parker at robert@webcybernetics.com wrote:

> 
> ----- Original Message -----
> From: Torsten Curdt <tc...@dff.st>
> To: <co...@xml.apache.org>
> Sent: Monday, June 19, 2000 6:43 PM
> Subject: RE: cocoon really an option
> 
> 
> [snip]
>> 
>> Hm... since Cocoon is Servlet, Session management should
>> not be too hard to go for. But I have just a very limit
>> view of what is possible with Cocoon. Maybe someone with
>> a little more insight (than me) could comment on this topic.
>> 
>> Worst case I could maybe write a Servlet that does the
>> Session managment and uses Cocoon just for the display.
>> But that would need this Servlet somehow function like
>> a proxy... servlet chaining... don't know
>> 
> 
> You shouldn't have to write a 'proxy' servlet - you have full access to the
> servlet session api in your xsp pages. You can either wrap native java in
> <xsp:logic> tags or in cocoon1.x use the session taglib.
> 


Just to attest to the efficacy of the 1.7.x session tag-lib, . . . works
like a charm . . . I often wonder what people mean when they want additional
session management . . . almost everything (including the status of the user
in a secure realm (apache example) ) is available within the session object
. . .


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

-- 
Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell

 



Re: cocoon really an option

Posted by Rob Parker <ro...@webcybernetics.com>.
----- Original Message ----- 
From: Torsten Curdt <tc...@dff.st>
To: <co...@xml.apache.org>
Sent: Monday, June 19, 2000 6:43 PM
Subject: RE: cocoon really an option


[snip]
> 
> Hm... since Cocoon is Servlet, Session management should
> not be too hard to go for. But I have just a very limit
> view of what is possible with Cocoon. Maybe someone with
> a little more insight (than me) could comment on this topic.
> 
> Worst case I could maybe write a Servlet that does the
> Session managment and uses Cocoon just for the display.
> But that would need this Servlet somehow function like
> a proxy... servlet chaining... don't know
>

You shouldn't have to write a 'proxy' servlet - you have full access to the
servlet session api in your xsp pages. You can either wrap native java in
<xsp:logic> tags or in cocoon1.x use the session taglib.



RE: cocoon really an option

Posted by Torsten Curdt <tc...@dff.st>.
> We have to support multi-language, login
> > environment with shopping cart functions
> > and later on - WAP.
> Multi-language and WAP is pretty straightforward in cocoon. Security and
> Session management is not. It would be cool if someone wrote a taglib
> for that :)

Hm... since Cocoon is Servlet, Session management should
not be too hard to go for. But I have just a very limit
view of what is possible with Cocoon. Maybe someone with
a little more insight (than me) could comment on this topic.

Worst case I could maybe write a Servlet that does the
Session managment and uses Cocoon just for the display.
But that would need this Servlet somehow function like
a proxy... servlet chaining... don't know

> Try it out ;-)
If I see how to do the session management I will ;-)
(Even though it seems to be a bit like poker ;-)
 
> Seriously, cocoon2 should scale pretty well, cocoon1.* up to a certain
> point.

Hm.. how stable is cocoon2 right now... what's up with session
managment at cocoon2?!

> > And I haven't found much documentation on
> > building such sites with Cocoon. (Have I
> > been looking at the wrong place?) A getting
> > started tutorial would be great!! Or at
> > least some more comlex samples!
> Building a site involves much more than cocoon provides. It is not a
> site-management tool, but something on which every site-management tool
> should be based :)

Well, of course... anyway I find it hard get into the process
of designing a site which uses Cocoon. More documentation cannot
be bad ;-)
--
Torsten

Re: cocoon really an option

Posted by Ulrich Mayring <ul...@denic.de>.
Torsten Curdt wrote:
> 
> We have to support multi-language, login
> environment with shopping cart functions
> and later on - WAP.

Multi-language and WAP is pretty straightforward in cocoon. Security and
Session management is not. It would be cool if someone wrote a taglib
for that :)

> Is Cocoon scaleable enough?

Try it out ;-)

Seriously, cocoon2 should scale pretty well, cocoon1.* up to a certain
point.

> And I haven't found much documentation on
> building such sites with Cocoon. (Have I
> been looking at the wrong place?) A getting
> started tutorial would be great!! Or at
> least some more comlex samples!

Building a site involves much more than cocoon provides. It is not a
site-management tool, but something on which every site-management tool
should be based :)

I can only say cocoon has (like every software) a few shortcomings, but
it is in another league than anything else I've ever used. Most cocoon
users will say that it rocks. The important shortcomings will be dealt
with in cocoon2, the rest is mostly stuff that no-one has found time to
actually implement :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

cocoon really an option

Posted by Torsten Curdt <tc...@dff.st>.
I'm now running Cocoon under Linux/JServ and
WinNT/JRun and I'm amazed on something that
is really working with this "new" technologies ;-)

I've now checked the examples and have to
make a decission if it's the right way for
our project. I'm not sure - so maybe someone
can give me some feedback.

We have to support multi-language, login
environment with shopping cart functions
and later on - WAP.

What really makes me nervous... I haven't
found any big projects using Cocoon up to
now. (At least there were just a few links
on the Cocoon website)

Is Cocoon scaleable enough?

And I haven't found much documentation on
building such sites with Cocoon. (Have I
been looking at the wrong place?) A getting
started tutorial would be great!! Or at
least some more comlex samples!

If Cocoon really confirms my good impression
I'm a volunteer on starting something like
that ;-)

Hope to get some feedback
by(e)
--
Torsten


Re: xsp castor taglib for editing databases via HTML forms

Posted by Donald Ball <ba...@webslingerZ.com>.
On Sun, 18 Jun 2000, Gensky Regnus wrote:

> > you need to add the bsf.jar to your CLASSPATH. sorry, i probably ought to
> > have mentioned it. i wrote a simple xalan extension function to generate
> > nice datetime widgets and xalan extension's rely on bsf. bsf is available
> > here:
> > 
> > http://www.alphaworks.ibm.com/tech/bsf
> 
> It works now.

sweet.

> > > Also, is it possible to have the xsp castor taglib Cocoon based rather
> > > than servlet (other than Cocoon) based? If so, how can this be done?
> > 
> > uh... the primary portion of the taglib _is_ cocoon-based, obviously. i
> > use a standalone servlet to do the final database commit because cocoon's
> > overhead is not necessary or even desirable for something that simply
> > executes a database command and sends a redirect. i reckon you could
> > rewrite it as a taglib or something, but _i_ can't see any good reason to
> > do so.
> 
> I guess I am confused with all the options available for interacting
> with the database.
> I was just wondering what may be the motivations behind using Castor
> instead of the SQL taglib.

um. where to begin... sql taglib is just a stupid little wrapper that
executes sql queries and formats the results as XML. there is nothing
complex or even really interesting about the sql taglib.

castor is a nice library that lets you treat java objects, database rows,
and xml fragments sort of interchangeably. castor eases the task of
editing databases by hiding much of the stupid SQL stuff from you - you
don't have to construct an insert statement when you want to edit an
entity - just create a new object, set a few fields if you want, and then
ask castor to add it to the database.

- donald


Re: xsp castor taglib for editing databases via HTML forms

Posted by Gensky Regnus <re...@techolap.com>.
Donald Ball wrote:
> 
> On Sat, 17 Jun 2000, Gensky Regnus wrote:
> 
> > > http://www.webslingerZ.com/balld/wz-castor-0.2.zip
> > >
> > > you will, of course, need cocoon, castor (http://castor.exolab.org/), and
> > > a database that castor plays well with (postgresql, for instance - mysql
> > > is out for the moment due to lack of transactions).
> > >
> > When I try to add an article, I get this error
> >
> > java.lang.NoClassDefFoundError: com.ibm.bsf.BSFManager
> >               at
> > org.apache.xalan.xslt.ExtensionNSHandler.class$(ExtensionNSHandler.java:79)
> 
> you need to add the bsf.jar to your CLASSPATH. sorry, i probably ought to
> have mentioned it. i wrote a simple xalan extension function to generate
> nice datetime widgets and xalan extension's rely on bsf. bsf is available
> here:
> 
> http://www.alphaworks.ibm.com/tech/bsf
> 

It works now.

> > Also, is it possible to have the xsp castor taglib Cocoon based rather
> > than servlet (other than Cocoon) based? If so, how can this be done?
> 
> uh... the primary portion of the taglib _is_ cocoon-based, obviously. i
> use a standalone servlet to do the final database commit because cocoon's
> overhead is not necessary or even desirable for something that simply
> executes a database command and sends a redirect. i reckon you could
> rewrite it as a taglib or something, but _i_ can't see any good reason to
> do so.

I guess I am confused with all the options available for interacting
with the database.
I was just wondering what may be the motivations behind using Castor
instead of the SQL taglib.


Gensky

Re: xsp castor taglib for editing databases via HTML forms

Posted by Donald Ball <ba...@webslingerZ.com>.
On Sat, 17 Jun 2000, Gensky Regnus wrote:

> > http://www.webslingerZ.com/balld/wz-castor-0.2.zip
> > 
> > you will, of course, need cocoon, castor (http://castor.exolab.org/), and
> > a database that castor plays well with (postgresql, for instance - mysql
> > is out for the moment due to lack of transactions).
> > 
> When I try to add an article, I get this error
> 
> java.lang.NoClassDefFoundError: com.ibm.bsf.BSFManager
>               at
> org.apache.xalan.xslt.ExtensionNSHandler.class$(ExtensionNSHandler.java:79)

you need to add the bsf.jar to your CLASSPATH. sorry, i probably ought to
have mentioned it. i wrote a simple xalan extension function to generate
nice datetime widgets and xalan extension's rely on bsf. bsf is available
here:

http://www.alphaworks.ibm.com/tech/bsf

or probably with the xalan packaged distro.

> I was able to enter an author in an Oracle database, using the package
> under Cocoon-1.7.4. I have all the Castor-0.8.7 jars in the servlet
> engine's CLASSPATH, with the exception of the xerces package. I am using
> the xerces package that comes with Cocoon.  I replaced int with number
> and text with long in the create.sql file.

sweet!

> Also, is it possible to have the xsp castor taglib Cocoon based rather
> than servlet (other than Cocoon) based? If so, how can this be done?

uh... the primary portion of the taglib _is_ cocoon-based, obviously. i
use a standalone servlet to do the final database commit because cocoon's
overhead is not necessary or even desirable for something that simply
executes a database command and sends a redirect. i reckon you could
rewrite it as a taglib or something, but _i_ can't see any good reason to
do so.

- donald


Re: xsp castor taglib for editing databases via HTML forms

Posted by Gensky Regnus <re...@techolap.com>.
Hello,
Donald Ball wrote:
> 
> some of you had asked about this, so I packaged up my latest version and
> have put it up on the web here:
> 
> http://www.webslingerZ.com/balld/wz-castor-0.2.zip
> 
> you will, of course, need cocoon, castor (http://castor.exolab.org/), and
> a database that castor plays well with (postgresql, for instance - mysql
> is out for the moment due to lack of transactions).
> 
When I try to add an article, I get this error

java.lang.NoClassDefFoundError: com.ibm.bsf.BSFManager
              at
org.apache.xalan.xslt.ExtensionNSHandler.class$(ExtensionNSHandler.java:79)

I was able to enter an author in an Oracle database, using the package
under Cocoon-1.7.4. I have all the Castor-0.8.7 jars in the servlet
engine's CLASSPATH, with the exception of the xerces package. I am using
the xerces package that comes with Cocoon.  I replaced int with number
and text with long in the create.sql file.

Also, is it possible to have the xsp castor taglib Cocoon based rather
than servlet (other than Cocoon) based? If so, how can this be done?

Any help apreciated.

Gensky Regnus
regnusg@techolap.com

Re: xsp castor taglib for editing databases via HTML forms

Posted by Giacomo Pati <Gi...@pwr.ch>.
Donald Ball wrote:
> 
> some of you had asked about this, so I packaged up my latest version and
> have put it up on the web here:

Cool, I will try them!

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

RE: xsp castor taglib for editing databases via HTML forms

Posted by "Udaypal R. Aarkoti" <ua...@techcontrol.com>.
Donald,
       I don't understand the @*, xsl:copy, xsl:apply-templates etc. Can you
give me a link where i can find all about XSL or a good book will work.

thank you
Uday