You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Berin Loritsch <bl...@infoplanning.com> on 2000/03/01 15:05:11 UTC

XSP Woes

In my (fresh) install of Cocoon-1.7, I noticed a couple of things
about the XSP sample pages included.  Both were errors on my
estimation, and I was curious if somebody else ran into these
problems:

1) Cocoon always complained that the XSL stylesheet needs a
    version number (this is really XSL issue, but it comes up).
2) The First XSP Page (pure content version) doesn't seem to
    work properly--all the request information is not displayed
    (my assumption is that the XSP logic page is not called).
3) The namespace version works correctly, BUT when I click
    on "the servlet request library logicsheet" or "the utility library
    logicsheet" links, I get a "java.net.MalformedURLException:
    unknown protocol: resource" due to the following parameter:
    url=resource://org/apache/cocoon/processor/xsp/library/java/request.xsl
4) Lastly, when I use JMeter with multiple threads (I ran it with 10
    and 20 threads) calling an XSP page, there was an intermittant
    problem with the SAX parser not parsing all the elements.

My setup is WinNT 4.0 SP 5, Tomcat 3.1, and Cocoon 1.7.  The
first three are annoyances, but the last one is a serious issue.
Before I can have my company deploy a site with hundreds of
users hitting the site simultaneously (its a web app, not site), this
issue needs to be cleared up.

If Cocoon uses only one SAX parser for all requests, than it will
undoubtedly run into issues.


Re: XSP Woes

Posted by Gabor Dolla <ag...@mezon.net>.
> > Hmmmm, I'll investigate this further but Xalan has some multi-threading
> > problems... gone hunting...
> > 
I experienced problems with Xalan too....

I have a html page with four frames, all of them load data from the same
producer/xsl.
Sometimes all the four frames are just fine, but I receive various error
messages from time to time....
Shall I send you the error messages ? Would that help ??

Gabor



Re: XSP Woes

Posted by Mike Engelhart <me...@earthtrip.com>.
Stefano Mazzocchi wrote:

> Hmmmm, I'll investigate this further but Xalan has some multi-threading
> problems... gone hunting...
> 
It does?  I was under the impression from various posts that it was thread
safe. What are the symptoms???
Are there any types of things i can do to help track these down? JMeter from
what I've seen is a pretty useless tool for determining anything other than
if your machine will crash under load but then again there isn't any decent
documentation with it so what do I know.

Mike


Re: XSP Woes

Posted by Stefano Mazzocchi <st...@apache.org>.
Berin Loritsch wrote:
> 
> In my (fresh) install of Cocoon-1.7, I noticed a couple of things
> about the XSP sample pages included.  Both were errors on my
> estimation, and I was curious if somebody else ran into these
> problems:
> 
> 1) Cocoon always complained that the XSL stylesheet needs a
>     version number (this is really XSL issue, but it comes up).

fixed

> 2) The First XSP Page (pure content version) doesn't seem to
>     work properly--all the request information is not displayed
>     (my assumption is that the XSP logic page is not called).

fixed

> 3) The namespace version works correctly, BUT when I click
>     on "the servlet request library logicsheet" or "the utility library
>     logicsheet" links, I get a "java.net.MalformedURLException:
>     unknown protocol: resource" due to the following parameter:
>     url=resource://org/apache/cocoon/processor/xsp/library/java/request.xsl

fixed by removing it (it cannot work anymore due to other issues)
 
> 4) Lastly, when I use JMeter with multiple threads (I ran it with 10
>     and 20 threads) calling an XSP page, there was an intermittant
>     problem with the SAX parser not parsing all the elements.

Hmmmm, I'll investigate this further but Xalan has some multi-threading
problems... gone hunting...
 
> My setup is WinNT 4.0 SP 5, Tomcat 3.1, and Cocoon 1.7.  The
> first three are annoyances, but the last one is a serious issue.
> Before I can have my company deploy a site with hundreds of
> users hitting the site simultaneously (its a web app, not site), this
> issue needs to be cleared up.
> 
> If Cocoon uses only one SAX parser for all requests, than it will
> undoubtedly run into issues.

Of course...

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Tag libraries for XSP? HELP!!!

Posted by Richard Hieber <ri...@wwl.de>.
Hello,

I just joined the cocoon-users mailing list, after browsing through the web
archives for a while. This is my first post.

My setup is: A Windows 98 (First Edition) machine with Apache 1.3.12, JServ
1.1 and Cocoon 1.7.

I'm struggling - so far unsuccessfully - with the XSP model where the logic
is put in an external tag library file. Let's assume all the procedural
logic is in a file

    "memo.xsl"

located at "C:\Apache\cocoon" in my file system. This file corresponds to
the namespace

    xmlns:memo="http://www.apache.org/1999/XSP/Memo"

(In practice the namespace would be in another domain. I'm putting it into
apache.org just to keep this as close to the supplied "lib-page.xml" example
as possible.)


The attributes of the "xsp:page" tag in my test XML file would then be:

<xsp:page language="java"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
    xmlns:memo="http://www.apache.org/1999/XSP/Memo"
>


Now, before firing up Apache/Cocoon, the memo tag library has to be defined
in the "cocoon.properties" file. I'm quoting the entire section here:

------------------------------------------------
# Set the libraries associated with the given namespace.
# Use the syntax:
#   processor.xsp.library.<namespace-tag>.<language> = URL to file
# where "URL to file" is usually starting with file:// if you locate
# your custom library in your file system.
processor.xsp.library.context.java =
resource://org/apache/cocoon/processor/xsp/library/java/context.xsl
processor.xsp.library.cookie.java =
resource://org/apache/cocoon/processor/xsp/library/java/cookie.xsl
processor.xsp.library.global.java =
resource://org/apache/cocoon/processor/xsp/library/java/global.xsl
processor.xsp.library.request.java =
resource://org/apache/cocoon/processor/xsp/library/java/request.xsl
processor.xsp.library.response.java =
resource://org/apache/cocoon/processor/xsp/library/java/response.xsl
processor.xsp.library.session.java =
resource://org/apache/cocoon/processor/xsp/library/java/session.xsl
processor.xsp.library.util.java =
resource://org/apache/cocoon/processor/xsp/library/java/util.xsl
------------------------------------------------

Here the problem starts: I haven't found a way to make the tag library known
to Cocoon. Here are the lines that I tried:

processor.xsp.library.memo.java = file:///C:\Apache\cocoon\memo.xsl
processor.xsp.library.memo.java = file://C:/Apache/cocoon/memo.xsl
processor.xsp.library.memo.java = file:///C:/Apache/cocoon/memo.xsl
processor.xsp.library.memo.java = file://Apache/cocoon/memo.xsl
processor.xsp.library.memo.java = file:///Apache/cocoon/memo.xsl

Result of either of these lines: Cocoon throws an error message that it
can't find the file.


processor.xsp.library.memo.java = file:///memo.xsl
processor.xsp.library.memo.java = file://memo.xsl

That doesn't help either. On a vague idea I put the file system path of the
"memo.xsl" file into JServ's classpath ("repositories=..." in the config
file "zone.properties") or into the "jserv.properties" file
("wrapper.classpath=C:\Apache\cocoon\"), respectively. Didn't work. I don't
get an error message, just an completely empty page. Looking at the source
code in the browser, there's just the comment line in the page: "<!-- This
page was served in xxxx milliseconds by Cocoon 1.7 -->".


As a final resort, I put the "memo.xsl" alongside with the other tag
libraries deep into the cocoon.jar file (zipped it with compression=0) and
used the line:

processor.xsp.library.memo.java =
resource://org/apache/cocoon/processor/xsp/library/java/memo.xsl


What happened? Well, just like Joseph B. Ottinger wrote on Monday:

> Subject: XSP namespaces
> From: Joseph B. Ottinger (joeo@suninternet.com)
> Date: Mon Feb 28 2000 - 21:19:37 MET

...

> 2) Um, while I have the fusion namespace, constructed along the lines of
> the example from xsp.html... it doesn't work. It takes <fusion:date /> and
> renders it as <fusion:date></fusion:date>, which I suppose is well-formed,
> but ignores the template, which specifies something like this:
>
> <xsl:template match="fusion:date">
> <xsp:expr>new Date()</xsp:expr>
> </xsl:template>


It's just the same here. I've defined a template

  <xsl:template match="memo:counter">
    <xsl:text>It worked!
    </xsl:text>
  </xsl:template>

but the resulting file just contains

    <memo:counter></memo:counter>

where I expected a cheery "It worked!" instead.


I'm at the end of my wits for now. What am I doing wrong?

Bye,
Richard
--
Richard Hieber              richard.hieber@wwl.de
Online Programmierer

WWL Internet AG                     http://wwl.de
Südwestpark 60        Tel: ++49/ 911/ 688 667 302
D-90449 Nürnberg      Fax: ++49/ 911/ 688 667  11


Re: XSP Woes

Posted by Phil Lanch <ph...@aldigital.co.uk>.
Berin Loritsch wrote:
> 
> 1) Cocoon always complained that the XSL stylesheet needs a
>     version number (this is really XSL issue, but it comes up).

excellent - that's required by the XSLT spec.

-- 

cheers

phil

"I have remarked very clearly that I am often of one opinion
when I am lying down and of another when I am standing up ..."