RE: <!ENTITY foo SYSTEM "file.name"> (was: ESQLl where condition)

2001-08-09 Thread annemarie . hartvigsen

Thanx, now at least I understand what's going on :)
/Anne Marie

-Original Message-
From: David Crossley [mailto:[EMAIL PROTECTED]]
Sent: 10. august 2001 02:00
To: [EMAIL PROTECTED]
Subject:  (was: ESQLl where
condition)


Anne Marie, I know the reason for the issue that you describe 
below and one way around it. The external entity def.xml is
automatically included by the parser when it processes the
top-level welcome.xml document. So as far as Cocoon is
concerned, it sees that there has been no change to
welcome.xml and so it happily delivers the result from the
cache.

Now the solution: whenever you change the external entity
def.xml you need to touch (i.e. change the timestamp of)
the top-level document. This then invalidates the cache
and so Cocoon will process the welcome.xml again. We too
have this situation. Another automated application is
generating the lower-level XML docs. When it is finished
it touches the top-level file and so the pipeline gets
refreshed on the next request.

cheers, David


> From: annemarie.hartvigsen.telenor.com
> Date: Wed, 8 Aug 2001 13:11:28 +0200 
>
> Hi, you're right it should work and it does.
> 
> I discovered that the error was in another place, namely
> in my main xml file. I had a file called welcome.xml which
> pointed to a file called def.xml. In def xml. was the code
> for opening the connection and running the query (part of
> which I attached in the last mail). In welcome.xml it was 
> included as:
>
> -
> ...
>  ...
>   
> ]>
> ...
>   
>   &definitions;
> 
> ...
> -
> 
> I discovered after a while that the changes made in def.xml
> was not updated. Welcome.xml was still using the earlier
> version of the document. I find this most peculiar and
> unlogic, but can find no other explanation. I took away
> the pointers and included the code directly in welcome.xml
> and now it works perfectly.
>
> My problem now is that welcome.xml becomes very long. I run
> several queries and had much better control over my code when
> I could separate it into different files. Does anybody know
> any way to fix the problem with welcome.xml not seeing the
> changes to def.xml and the other files?
>
> Thanks again,
> /Anne Marie

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: HTTP request parameter

2001-08-09 Thread annemarie . hartvigsen

Thanks for the tip; unfortunately it didn't work.

java.lang.RuntimeException: Error executed prepared statement:select
name as reg_name,  deviceID as reg_deviceID,
description as reg_description,  startTime as reg_startTime,
endTime as reg_endTime   from user, terminal, deviceType, registration
where terminal.userID = ? and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType and
registration.terminalID = terminal.terminalID; 
at
_var._tomcat._webapps._cocoon._vt._welcome._welcome.populateDocument(_welcom
e.java:379)
at
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:527)
at org.apache.cocoon.Engine.handle(Engine.java:384)
at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

/Anne Marie

-Original Message-
From: Christopher Painter-Wakefield [mailto:[EMAIL PROTECTED]]
Sent: 9. august 2001 18:09
To: [EMAIL PROTECTED]
Subject: Re: HTTP request parameter



Anne Marie,

try

  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID =
  
   
  
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;


Replace "int" with "long" or "string", as necessary to match your field
type.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  HTTP request parameter


Hi,

what is required to get the http request parameter to work? I have

[...]
http://www.apache.org/1999/XSP/Core";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
  xmlns:request="http://www.apache.org/1999/XSP/Request";  <<---HERE
>
[...]


  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID = 
<<---HERE
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;

[...]

As far as I have understood, I can then put

?userID=123456

at the end of the url, e.g.
-
http://localhost/welcome.xml?userID=123456

and 123456 will be used. But it's not working, so I guess I'll have to add
something somewhere? I don't get any error messages, but I don't get any
data from the query either. The query works when I use

---
 //(in the DTD)

[...]

and terminal.userID = &userID; //(in the query)
---

I'm using Cocoon 1.8.2

/Anne Marie





-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Can the sitemap pass parameters to XSP, like it passes them to XSL?

2001-08-09 Thread Piroumian, Konstantin

> Hello.
>
> I'm trying to figure out an architecture for a multilingual site. One of
the
> ideas, that seem pretty nice, is described by the sitemap code:
>
>
> 
>   
> 
> 
> 
> 
>
>
> That would create a "virtual" subdirectory "en", and all the page requests
> in that dir will in fact execute a .xsp file (the same for all the
> languages) and apply a different logicsheet, stored in different dirs, one
> for each language.
>
> The problem is that I'm unable to get the value of the "lang" parameter in
> my xsp pages...

Why don't you use LocaleSelect action? This will allow you to get the 'lang'
parameter from the request  attributes and use it (session and cookies are
also supported).

> In xsl, you would normally use , but here... I have no idea.
>
> Is this idea totally wrong, or can someone give me a sollution to the
> problem?
> In any case, did anybody devised a way to build multilanguage sites (other
> than the i18n internationalisation taglib, which is great for text in the
> page, but not for layout, or if the site is full of images).

Do you have any suggestions how i18n transformer can be advanced to meet
your needs?
What's is the problem with images? You can use different directories for
your locale-sensitive images and use i18n taglib to specify the path. Note,
that you can use i18n attributes in your XSP source:



and have this in your dictionary:


hello.gif
en/hello.gif
en/hellow.gif
ru/hello.gif


What else do you need for images? Any ideas are appreciated.

>
> Thanks in advance,
> Tibi Dondera

Best regards,

Konstantin Piroumian
Senior software developer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: [EMAIL PROTECTED]
http://www.protek.com

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




<!ENTITY foo SYSTEM "file.name"> (was: ESQLl where condition)

2001-08-09 Thread David Crossley

Anne Marie, I know the reason for the issue that you describe 
below and one way around it. The external entity def.xml is
automatically included by the parser when it processes the
top-level welcome.xml document. So as far as Cocoon is
concerned, it sees that there has been no change to
welcome.xml and so it happily delivers the result from the
cache.

Now the solution: whenever you change the external entity
def.xml you need to touch (i.e. change the timestamp of)
the top-level document. This then invalidates the cache
and so Cocoon will process the welcome.xml again. We too
have this situation. Another automated application is
generating the lower-level XML docs. When it is finished
it touches the top-level file and so the pipeline gets
refreshed on the next request.

cheers, David


> From: annemarie.hartvigsen.telenor.com
> Date: Wed, 8 Aug 2001 13:11:28 +0200 
>
> Hi, you're right it should work and it does.
> 
> I discovered that the error was in another place, namely
> in my main xml file. I had a file called welcome.xml which
> pointed to a file called def.xml. In def xml. was the code
> for opening the connection and running the query (part of
> which I attached in the last mail). In welcome.xml it was 
> included as:
>
> -
> ...
>  ...
>   
> ]>
> ...
>   
>   &definitions;
> 
> ...
> -
> 
> I discovered after a while that the changes made in def.xml
> was not updated. Welcome.xml was still using the earlier
> version of the document. I find this most peculiar and
> unlogic, but can find no other explanation. I took away
> the pointers and included the code directly in welcome.xml
> and now it works perfectly.
>
> My problem now is that welcome.xml becomes very long. I run
> several queries and had much better control over my code when
> I could separate it into different files. Does anybody know
> any way to fix the problem with welcome.xml not seeing the
> changes to def.xml and the other files?
>
> Thanks again,
> /Anne Marie

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




XSL as a stream

2001-08-09 Thread LeVasseur, George

This question may be coming real early in my learning curve but here goes...

Using the supplied "hello" sample as my example, is it possible and easy to
replace the physical simple-page2html.xsl so that the xsl is supplied via a
stream from a call to a bean? 

What I would like to do is create a skeleton of the xsl file that is kept on
disk, then have a bean read it, add some stuff to it to make it complete and
return the completed xsl.

Is this doable?

George Levasseur
Sr. Developer
R&D Group
SmartTime Software
[EMAIL PROTECTED]
PH: 508-598-3821
FX: 508-626-0638




-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Can the sitemap pass parameters to XSP, like it passes them to XSL?

2001-08-09 Thread Arnaud Bienvenu

Tibi,

You can get the parameter with this function :
parameters.getParameter("lang", "unknown");
(unkown is the default value)

If you want to insert it outside java code within your xsp, use  :
parameters.getParameter("lang", "unknown")

If somebody knows a better way, please tell us :-)
-- 
Arnaud Bienvenu
http://www.generasound.com/

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Replacing \n with -> cocoon pb ?

2001-08-09 Thread Christopher Painter-Wakefield


What about doing the replacements in your SELECT statement to create
well-formed XML, then using the  to retrieve it?  In
Oracle, it would look like:

SELECT '' || REPLACE(mytextfield, CHR(10), '') || '
FROM 

I would guess most RDBMS have a similar capability.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Replacing \n with  -> cocoon pb ?



Hi folks !

I have text in a database with \n characters in it.
I want to produce HTML and keep LF in my presentation.
So I have to convert \n to 

I can't replace with < and > characters because they can be confusing
for the parser , am I right ?
In order to see if my template is ok, I tried it but I have a
StackOverFlowError ! (replacing \n with BR )
Any help is appreciated

Thanks

Sébastien






Here is what I did :




















Then, I call it like that :
 











-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>








-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Can the sitemap pass parameters to XSP, like it passes them to XSL?

2001-08-09 Thread Tiberiu DONDERA

Hello.

I'm trying to figure out an architecture for a multilingual site. One of the
ideas, that seem pretty nice, is described by the sitemap code:

   

  




   

That would create a "virtual" subdirectory "en", and all the page requests
in that dir will in fact execute a .xsp file (the same for all the
languages) and apply a different logicsheet, stored in different dirs, one
for each language.

The problem is that I'm unable to get the value of the "lang" parameter in
my xsp pages...
In xsl, you would normally use , but here... I have no idea.

Is this idea totally wrong, or can someone give me a sollution to the
problem?
In any case, did anybody devised a way to build multilanguage sites (other
than the i18n internationalisation taglib, which is great for text in the
page, but not for layout, or if the site is full of images).

Thanks in advance,
Tibi Dondera



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Cocoon usr guide

2001-08-09 Thread smcardle

Hi

Has anybody produced a PDF or similar format user/programmer guide for Cocoon 1. Or 
maybe somebody has written a book that I could buy. I would realy like to get my hands 
on one as I travel a lot and don't want to have to carry around my laptop just to read 
the HTML pages.

Regards
 
Steven McArdle

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Is there a way to read xml-configurations from the sitemap?

2001-08-09 Thread Danijel Komljenovic

Hi!

Usually, there are  elements which can be accessed in the
setup() method of a Transformer. But this kind of Parameter-providing allows
only simple String values and no hierachy at all. What I need is to pass
nested parameters into my Transformer.

I've written a class for filtering XML documents - implemented as a 
Transformer. 
It is target at extracting xml-fragments. The parameters I need are nested, 
like 



..









  


Currently I load this data from a separate file, which is not very 
convienient. From
my point of view it should be in the sitemap and accessible to the Site 
Designer. 
Too make a long story short ... Is there any way to include this kind of 
parameter
in the sitemap and access it from the setup method. Any help here will be 
strongly
appreciated.

As a fallback I thought about passing in one parameter with CDATA, which I 
intend
to parse then inside the setup Method. Will this work? One very critical 
disadvantage
would be that I cannot use the parameter substitution anymore.

Regards, Danijel.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Problems when installing Cocoon with Tomcat 3.1

2001-08-09 Thread Monika Kubosch Dahl

Hi.
Tank's for responding.

I have not installed JSWDK, but I am doing it now...
The rest I have done already.
I use Tomcat standalone for testing and Tomcat with Borland AppServer later on.


Monika

-Original Message-
From: Hewko, Doug [mailto:[EMAIL PROTECTED]]
Sent: 8. august 2001 20:13
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: Problems when installing Cocoon with Tomcat 3.1


Someone should create a FAQ for this...

Did you install JSWDK (http://java.sun.com/products/jsp/archive.html)?
Did you set your JAVA_HOME path to your JDK 1.3.1? (ie: c:\jdk1.3.1)
Did you set up your CLASSPATH
(c:\xerces\xerces.jar;c:\jdk1.3.1\lib\tools.jar)?

Are you using Tomcat? (Web server?) Or what server are you using?

-Original Message-
From: Monika Kubosch Dahl [mailto:[EMAIL PROTECTED]]
Sent: August 8, 2001 9:30 AM
To: [EMAIL PROTECTED]
Subject: Problems when installing Cocoon with Tomcat 3.1


Hello.

I have downloaded Cocoon and run the build.bat.
I have the cocoon.war and cocoon.jar in the right directories, but I can't
find any cocoon.properties file (neighter in the bin/ or the
build/classes/org/apache/cocoon/ directory).
How do I get this file??

I also wonder what I should do with the zip.sig file Is this a
zip-file or what?

When I try to access cocoon on http://localhost:8080/cocoon I get a Cocoon2
internal server error.


Can anyone help me?

best regards,


Monika K. Dahl
[EMAIL PROTECTED]
Oslo
Norway



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Enke Michael

Arnaud Bienvenu wrote:
> 
> Oops, I found Michael's patch has a drawback : if you apply it and then you
> do not use the encoding attribute (i.e. ), then you have
> an error :
> Exception java.io.UnsupportedEncodingException is never thrown in the body
> of the corresponding try statement.
> 
> So finally the solution I posted at the beginning of this thread may be
> better.
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


Yes, thats right, shame on me.
But the solution: Don't catch UnsupportedEncodingException but only
Exception.
Than it is working. Here ones more the patch:

Index:
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
===
RCS file:
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
retrieving revision 1.16
diff -u -r1.16 esql.xsl
---
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl   
2001/08/06 15:38:57 1.16
+++
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl   
2001/08/09 15:26:48
@@ -636,6 +636,8 @@
   
 
   } catch (Exception _esql_exception__2) {}
+} catch(Exception e) {
+  throw new RuntimeException(e.toString());
 }
 if (_esql_queries.empty()) {
   _esql_query = null;

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




[C2] dynamic generation of an XSP

2001-08-09 Thread Eric Vernichon

I need to generate dynamically an xsp page.

I get an xml fragment from a string (called results) with a first xsp page (the 
request is something like this : submitdata.xsp?data={results}).
Secondly, I use an xslt to transform the string results into another xsp page 
with esql code into it.
Now, I need to process this second page, but i don't know how.

Here's what i use in sitemap.xmap :

 
 
 


I found something in sitemap.xmap :

  


Is it a good idea to add it after my  ?

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




FW: newbie question: (XML->XSLT) cached -> session logic -> browser??

2001-08-09 Thread Karl Oie

Thank you very much, i will try this now (just have to read about XSP and
sessions first :-)...

Just a final question about C2 as it seems you know about it's inner
working. The class that gets created as a cache for my largefile.xml
document. does it contain my entire document? (since i could delete the
original file...) is it keept in memory? I would have to buy some more ram
chips i guess ;-)


mvh karl


On Thu, 9 Aug 2001, Karl Oie wrote:

> i think i understand, but won't this put a lot of processing on the
server?
> the toc.xsl takes about 3 minutes to generate. if i apply the logic in the
> XSP page the page will have to process the entire XML document each time?

Well not exactly.
The entire document gets processed ONLY when you ask the page for
the first time.
A class is generated then, consisting of your toc.xsl applied to
the original document.
If your xsp file was empty, the result would be a java-file which produces
your XML document as SAX events. You COULD delete your xml file once
the java file is generated, because it is not needed anymore (but you
shouldn't because cocoon depends on the file to be there ;)

So basically your xml document is replaced by code that fires SAX
events to the contenthandler (the first stylesheet in your pipeline).

Therefore, everytime your page gets requested the cached class file
gets called.

Your xml page will not be entirely passed through the pipeline,
because not all the code that fires the SAX events get called.

I hope you understand..
You might want to try this out with a small xml file, consisting
of only 2 tags, and a simple if-then-else statement depending
on a query parameter 'section=one' or 'two'.
Check the generated source file, it should be
in tomcats 'work' dir under
$TOMCAT_HOME/work/localhost%F8080/[servlet-zone]/org/apache/www/..._xml.java
that should clarify it for you (search for the 'generate' function).

There is another way to accomplish this. This is done as follows:
let your XSP page add an XML tag in the result, for instance
if ()
{ 
  

  
}
else 
 

and let your stylesheet (NOT toc.xsl :)) check for that tag,
and then process some part of your input xml file.
This way, the document WILL get parsed EVERY time, ENTIRELY.
THis is the slow and ugly way.

So use XSP and it will be fast ;)

(btw: i've coded my own cocoon clone with XSP which is a lot faster
than cocoon, simply because it is not as modular as cocoon. That's
why I understand cocoon so well :))

Hope this helps, if not, feel free to ask.

> 
> mvh karl
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 9. august 2001 18:15
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: newbie question: (XML->XSLT) cached -> session logic ->
> browser??
> 
> 
> 
> Just create an XSP page,
> with a template matching the root element of your xml page.
> Then do some if-then-else based on your session.
> In each 'if' body you do something like this:
> 
>   if (some_session_based_expression)
>   {
>   
>   }
>   else if ()
> 
> 
> The template 'henk' is inserted in the place of the call.
> If it just consists of content, it looks like this:
> 
> 
>   
> 
>   
> 
> 
> This way you get 1 producer/generator, which can produce all the
> different pages you want (that is, sections of your XML document)
> based on some viariables in the session.
> 
> 
> I use this technique to validate users:
> 
> The XML document:
> 
>   
>   
> 
>   
>   
>  
>   
> 
>
> The xsp page:
>
> 
>   
> if (userInGroup(""))
> {
>   
>   
> 
> }
> else
> {
>   
> 
> 
> }
>   
>
> 
>
>
> The UserInGroup checks the session for a user object, standard code..
>
> Hope this helps,
>
>   Kenney Westerhof
>
> On Thu, 9 Aug 2001, Karl Oie wrote:
>
> > Hi, im pretty new to cocoon2 so i need some advice about the best
aproach
> > for my problem;
> >
> > I got a quite large XML file which i use a XSL stylesheet to extract
only
> > parts of, but the XML file might change so i set this up as the
generator.
> >
> > 
> > 
> > 
> >
> > ... perform logic on the result based on sessions ...
> >
> > 
> > 
> >
> > Then based on the the user's session state i want to perform logic on
the
> > extract, to hide and show elements (this is a session based toc).
> >
> > What can i use to do this, a XSP, JSP, write a new
> > generator/transformer/serializer ?
> >
> > Is it possible to place session handling in a custom serializer? is this
a
> > job for a transformer, and will i then have to implement it myself and
is
> it
> > then possible to add session handling?
> >
> > Should i create a custom generator, if so how to implement caching and
> > session handling?
> >
> > I'm quite good at java, but i'm new to cocoon and need some pointers in
> the
> > right direction.
> >
> > in advance thanks!
> >
> > mvh Karl
> >
> >
> > ---

[C2] JVM memory usage is growing and growing util OutOfMemory-Exception

2001-08-09 Thread C. Gaffga

I have still the same Problem, Cocoon consumes all my memory over a short
period of time.
I did a few checks, so I could see that all instances of my Java Classes
(some need very much memory) a released correctly. I overwrote the finalize
method for that, and printed something to stdout, to see if they are
released.

So, I think it's a Problem of Cocoon. How can I disable the cache, to check
wether that's the reason.
Has anybody an Idea what's going on here? If we wan't to release our site
like this, we need a script to restart tomcat every five minutes!! no way!

I hope somebody can help

Christoph


> Hi!
>
> Im using Tomcat4.b5, JDK1.3.1 and Cocoon2.b2 on SuSeLinux 7.1
>
> The memory usage of the VM, cocoon is running on, is growing and growing
with
> each request. Aprox. 200K more by each request. This is going on until a
> OutOfMemory-Eception occures and the VM is using about 500 to 600 MB of
> memory.
> During generating my XSP pages, i store large Objects in the
> request-Atrributes to mak them available to other parts in the aggregate,
> because the need so much time to calculate.
>
> Is it possible that these objects are not released after the request had
> been processed completly? How can I check, witch object allocate how mutch
> of memory?
>
> Thanks in advance.
>
> Christoph Gaffga
> [EMAIL PROTECTED]
>
>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: newbie question: (XML->XSLT) cached -> session logic -> browser??

2001-08-09 Thread Karl Oie

i think i understand, but won't this put a lot of processing on the server?
the toc.xsl takes about 3 minutes to generate. if i apply the logic in the
XSP page the page will have to process the entire XML document each time?

mvh karl



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 9. august 2001 18:15
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: newbie question: (XML->XSLT) cached -> session logic ->
browser??



Just create an XSP page,
with a template matching the root element of your xml page.
Then do some if-then-else based on your session.
In each 'if' body you do something like this:

  if (some_session_based_expression)
  {

  }
  else if ()


The template 'henk' is inserted in the place of the call.
If it just consists of content, it looks like this:


  

  


This way you get 1 producer/generator, which can produce all the
different pages you want (that is, sections of your XML document)
based on some viariables in the session.


I use this technique to validate users:

The XML document:


  

  
  
 
  


The xsp page:


  
if (userInGroup(""))
{



}
else
{



}
  




The UserInGroup checks the session for a user object, standard code..

Hope this helps,

Kenney Westerhof

On Thu, 9 Aug 2001, Karl Oie wrote:

> Hi, im pretty new to cocoon2 so i need some advice about the best aproach
> for my problem;
>
> I got a quite large XML file which i use a XSL stylesheet to extract only
> parts of, but the XML file might change so i set this up as the generator.
>
> 
>   
>   
>
>   ... perform logic on the result based on sessions ...
>
>   
> 
>
> Then based on the the user's session state i want to perform logic on the
> extract, to hide and show elements (this is a session based toc).
>
> What can i use to do this, a XSP, JSP, write a new
> generator/transformer/serializer ?
>
> Is it possible to place session handling in a custom serializer? is this a
> job for a transformer, and will i then have to implement it myself and is
it
> then possible to add session handling?
>
> Should i create a custom generator, if so how to implement caching and
> session handling?
>
> I'm quite good at java, but i'm new to cocoon and need some pointers in
the
> right direction.
>
> in advance thanks!
>
> mvh Karl
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: newbie question: (XML->XSLT) cached -> session logic -> browser??

2001-08-09 Thread forge


Just create an XSP page,
with a template matching the root element of your xml page.
Then do some if-then-else based on your session.
In each 'if' body you do something like this:

  if (some_session_based_expression)
  {

  }
  else if ()


The template 'henk' is inserted in the place of the call.
If it just consists of content, it looks like this:


  

  


This way you get 1 producer/generator, which can produce all the 
different pages you want (that is, sections of your XML document)
based on some viariables in the session.


I use this technique to validate users:

The XML document:


  

  
  
 
  


The xsp page:


  
if (userInGroup(""))
{



}
else
{



}
  
 



The UserInGroup checks the session for a user object, standard code..

Hope this helps,

Kenney Westerhof

On Thu, 9 Aug 2001, Karl Oie wrote:

> Hi, im pretty new to cocoon2 so i need some advice about the best aproach
> for my problem;
> 
> I got a quite large XML file which i use a XSL stylesheet to extract only
> parts of, but the XML file might change so i set this up as the generator.
> 
> 
>   
>   
> 
>   ... perform logic on the result based on sessions ...
> 
>   
> 
> 
> Then based on the the user's session state i want to perform logic on the
> extract, to hide and show elements (this is a session based toc).
> 
> What can i use to do this, a XSP, JSP, write a new
> generator/transformer/serializer ?
> 
> Is it possible to place session handling in a custom serializer? is this a
> job for a transformer, and will i then have to implement it myself and is it
> then possible to add session handling?
> 
> Should i create a custom generator, if so how to implement caching and
> session handling?
> 
> I'm quite good at java, but i'm new to cocoon and need some pointers in the
> right direction.
> 
> in advance thanks!
> 
> mvh Karl
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: rutime illegal state exception with mysql

2001-08-09 Thread java guru

Nah...
  i am using tomcat 3.2..positive

 --- Berin Loritsch <[EMAIL PROTECTED]> wrote: >
java guru wrote:
> > 
> > Hi.,
> >   Following is the exception i have with
> > c2+tomcat+mysql...
> > 
> > The sql page runs ok in the beginning...but gave
> this
> > one after being idle for a while...
> > 
> > any ideas?
> > 
> > Thanks for ur time
> > *
> > java.lang.RuntimeException: Could not get the
> > datasource java.lang.IllegalStateException: You
> cannot
> > select a Component from a disposed
> ComponentSelector
> 
> You're running Tomcat 4.0 aren't you?
> 
> This is a servlet 2.3 issue--can someone with
> experience
> create some Event Listeners so that the Cocoon
> object is
> recreated when the servlet is brought back to life?
> 
>
-
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <[EMAIL PROTECTED]>
>  

=
Thanks and have great day
srini


Do You Yahoo!?
Send a newsletter, share photos & files, conduct polls, organize chat events. Visit 
http://in.groups.yahoo.com.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: HTTP request parameter

2001-08-09 Thread Christopher Painter-Wakefield


Anne Marie,

try

  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID =
  
   
  
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;


Replace "int" with "long" or "string", as necessary to match your field
type.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  HTTP request parameter


Hi,

what is required to get the http request parameter to work? I have

[...]
http://www.apache.org/1999/XSP/Core";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
  xmlns:request="http://www.apache.org/1999/XSP/Request";  <<---HERE
>
[...]


  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID = 
<<---HERE
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;

[...]

As far as I have understood, I can then put

?userID=123456

at the end of the url, e.g.
-
http://localhost/welcome.xml?userID=123456

and 123456 will be used. But it's not working, so I guess I'll have to add
something somewhere? I don't get any error messages, but I don't get any
data from the query either. The query works when I use

---
 //(in the DTD)

[...]

and terminal.userID = &userID; //(in the query)
---

I'm using Cocoon 1.8.2

/Anne Marie





-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Arnaud Bienvenu

Oops, I found Michael's patch has a drawback : if you apply it and then you
do not use the encoding attribute (i.e. ), then you have
an error :
Exception java.io.UnsupportedEncodingException is never thrown in the body
of the corresponding try statement.

So finally the solution I posted at the beginning of this thread may be
better.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Replacing \n with -> cocoon pb ?

2001-08-09 Thread Sébastien Lefebvre


Hi folks !

I have text in a database with \n characters in it.
I want to produce HTML and keep LF in my presentation.
So I have to convert \n to 

I can't replace with < and > characters because they can be confusing 
for the parser , am I right ?
In order to see if my template is ok, I tried it but I have a 
StackOverFlowError ! (replacing \n with BR )
Any help is appreciated

Thanks

Sébastien






Here is what I did :




















Then, I call it like that :
 











-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




newbie question: (XML->XSLT) cached -> session logic -> browser??

2001-08-09 Thread Karl Oie

Hi, im pretty new to cocoon2 so i need some advice about the best aproach
for my problem;

I got a quite large XML file which i use a XSL stylesheet to extract only
parts of, but the XML file might change so i set this up as the generator.





... perform logic on the result based on sessions ...




Then based on the the user's session state i want to perform logic on the
extract, to hide and show elements (this is a session based toc).

What can i use to do this, a XSP, JSP, write a new
generator/transformer/serializer ?

Is it possible to place session handling in a custom serializer? is this a
job for a transformer, and will i then have to implement it myself and is it
then possible to add session handling?

Should i create a custom generator, if so how to implement caching and
session handling?

I'm quite good at java, but i'm new to cocoon and need some pointers in the
right direction.

in advance thanks!

mvh Karl


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




C2: Connection Pool

2001-08-09 Thread Martin Benda

How to access the connection pool out of java? When I try to
access my connection pool with the help of esql it works fine, but
when I try to access the pool out of java I always get an exception.


  private DataSourceComponent datasource;

  public void compose(ComponentManager manager) {
   ComponentSelector selector =
(ComponentSelector)manager.lookup(Roles.DB_CONNECTION);
   this.datasource =
(DataSourceComponent)selector.select("[DBpoolName]");
  }

  Connection con;

  try {
con = datasource.getConnection();
  ...


I try to access the connection poll like discribed on the website of C2, but
I always get an
expception
org.apache.cocoon.components.language.LanguageException: Error compiling
login_xsp:
Line 192, column 35:  '}' expected.
Line 194, column 4:  Statement expected.
Line 206, column 4:  Type expected.

How can I access the pool the right way?

I am using Cocoon2b2 and tomcat 3.2.3

thanks,
Martin


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Arnaud Bienvenu

I applied your patch instead of mine; it is smarter and does the job. Would
some Cocoon Guru apply it to CVS ? What is the procedure to ask for it ?
Don't you like it ?

Here is Michael's patch again (using cocoon's coding style) :

Index: ./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
===
RCS file: 
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
retrieving revision 1.16
diff -u -r1.16 esql.xsl
--- ./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
2001/08/06 15:38:57 1.16
+++ ./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
+2001/08/09 15:26:48
@@ -636,6 +636,8 @@
   
 
   } catch (Exception _esql_exception__2) {}
+} catch(java.io.UnsupportedEncodingException e) {
+  throw new RuntimeException(e.toString());
 }
 if (_esql_queries.empty()) {
   _esql_query = null;


-- 
Arnaud Bienvenu
http://www.generasound.com/

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




rutime illegal state exception with mysql

2001-08-09 Thread java guru

Hi.,
  Following is the exception i have with
c2+tomcat+mysql...

The sql page runs ok in the beginning...but gave this
one after being idle for a while...

any ideas?

Thanks for ur time
*
java.lang.RuntimeException: Could not get the
datasource java.lang.IllegalStateException: You cannot
select a Component from a disposed ComponentSelector


=
Thanks and have great day
srini


Do You Yahoo!?
Send a newsletter, share photos & files, conduct polls, organize chat events. Visit 
http://in.groups.yahoo.com.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: esql logicsheet, insert, update and delete, examples

2001-08-09 Thread JEULIN Olivier

> > I'll send you an example in a few minutes (I'm not sure the 
> rest of the
> > mailing list would be interested)
> 
> I would

OK, then:
this an old file I made to test something in the xml fragment I read from
the DB, and I've changed a few things between the working version and this
one.
It's a kind of draft, so don't take it too seriously
Anyway, the queries were OK when I first tested this file, and that's what
you're looking for.

Olivier








http://www.apache.org/1999/XSP/Core";
xmlns:auth="http://ulim.cocoonhost.com/auth";
xmlns:request="http://www.apache.org/1999/XSP/Request";
xmlns:session="http://www.apache.org/1999/XSP/Session";
xmlns:foo="http://localhost/foo";
xmlns:common="http://localhost/common";
xmlns:fragmentation="http://localhost/fragmentation";
xmlns:esql="http://apache.org/cocoon/SQL/v2";
xmlns:util="http://www.apache.org/1999/XSP/Util";
xmlns:xinclude="http://www.w3.org/1999/XML/xinclude";
>

localhost.basket.Basket


 
public Basket basket;






(Boolean)
(Boolean)





if ( != null)
{   
if (
!= null 
 != null 
 != null 
 != null ) {
try {
if
(Integer.parseInt((String)) > 0) {
// nouvelle commande de ce
produit
if
( == null) {
basket = new
Basket(5);
} else {
basket =
(Basket);
}

float promo;
try {
promo =
Float.parseFloat((String));
} catch
(NumberFormatException exc) {
promo =
Float.parseFloat((String));
}
basket.addProduct(

Integer.parseInt((String)),

(String),

Integer.parseInt((String)),

Float.parseFloat((String)),
promo
);

basket;

} else {
// supprime la commande de
ce produit

}
} catch (NumberFormatException exc)
{
// ne fait rien
}
}




foo

  
select p.promotion as promo,
p.reference as ref
from newprice p
  

  
 




 
  





foo

  
select b.reference as ref,
b.quantity as nb
from basket b
where
b.user=''
and b.idtitle =
Integer.parseInt((String))
  

  
 

Re: esql logicsheet, insert, update and delete, examples

2001-08-09 Thread Hubert NEOtyk Iwaniuk


- Original Message - 
From: "JEULIN Olivier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 09, 2001 3:43 PM
Subject: RE: esql logicsheet, insert, update and delete, examples


> I'll send you an example in a few minutes (I'm not sure the rest of the
> mailing list would be interested)

I would

> 
> > does anybody have any examples where you insert, update and 
> > delete records
> > in databases, using xsp and esql logicsheet?
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 


---
Ausgehende Mail ist zertifiziert virenfrei.
Uberpruft durch AVG Antivirus System (http://www.grisoft.com/de).
Version: 6.0.265 / Virendatenbank: 137 - Erstellungsdatum: 2001-07-18


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: esql logicsheet, insert, update and delete, examples

2001-08-09 Thread JEULIN Olivier

I'll send you an example in a few minutes (I'm not sure the rest of the
mailing list would be interested)

> does anybody have any examples where you insert, update and 
> delete records
> in databases, using xsp and esql logicsheet?

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: How to access attribute in Java?

2001-08-09 Thread Christian Haul

On 09.Aug.2001 -- 02:57 PM, Martin Benda wrote:
> Is it possible to access the value of an attribute inside of  to
> use
> it in the Java Code?
> 
> For example
> 
> 
> 
> String driver =  select="@driver"/>
> ...
> 
> 
> 
> When I look inside the code cocoon produces I find the following...
> 
> ...
> String driver = this.characters("oracle.jdbc.driver.OracleDriver");
> ...
> 
> ... and of course this won't work, but is there any workaround?

The use of the  tags as signals that the following is to
be outputted to the processing pipeline, what is obviously wrong
here. Just replace  with quotes.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: HTTP request parameter

2001-08-09 Thread Christian Haul

On 09.Aug.2001 -- 01:17 PM, [EMAIL PROTECTED] wrote:
> Hi,
> 
> what is required to get the http request parameter to work? I have
> [...]
>xmlns:xsp="http://www.apache.org/1999/XSP/Core";
>   xmlns:esql="http://apache.org/cocoon/SQL/v2";
>   xmlns:request="http://www.apache.org/1999/XSP/Request";  <<---HERE
> >

> I'm using Cocoon 1.8.2

I'm not familiar with C1 but the above looks a lot like C2 syntax. In
C1 you need AFAIK processing instructions to apply taglibs. Should be
in the examples & xsp docs.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: SV: SV: Cocoon2 with OrionServer

2001-08-09 Thread Marcelo F. Ochoa

java guru wrote:

> Hi.,
>   I am not sure if you are outlining procedure to use
> c1 with orion..i am talking about using c2 with orion
> 1.5.2
> 
> Thanx anyway
  Me too, I am using Cocoon 2b1 and Orion Oracle 9iAS 1.0.2.2 Container for J2EE.

   Best regards, Marcelo.

-- 
Marcelo F. Ochoa - [EMAIL PROTECTED]
Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
More info?
Chapter 21 of the book "Professional XML Databases" (Wrox Press 
http://www.wrox.com/)
Chapter 8 of the book "Oracle & Open Source" (O'Reilly 
http://www.oreilly.com/catalog/oracleopen/)
---
Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Universitario
(7000) Tandil - Bs. AS. - Argentina
Te: +54-2293-30 Fax: +54-2293-31


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




esql logicsheet, insert, update and delete, examples

2001-08-09 Thread annemarie . hartvigsen

Hi,

does anybody have any examples where you insert, update and delete records
in databases, using xsp and esql logicsheet?

/AM

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: SV: SV: Cocoon2 with OrionServer

2001-08-09 Thread java guru

Hi.,
  I am not sure if you are outlining procedure to use
c1 with orion..i am talking about using c2 with orion
1.5.2

Thanx anyway

 --- "Marcelo F. Ochoa" <[EMAIL PROTECTED]> wrote: >
java guru wrote:
> 
> > HI Thanx for reply.,
> >   The problem with removing crimson jar from orion
> is
> > that orion is complaining at startup 'coz it need
> > parser to do its specific xml stuffand it
> needs
> > crimson..
> > 
> > anyone with success?
> > 
> 
>I don't know which version of Orion web server
> distributs Oracle, 
> i'll check, but here its my summary list for working
> with OC4J and Cocoon 2.
>- Removes jaxp.jar, crimsom.jar and parser.jar
> from ORION_HOME.
>- Replaces xerces.jar and xalan.jar with the
> version of Cocoon2, 
> renaming xerces.jar of orion distribution as
> xerces.jar.bak and copying 
> Cocoon2's xerces_1_4_1.jar as ORION_HOME/xerces.jar
> for example.
>- Copy other libs from COCOON_HOME/lib to
> ORION_HOME/lib directory.
>- Copy cocoon.jar to ORION_HOME/lib or add this
> jar into the 
> application directory WEB-INF/lib.
>- Makes .war and .ear files and copy .ear file to
> 
> ORION_HOME/applications directory.
>- Edit ORION_HOME/config/server.xml and 
> ORION_HOME/config/default-web-site.xml files.
>And thats, all.
>Best regards, Marcelo.
> 
> -- 
> Marcelo F. Ochoa - [EMAIL PROTECTED]
> Do you Know DB Prism? Look @
> http://www.plenix.com/dbprism/
> More info?
> Chapter 21 of the book "Professional XML Databases"
> (Wrox Press 
> http://www.wrox.com/)
> Chapter 8 of the book "Oracle & Open Source"
> (O'Reilly 
> http://www.oreilly.com/catalog/oracleopen/)
> ---
> Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
> Paraje Arroyo Seco - Campus Universitario
> (7000) Tandil - Bs. AS. - Argentina
> Te: +54-2293-30 Fax: +54-2293-31
> 
> 
>
-
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <[EMAIL PROTECTED]>
>  

=
Thanks and have great day
srini


Do You Yahoo!?
Send a newsletter, share photos & files, conduct polls, organize chat events. Visit 
http://in.groups.yahoo.com.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




How to access attribute in Java?

2001-08-09 Thread Martin Benda

Is it possible to access the value of an attribute inside of  to
use
it in the Java Code?

For example



String driver = 
...



When I look inside the code cocoon produces I find the following...

...
String driver = this.characters("oracle.jdbc.driver.OracleDriver");
...

... and of course this won't work, but is there any workaround?

Benda Martin


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: SV: SV: Cocoon2 with OrionServer

2001-08-09 Thread Marcelo F. Ochoa

java guru wrote:

> HI Thanx for reply.,
>   The problem with removing crimson jar from orion is
> that orion is complaining at startup 'coz it need
> parser to do its specific xml stuffand it needs
> crimson..
> 
> anyone with success?
> 

   I don't know which version of Orion web server distributs Oracle, 
i'll check, but here its my summary list for working with OC4J and Cocoon 2.
   - Removes jaxp.jar, crimsom.jar and parser.jar from ORION_HOME.
   - Replaces xerces.jar and xalan.jar with the version of Cocoon2, 
renaming xerces.jar of orion distribution as xerces.jar.bak and copying 
Cocoon2's xerces_1_4_1.jar as ORION_HOME/xerces.jar for example.
   - Copy other libs from COCOON_HOME/lib to ORION_HOME/lib directory.
   - Copy cocoon.jar to ORION_HOME/lib or add this jar into the 
application directory WEB-INF/lib.
   - Makes .war and .ear files and copy .ear file to 
ORION_HOME/applications directory.
   - Edit ORION_HOME/config/server.xml and 
ORION_HOME/config/default-web-site.xml files.
   And thats, all.
   Best regards, Marcelo.

-- 
Marcelo F. Ochoa - [EMAIL PROTECTED]
Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
More info?
Chapter 21 of the book "Professional XML Databases" (Wrox Press 
http://www.wrox.com/)
Chapter 8 of the book "Oracle & Open Source" (O'Reilly 
http://www.oreilly.com/catalog/oracleopen/)
---
Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Universitario
(7000) Tandil - Bs. AS. - Argentina
Te: +54-2293-30 Fax: +54-2293-31


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Implementing FileExistSelector

2001-08-09 Thread Giacomo Pati

Quoting Michael Homeijer <[EMAIL PROTECTED]>:

> In a part of the sitemap I want to check if a requested file exists,
> if it doesn't i want to return the contents of a default file.
> 
> Is this the way I should implement something like that
> or are the easier methods? :
> 
>
>  
> 
>  
>   
>  
>  
>  
>   
>   
>   
> 

This might be one approach. Another one could be with an Action like this:

  
  
 
  


  

the mentioned Action will check for the file and return a Map containing 
"the-file" as the key and the filename as its value depending on the existance 
test (either the value of the source attribute or of the parameter "default").

Giacomo

> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> 

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




[C2] JVM memory usage is growing and growing util OutOfMemory-Exception

2001-08-09 Thread C. Gaffga

Hi!

Im using Tomcat4.b5, JDK1.3.1 and Cocoon2.b2

The memory usage of the VM, cocoon is running on, is growing an growing with
each request. Aprox. 200K more by each request. This is going on until a
OutOfMemory-Eception occures and the VM is using about 500 to 600 MB of
memory.
During generating my XSP pages, i store large Objects in the
request-Atrributes to mak them available to other parts in the aggregate,
because the need so much time to calculate.

Is it possible that these objects are not released after the request had
been processed completly? How can I check, witch object allocate how mutch
of memory?

Thanks in advance.

Christoph Gaffga
[EMAIL PROTECTED]



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: SV: SV: Cocoon2 with OrionServer

2001-08-09 Thread java guru

HI Thanx for reply.,
  The problem with removing crimson jar from orion is
that orion is complaining at startup 'coz it need
parser to do its specific xml stuffand it needs
crimson..

anyone with success?

 --- Tomas Andersson <[EMAIL PROTECTED]>
wrote: > I still have crimson.jar in my orion folder
and
> Cocoon works fine, but
> my collegue with the same version of orion and
> cocoon had to remove
> crimson.
> 
> 
> -Ursprungligt meddelande-
> Från: java guru [mailto:[EMAIL PROTECTED]]
> Skickat: Wednesday, August 08, 2001 6:57 PM
> Till: [EMAIL PROTECTED]
> Ämne: Re: SV: Cocoon2 with OrionServer
> 
> 
> Hi.,
>   I am preparing a doc on orion/cocoon setup..i
> tried
> ur procedure but still the cocoon endup with error
> 'coz the parser is picked up from crimson.jar even
> the
> classpath is changed in manifest..
> 
> Anyidea?
> 
> 
> thanx
>  --- Tomas Andersson <[EMAIL PROTECTED]>
> wrote: > I have 2.0beta1 running on Orion 1.5.2,
> with
> the
> > cocoon.war included in
> > a .ear file.
> > 
> > First you have to change the xerces and xalan
> files
> > which are located in
> > the %ORION_ROOT%
> > Copy the xerces-x-x-x and xalan-x-x-x files from
> > cocoon distribution,
> > into %ORION_ROOT% and rename them to just
> xerces.jar
> > and xalan.jar.
> > 
> > Update manifest.mf in the orion.jar, change the
> > classpath so that xalan
> > and xerces is first in line:
> > 
> > Manifest-Version: 1.0
> > Main-Class: com.evermind.server.ApplicationServer
> > Name: "Orion Application Server"
> > Created-By: 1.2 (Sun Microsystems Inc.)
> > Implementation-Vendor: "Evermind"
> > Class-Path: xalan.jar xerces.jar ejb.jar jndi.jar
> > jdbc.jar
> > jta.jar jaxp.jar crimson.jar saxon.jar tools.jar
> > jsse.jar jnet.jar
> > jcert.jar 
> > activation.jar mail.jar jaas.jar
> > Implementation-Version: "1.0.0"
> > Implementation-Title: "com.evermind.server"
> > 
> > Name: javax/servlet/
> > Specification-Version: 2.3
> > Implementation-Title: javax.servlet
> > 
> > Name: javax/servlet/jsp/
> > Specification-Version: 1.1
> > Implementation-Title: javax.servlet.jsp
> > 
> > Add a application.xml into META-INF folder in the
> > .ear file.
> > 
> > My server.xml looks like this:
> > 
> >  > path="d:\MyDeploys\cocoon.ear"/>
> > 
> > and my default-web-site looks like this:
> > 
> >   > root="/cps" />
> > 
> > In case that I did remember everything you should
> be
> > able to reach the
> > cocoon at url
> > 
> > http://localhost:port/cps/
> > 
> > if using cps as context root.
> > 
> > Good luck!
> > 
> > /Tomas
> > 
> > 
> > -Ursprungligt meddelande-
> > Från: Berin Loritsch [mailto:[EMAIL PROTECTED]]
> > Skickat: Wednesday, August 08, 2001 3:21 PM
> > Till: [EMAIL PROTECTED]
> > Ämne: Re: Cocoon2 with OrionServer
> > 
> > 
> > Rajkumar, Joseph wrote:
> > > Hi Folks
> > > 
> > > I would like to know if anybody is using
> > Cocoon2
> > > with the OrionServer ( see
> > http://www.orionserver.com ).
> > > I have had OrionServer working with
> Cocoon-1.8.2,
> > but have
> > > not yet tried using Cocoon2.
> > 
> > I've got someone working on that.  You should be
> > able to do it
> > anyway.
> > 
> > 
> >
>
-
> > Please check that your question has not already
> been
> > answered in the
> > FAQ before posting.
> > 
> > 
> > To unsubscribe, e-mail:
> > <[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <[EMAIL PROTECTED]>
> > 
> > 
> >
>
-
> > Please check that your question has not already
> been
> > answered in the
> > FAQ before posting.
> > 
> > 
> > To unsubscribe, e-mail:
> > <[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <[EMAIL PROTECTED]>
> >  
> 
> =
> Thanks and have great day
> srini
> 
>

> Do You Yahoo!?
> For regular News updates go to
> http://in.news.yahoo.com
> 
>
-
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <[EMAIL PROTECTED]>
> 
> 
>
-
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <[EMAIL PROTECTED]>
>  

=
Thanks and have great day
srini


Do You Yahoo!?
Send a newsletter, share photos & files, conduct polls, organize chat events. Visit 
http://in.groups.ya

HTTP request parameter

2001-08-09 Thread annemarie . hartvigsen

Hi,

what is required to get the http request parameter to work? I have

[...]
http://www.apache.org/1999/XSP/Core";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
  xmlns:request="http://www.apache.org/1999/XSP/Request";  <<---HERE
>
[...]


  select name as reg_name,
 deviceID as reg_deviceID,
 description as reg_description,
 startTime as reg_startTime,
 endTime as reg_endTime
  from user, terminal, deviceType, registration
  where terminal.userID = 
<<---HERE
and user.userID = terminal.userID
and deviceType.deviceType = terminal.deviceType
and registration.terminalID = terminal.terminalID;

[...]

As far as I have understood, I can then put 

?userID=123456 

at the end of the url, e.g. 
-
http://localhost/welcome.xml?userID=123456

and 123456 will be used. But it's not working, so I guess I'll have to add
something somewhere? I don't get any error messages, but I don't get any
data from the query either. The query works when I use

---
 //(in the DTD)

[...]

and terminal.userID = &userID; //(in the query)
---

I'm using Cocoon 1.8.2

/Anne Marie




-Original Message-
From: JEULIN Olivier [mailto:[EMAIL PROTECTED]]
Sent: 31. juli 2001 13:26
To: '[EMAIL PROTECTED]'
Subject: RE: Connecting database and XML pages


[...]

  
select b.ref as ref b.quantite as nb
from basket b
where b.id = 

  


[more ...]

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




diferent JDK distributions produce diferent compilation results

2001-08-09 Thread Luis Gois

Hello,

I'm having this problem with my Cocoon application running with diferent
JDK distributions. With Blackdown's JDK 1.3.0 all pages work as I wanted
them to, however, if I use Sun's JDK (1.3.0) on of the pages seems to
skip some lines of code. Both generated *.java files are identical, only
at execution the output gets diferent.

Could I use a debuger from an IDE like JBuilder or Together to find
which method isn't executing as it should? How?!

Sorry if this question is somewhat off topic, but besides de JDK issue,
I know this debugging stuff can be done for JSP pages, so how about XSP
ones?! Can I do it the same way as for JSP?!

Thanks in advance.
-- 
Luis A. Gois
---

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Problems when installing Cocoon with Tomcat 3.1

2001-08-09 Thread Pedro Pastor

But the point is that the install instructions are not enough.

If using those instructions Cocoon2 b1 works fine, and using the same
documentation and the same configuratión (platform+Apache+Tomcat+JDK) Cocoon2 b2
does not work: What is happening ??

>From the whole list of answers it seems to me that the problem and the solutions
(severals) are a kind of magic, trying to change things without any scientific
reason.

Has somebody from Cocoon2 developing team a rational answer ? Could it be any bug
in the beta 2 package ?

Meanwhile I keep on working with the beta 1.

Tanks in advance.

Pedro Pastor,
University of Alicante (Spain).

Vadim Gritsenko wrote:

> http://xml.apache.org/cocoon2/install.html should be enough.
> If not, Tomcat 3.X section should be modified.
>
> Vadim
>
> > -Original Message-
> > From: Hewko, Doug [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 08, 2001 2:13 PM
> > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> > Subject: RE: Problems when installing Cocoon with Tomcat 3.1
> >
> >
> > Someone should create a FAQ for this...
> >
> > Did you install JSWDK (http://java.sun.com/products/jsp/archive.html)?
> > Did you set your JAVA_HOME path to your JDK 1.3.1? (ie: c:\jdk1.3.1)
> > Did you set up your CLASSPATH
> > (c:\xerces\xerces.jar;c:\jdk1.3.1\lib\tools.jar)?
> >
> > Are you using Tomcat? (Web server?) Or what server are you using?
> >
> > -Original Message-
> > From: Monika Kubosch Dahl [mailto:[EMAIL PROTECTED]]
> > Sent: August 8, 2001 9:30 AM
> > To: [EMAIL PROTECTED]
> > Subject: Problems when installing Cocoon with Tomcat 3.1
> >
> >
> > Hello.
> >
> > I have downloaded Cocoon and run the build.bat.
> > I have the cocoon.war and cocoon.jar in the right directories, but I can't
> > find any cocoon.properties file (neighter in the bin/ or the
> > build/classes/org/apache/cocoon/ directory).
> > How do I get this file??
> >
> > I also wonder what I should do with the zip.sig file Is this a
> > zip-file or what?
> >
> > When I try to access cocoon on http://localhost:8080/cocoon I get a Cocoon2
> > internal server error.
> >
> >
> > Can anyone help me?
> >
> > best regards,
> >
> >
> > Monika K. Dahl
> > [EMAIL PROTECTED]
> > Oslo
> > Norway
> >
> >
> >
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. 
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. 
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
> >
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Implementing FileExistSelector

2001-08-09 Thread Michael Homeijer

In a part of the sitemap I want to check if a requested file exists,
if it doesn't i want to return the contents of a default file.

Is this the way I should implement something like that
or are the easier methods? :


 

 
  
 
 
 
  
  
  


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Enke Michael

Hi,
on tuesday I posted this patch to cocoon-dev,
seems to be equivalent with yours:


Hi,
I'd like to use 
but for the encoding we have to catch
java.io.UnsupportedEncodingException
These exception is not catched yet.
Because I have no access to cvs I post the patch as
diff -u esql.xsl.orig esql.xsl

Regards,
Michael




--- esql.xsl.orig   Tue Aug  7 16:25:16 2001
+++ esql.xslTue Aug  7 16:23:13 2001
@@ -637,6 +637,9 @@
 
   } catch (Exception _esql_exception__2) {}
 }
+catch(java.io.UnsupportedEncodingException e) {
+  throw new RuntimeException(e.toString());
+}
 if (_esql_queries.empty()) {
   _esql_query = null;
 } else {


Arnaud Bienvenu wrote:
> 
> With latest CVS Cocoon2, if you specify the encoding attribute within
>  or  tags, you have to enclose your tags
> inside a try/catch structure because they may throw
> java.io.UnsupportedEncodingException.
> 
> At the end of this mail you will find a patch to workaround this problem. I
> don't know if it's a good or clean job, but it's very useful for me, so I
> post it to you.
> 
> For example, the tedious
> 
>   try {
> 
>   } catch (java.io.UnsupportedEncodingException e) {
> System.out.prinln("Grumpf");
>   }
> 
> 
> Becomes merely
> 
> 
> Info : you need to set the encoding so that special characters will be
> correctly fetched (i.e. accentuated letters in latin languages)
> 
> Index: src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl
> ===
> RCS file: 
>/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl,v
> retrieving revision 1.5
> diff -u -r1.5 xsp.xsl
> --- src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl   2001/07/23 
>23:33:45 1.5
> +++ src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl   2001/08/08 
>14:37:14
> @@ -37,6 +37,7 @@
> 
>  import java.io.File;
>  import java.io.StringReader;
> +import java.io.UnsupportedEncodingException;
>  //import java.net.*;
>  import java.util.Date;
>  import java.util.List;
> @@ -98,7 +99,7 @@
>  /**
>  * Generate XML data.
>  */
> -  public void generate() throws SAXException {
> +  public void generate() throws SAXException, UnsupportedEncodingException {
>  this.contentHandler.startDocument();
>  AttributesImpl xspAttr = new AttributesImpl();
> 
> --
> Arnaud Bienvenu
> http://www.generasound.com/

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Web-inf/lib

2001-08-09 Thread Adrian Geissel

Hi,

We have this working with Tomcat 3.2 and Cocoon 1.8.2.

What we found was that when the WAR is first installed, it is expanded as
expected. However, before the JARs can be loaded by the Cocoon app, Tomcat
needs to be restarted (basically the restart needs to happen twice - once to
expand the WAR and once to load the JARs).

I hope that this helps,
Adrian

- Original Message -
From: Tait, Allen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 1:24 PM
Subject: Web-inf/lib


> I have written an application using Cocoon 1.8 and Tomcat 3.2.1.  It uses
> some Sax stuff but primarily publishes our xml content.  I have been
trying
> to get this app running with all needed jar files in the WEB-INF/lib
> directory of its .war file.  By all needed jar files I am referring to the
> Cocoon related jars.  So far, this hasn't worked.  I can only get this app
> to work if the needed "Cocoon" jars are in Tomcat's lib directory.  Has
> anyone else done this with a Cocoon app?  I get the following error when I
> put everything in the App's WEB-INF/lib directory:
>
>
> Error loading logicsheet at
> resource://org/apache/cocoon/processor/xsp/library/java/util.xsl due to
> java.lang.Exception: Resource not found or retrieving error.
> at
> org.apache.cocoon.processor.xsp.XSPProcessor.init(XSPProcessor.java:302)
> at
> org.apache.cocoon.framework.Manager.create(Manager.java:109)
> at org.apache.cocoon.framework.Router.init(Router.java:80)
> at
> org.apache.cocoon.framework.Manager.create(Manager.java:109)
> at org.apache.cocoon.Engine.(Engine.java:179)
> at org.apache.cocoon.Engine.getInstance(Engine.java:232)
> at org.apache.cocoon.Cocoon.init(Cocoon.java:157)
> at
> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
> at org.apache.tomcat.core.Handler.init(Handler.java:215)
> at
> org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> at org.apache.tomcat.core.Handler.service(Handler.java:254)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
> (Ajp12ConnectionHandler.java:166)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
> Warning: this page has been dynamically generated.
>
> Thanks in advance for any direction.
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>