Cinclude crashing catalina...?

2002-08-15 Thread Alexander Smirnoff

Hi,

I had weird JVM crash after using cinclude in my application. I spent 
a little time to investigate the issue and this what I figured out:

When I call cinclude:include src=cocoon:/message/ cinclude 
transformer does not rewrite the request's Servlet Path to message.
For example In my sitemap I have next:

map:match pattern=cinclude
map:generate src=xml/cinclude.xml/
map:transform type=cinclude label=include/
map:serialize type=xml/
/map:match

map:match pattern=message
map:generate src=xsp/message.xsp type=serverpages/
map:serialize type=xml/
/map:match

xml/cinclude.xml has cinclude:include src=cocoon:/message/ 
in it.

This snippet is working properly, but something I do not understand:
If Servlet Path is not rewritten to message, how sitemap properly 
picks the 'message' pipeline? Shoudn't it use the same 'cinclude'
pipeline again and again?

It has something to do with matcher or cocoon:/ protocol call. In my 
application I have my own implementation of the matcher which 
relies on getServletPath for match condition. And guess what happens 
when I use cinclude pipeline with this matcher? Right. It calls 
recursively itself in endless loop until all memory is exhausted and 
apparently crushes JVM...

So the question is - if request should not be rewriten in cocoon:/ call,
how to implement matcher so cinclude will correctly pickup the right
pipeline?

Thanks,
Alex.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Cinclude crashing catalina...?

2002-08-13 Thread Alexander Smirnoff



I do not know exactly what happening, it is first time I 
experimenting with cinclude, but
it seems crashing Tomcat 4.0.1.

Cocoon 2.0.2 has declared in source xml:

cinclude:include src="cocoon:/message"/

with correspondent pipeline:

map:match pattern="message" 
map:generate src="xsp/message.xsp" 
type="serverpages"/ map:serialize 
type="xml"//map:match

Logs are clean in Catalina as well as in 
Cocoon...

Alex.


Re: Cinclude crashing catalina...?

2002-08-13 Thread Alexander Smirnoff



FYI. The same thing happenning with xinclude...

  - Original Message - 
  From: 
  Alexander 
  Smirnoff 
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, August 13, 2002 3:26 
  PM
  Subject: Cinclude crashing 
  catalina...?
  
  I do not know exactly what happening, it is first time I 
  experimenting with cinclude, but
  it seems crashing Tomcat 4.0.1.
  
  Cocoon 2.0.2 has declared in source xml:
  
  cinclude:include src="cocoon:/message"/
  
  with correspondent pipeline:
  
  map:match pattern="message" 
  map:generate src="xsp/message.xsp" 
  type="serverpages"/ map:serialize 
  type="xml"//map:match
  
  Logs are clean in Catalina as well as in 
  Cocoon...
  
  Alex.


Re: Cinclude crashing catalina...?

2002-08-13 Thread Alexander Smirnoff

Of cause I included transformer! Even if I don't, - it should not crash the server...
As I understand from mail archive it should work with cocoon:/ protocol. But
it works fine with static xml files and *crash* catalina if I use cocoon:/ protocol...

Alex.

- Original Message - 
From: Andrew C. Oliver [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 4:04 PM
Subject: Re: Cinclude crashing catalina...?


You have to include the cinclude or xinclude transformer in your 
pipeline.  Instructions for CInclude may be found
here:

http://outerthought.net/wiki/Wiki.jsp?page=AddCIncludeToMinimalSitemap

Alexander Smirnoff wrote:

 FYI. The same thing happenning with xinclude...

 - Original Message -
 *From:* Alexander Smirnoff mailto:[EMAIL PROTECTED]
 *To:* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 *Sent:* Tuesday, August 13, 2002 3:26 PM
 *Subject:* Cinclude crashing catalina...?

 I do not know exactly what happening, it is first time I
 experimenting with cinclude, but
 it seems crashing Tomcat 4.0.1.
  
 Cocoon 2.0.2 has declared in source xml:
  
 cinclude:include src=cocoon:/message/
  
 with correspondent pipeline:
  
 map:match pattern=message
 map:generate src=xsp/message.xsp type=serverpages/
 map:serialize type=xml/
 /map:match
  
 Logs are clean in Catalina as well as in Cocoon...
  
 Alex.





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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. http://xml.apache.org/cocoon/faq/index.html

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




Using Schematron for XML request validation

2002-07-16 Thread Alexander Smirnoff

Hi all,

I'm considering to use SchematronValidator for validation of XML 
requests (embedded in the body of HTTP requests). Since XML 
Forms validation is dealing with forms and validation of JavaBeans,
I have a different problem.

The question I have is somewhat general. 

I would like to use schema for populating some report object in 
the case the validation succeeds. Probably it should be a different 
procedure, but does it looks more natural to have it there?

schema xmlns:sch=http://www.ascc.net/xml/schematron; 
titleTesttitle
pattern name=GetAccountInfo
rule context=/Request/GetAccountInfo
assert test=@username and @passwordNo username and password 
attributes/assert
report  test=@username and @password
bean name=GetAccountInfo
attribute name=usernamevalue-of 
select=@username/attribute
attribute name=passwordvalue-of 
select=@password/attribute
attribute name=handleaccount_info.xspattribute
/bean
/report
rule
pattern
/schema

Then I can pass it to specific hanle or even redirect the request.
Would it be a violation of Schematron schema and if not, how could I implement this?

Thanks,
Alex.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Schematron

2002-07-16 Thread Alexander Smirnoff

I'm not a big pro in Schematron. It uses mainly XPath for referencing nodes,
in Cocoon scratchpad it implemented with JXPath, where you could use
extension mechanics to add your own functions to XPath.

I did not do that but if you really want to have regexps in XPath, I think this 
is the direction.

Alex.


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 16, 2002 12:44 PM
Subject: Schematron


Hello,

   is there a way to use regular expressions with Schematron?
  (like with an descriptor xml match-regex)

  thanks for any help,


  miHam


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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. http://xml.apache.org/cocoon/faq/index.html

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




Component lookup problem in 2.0.2

2002-06-25 Thread Alexander Smirnoff

Funny, when I try to migrate from 2.0rc2 to 2.0.2 I found out that component lookup
fails when defining the component with users.roles file. 

Was something changed since then?

Alex.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: how to make XSP to extend the abstract class?

2002-06-25 Thread Alexander Smirnoff

Write your own xsp.xsl and change core-logicsheet in cocoon.xconf (I don't think 
it will be compliant with future versions of cocoon)

or quick and dirty way - write your own taglib like that:

xsl:template match=/xsp:page/*[not(starts-with(name(.), 'xsp:'))][1]
xsp:structure
xsp:include...xsp:include
/xsp:structure
xsp:logic
private void your_method()
{
...
}
/xsp:logic
!-- Fist element processing from XSP page --
xsl:element name={name()}
xsl:apply-templates/
/xsl:element
/xsl:template

I'm using the last one and its works fine.

Good luck,
Alex.

- Original Message - 
From: Argyn Kuketayev [EMAIL PROTECTED]
To: Cocoon-Users (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 3:48 PM
Subject: how to make XSP to extend the abstract class?


suppose, I've many methods which I want to share between XSP pages. I put
them all in the abstract class, then make Java class (generated from XSP) to
extend this abstract class. How?

thanks,
Argyn

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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. http://xml.apache.org/cocoon/faq/index.html

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




Session does not persist

2002-05-03 Thread Alexander Smirnoff

Hi,

If I turning off cookies from the browser, Session does not persist.
I'm using Cocoon 2.0rc2 and as of my understanding it wraps the
javax.servlet.http.HttpSession, As I know when cookies are
disabled it should use URL rewriting with jsessionid. I can see that
Cocoon rewrites URL for subsequent request when session is created,
even when cookies actully on, but when I turn them off, I still can see
URL rewriting, but session does NOT persist:

request.getSession(false); returns null.

Is this a bug?

Thanks,
Alex.



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: Session does not persist

2002-05-03 Thread Alexander Smirnoff


Berin Loritsch wrote:
 Alexander Smirnoff wrote:
  Hi,
  
  If I turning off cookies from the browser, Session does not persist.
  I'm using Cocoon 2.0rc2 and as of my understanding it wraps the
  javax.servlet.http.HttpSession, As I know when cookies are
  disabled it should use URL rewriting with jsessionid. I can see that
  Cocoon rewrites URL for subsequent request when session is created,
  even when cookies actully on, but when I turn them off, I still can see
  URL rewriting, but session does NOT persist:
  
  request.getSession(false); returns null.
  
  Is this a bug?
 
 What servlet engine are you running?  It would help to determine if
 the problem is with the servlet engine instead of Cocoon.

It is Tomcat4.0.1.

 -- 
 
 They that give up essential liberty to obtain a little temporary safety
   deserve neither liberty nor safety.
  - Benjamin Franklin
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html

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




Re: Session does not persist

2002-05-03 Thread Alexander Smirnoff

  
  If I turning off cookies from the browser, Session does not persist.
  I'm using Cocoon 2.0rc2 and as of my understanding it wraps the
  javax.servlet.http.HttpSession, As I know when cookies are
  disabled it should use URL rewriting with jsessionid. I can see that
 
 Not *it*, but *you* should rewrite URLs.
 

Wow! 
I missed it BIG TIME! 
Sorry for stupid question.

Alex.
 
  Cocoon rewrites URL for subsequent request when session is created,
  even when cookies actully on, but when I turn them off, I still can
 see
  URL rewriting, but session does NOT persist:

This happens because cocon take the job for me when redirects to another
pipeline.

  
  request.getSession(false); returns null.
  
  Is this a bug?
 
 Does session sample works?
 http://localhost:8080/cocoon/xsp/sessionpage
 




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




i18n in api session cookie

2002-04-23 Thread Alexander Smirnoff

Hi,

Two questions,

1. I would like to use i18n transformation within proprietary 
Java API with cocoon framework on top. How could I do that? 
If any have a code example for it?

2. When creating session if client disabled cookies how to 
enable URL session tracking? Just need a hint.

Thanks,
Alex.



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: i18n in api session cookie

2002-04-23 Thread Alexander Smirnoff


- Original Message - 
From: Konstantin Piroumian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 23, 2002 12:32 PM
Subject: Re: i18n in api  session cookie


  Hi,
 
  Two questions,
 
  1. I would like to use i18n transformation within proprietary
  Java API with cocoon framework on top. How could I do that?
  If any have a code example for it?
 
 Have seen org.apache.cocoon.transformation.I18nTransformer? Is it what you
 are looking for or you need something else?

Yes that what I want to do - call his *private* getString() helper method...
But then I have to repeat all initialization and setup logic... Is there a more clean 
way to do it?

 --
 Konstantin
 
 
  2. When creating session if client disabled cookies how to
  enable URL session tracking? Just need a hint.
 

What about disabled cookies? I'm not getting valid session on return calls...

  Thanks,
  Alex.
 
 
 
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  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. http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html

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




i18n repost

2002-04-17 Thread Alexander Smirnoff

I know that this question maybe is not for Cocoon list. Nevertheless,

I've set 

META http-equiv=Content-Type content=text/html; charset=UTF-8

in the html form. 

When submitting the form with national characters (Russian) I recieve 
parameters in unreadable charset. I'm not good neither in HTTP  nor in
internationalization. Could anybody explain how to parse it correctly to
convert whatever it is into correct UTF8 string?

Thanks,
Alex.




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: i18n repost

2002-04-17 Thread Alexander Smirnoff

OK. I found the problem:

Tomcat by default uses ISO-8859-1 encoding when you submitting 
a form. So to correct the problem you have to translate it :

String newstr = new String(xsp-request:get-parameter 
name=par/.getBytes(ISO-8859-1));

Well, the question is : 

Is there any way to do this automaticly from the sitemap/cocoon.xconf
or etc.?

I'm using Tomcat 4.0.1, Cocoon 2.0

Alex.

 I know that this question maybe is not for Cocoon list. Nevertheless,
 
 I've set 
 
 META http-equiv=Content-Type content=text/html; charset=UTF-8
 
 in the html form. 
 
 When submitting the form with national characters (Russian) I recieve 
 parameters in unreadable charset. I'm not good neither in HTTP  nor in
 internationalization. Could anybody explain how to parse it correctly to
 convert whatever it is into correct UTF8 string?
 
 Thanks,
 Alex.
 
 
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html

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




i18n with POST requests

2002-04-15 Thread Alexander Smirnoff

Hi guys,

I've got into problem with internationalization with input forms. I'm using
'UTF-8' encoding. When displaying data back from the database (Oracle)
it is not in the same encoding. This must be very stupid and annoying
question, but I have not found worthy answer in archives... Sorry.

What are the common practices with Cocoon?

Thanks,
Alex.



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: Cookie question

2002-04-11 Thread Alexander Smirnoff

Thanks for tip Konstantin. Not right away but when looking into the code I 
found up that if you define your action with 

store-in-cookietrue/store-in-cookie 

it will do the job.

To my surprise I did not be able to find up this in any documentation.

Alex.

- Original Message - 
From: Piroumian Konstantin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 11, 2002 3:13 AM
Subject: RE: Cookie question


  -Original Message-
  From: Alexander Smirnoff [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, April 10, 2002 10:41 PM
  To: [EMAIL PROTECTED]
  Subject: Cookie question
  
  
  Hi,
  
  My browser does not recieve cookie... Here is XSP piece:
  
  xsp-cookie:create-cookies
  xsp-cookie:cookie name=locale
  xsp-cookie:valuerlocale/xsp-cookie:value
  /xsp-cookie:cookie
  /xsp-cookie:create-cookies
  
  Did I forgot something?
 
 Btw, it seems that you are trying to set locale using a cookie. Have a look
 at LocaleAction. It will do the job for you.
 
  
  Thanks,
  Alex.
  
  
  
  
  -
  Please check that your question has not already been answered 
  in the FAQ before posting. 
 http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html

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




Cookie question

2002-04-10 Thread Alexander Smirnoff

Hi,

My browser does not recieve cookie... Here is XSP piece:

xsp-cookie:create-cookies
xsp-cookie:cookie name=locale
xsp-cookie:valuerlocale/xsp-cookie:value
/xsp-cookie:cookie
/xsp-cookie:create-cookies

Did I forgot something?

Thanks,
Alex.




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: Cookie question

2002-04-10 Thread Alexander Smirnoff

Nope. It still doesn't send me a cookie Bottom line, it correctly tranlates into 
helper method:

XSPCookieHelper.addCookie(objectModel, name, rlocale, ,
  domain, 10 * 365 * 24 * 60 * 60, ,  , 0);

but it does not sends a cookie!... Maybe on some other Cocoon level cookie get losts?

Alex.


- Original Message - 
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 10, 2002 2:58 PM
Subject: RE: Cookie question


  From: Alexander Smirnoff [mailto:[EMAIL PROTECTED]]
  
  Hi,
  
  My browser does not recieve cookie... Here is XSP piece:
  
  xsp-cookie:create-cookies
  xsp-cookie:cookie name=locale
  xsp-cookie:valuerlocale/xsp-cookie:value
  /xsp-cookie:cookie
  /xsp-cookie:create-cookies
  
  Did I forgot something?
 
 This (AFAIK) works:
 
 xsp-cookie:cookie
   xsp-cookie:nametestname1/xsp-cookie:name
   xsp-cookie:valuetestvalue1/xsp-cookie:value
  
 xsp-cookie:setMaxAgexsp:expr10*365*24*60*60/xsp:expr/xsp-cookie:s
 etMaxAge
 /xsp-cookie:cookie
 
 (see cookie.xsp)
 
 Vadim
 
  
  Thanks,
  Alex.
  
  
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html

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




Re: Problem in encoding form data

2002-04-10 Thread Alexander Smirnoff

Actually, does it possible to set encoding from sitemap? The same about setHeader 
- is it possible to set Cache-Control from
the sitemap?

Thanks,
Alex.

- Original Message -
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 10, 2002 4:22 PM
Subject: RE: Problem in encoding form data


  From: Mohamed Abdel Hameed [mailto:[EMAIL PROTECTED]]
 
 
Hi
first i'm using cocoon version 2.0rc1 with Tomcat Version 4.0.1 .
i have a problem in ecoding .
i try to send data from html FORM this data is (Germany data ) but
 there
  is
a problem when send this data
it sent wrong .

 Try in your XSP:

 para
 xsp:logic
 request.setCharacterEncoding(utf-8);
 /xsp:logic
 myparam = xsp:get-parameter name=myparam/
 /para

 This para/ should be the first thing which accesses request object.

 Vadim

first i read that don't use  GET  when i send data so i change it to
 POST
but without no change in result
i write
?xml version=1.0 encoding=utf-8 ?
in xml siles
also in html i use :
META HTTP-EQUIV=Content-Type  CONTENT=text/html;
 charset=utf-8/
also i use :-
enctype=application/x-www-form-urlencoded accept-charset=utf-8
with FORM .
so if anyoe can help me in this it'll be nice
thanx .
 


 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

 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. http://xml.apache.org/cocoon/faqs.html

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




rare but painfull exception

2002-03-13 Thread Alexander Smirnoff

Hi folks,

Once in a while I'm getting some very nasty exception, which paralyzes
the whole server. It could be started from any pipeline and then subsequent
calls to server will have the same exception. I has something to do with
CachingStreamPipeline(379).

Does anyone else had this kind of exception?

I'm using Tomcat 4.0.1 Cocoon 2rc1, WindowsNT...


ERROR   (2002-02-22) 13:24.37:880   [root] (/gwvas/site/fleettree) 
HttpProcessor[8000][2]/CocoonServlet: Problem with servlet
java.lang.reflect.InvocationTargetException: org.apache.cocoon.ProcessingException: 
Failed to execute pipeline.:
java.lang.RuntimeException: Problem in getTransformer:Error in creating Transform 
Handler
 at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:379)
 at 
org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.resource_look_and_feel(sitemap_xmap.java:1618)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.java:351)
 at 
org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.wildcardMatchN400282(sitemap_xmap.java:3306)
 at org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.process(sitemap_xmap.java:1922)
 at org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.process(sitemap_xmap.java:1824)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:116)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:495)
 at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:534)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Thanks Alex.



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: rare but painfull exception

2002-03-13 Thread Alexander Smirnoff


- Original Message -
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 13, 2002 4:38 PM
Subject: RE: rare but painfull exception


  From: Alexander Smirnoff [mailto:[EMAIL PROTECTED]]
 
  Hi folks,
 
  Once in a while I'm getting some very nasty exception, which paralyzes
  the whole server. It could be started from any pipeline and then
 subsequent
  calls to server will have the same exception. I has something to do
 with
  CachingStreamPipeline(379).

 This line is just re-throwing RuntimeException. Below this stack trace
 of the ProcessingException, another stack of RuntimeException should be
 printed which you did not sent.


That is the problem - it could appear from any place, then the exception persist even
if loggin from different computer.

It is very difficult to debug because this exception could pop up once in a month with
no obvious reason.

Next lines shows the exception:

java.lang.RuntimeException: Problem in getTransformer:Error in creating Transform 
Handler
 at 
org.apache.cocoon.transformation.TraxTransformer.setConsumer(TraxTransformer.java:241)
 at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.connectPipeline(CachingEventPipeline.java:356)
 at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:210)
 at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:364)
 at 
org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.resource_look_and_feel(sitemap_xmap.java:1618)

But this is also rethrowing of another one:

org.apache.cocoon.ResourceNotFoundException: Resource not found
file:/C:/java/tomcat/webapps/gwvas/stylesheets/system/status2html.xsl
 at org.apache.cocoon.components.source.URLSource.getInputStream(URLSource.java:157)
 at org.apache.cocoon.components.source.URLSource.getInputSource(URLSource.java:224)
 at 
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTemplates(XSLTProcessorImpl.java:244)
 at 
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:119)
 at 
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:111)
 at 
org.apache.cocoon.transformation.TraxTransformer.setConsumer(TraxTransformer.java:238)
 at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.connectPipeline(CachingEventPipeline.java:356)
 at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:210)
 at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:364)

This file DOES exists. But the same problem appears to all others pipelines.
It cease to find XSL stylesheets. After restarting tomcat problem disappears.


  Does anyone else had this kind of exception?

 Nope.

Just a try shot...



  I'm using Tomcat 4.0.1 Cocoon 2rc1, WindowsNT...

 Consider upgrade to version 2.0.1.

Yes I do, but apparantely this is not very simple task for our implementation.


 Vadim


  ERROR   (2002-02-22) 13:24.37:880   [root] (/gwvas/site/fleettree)
  HttpProcessor[8000][2]/CocoonServlet: Problem with servlet
  java.lang.reflect.InvocationTargetException:
  org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
  java.lang.RuntimeException: Problem in getTransformer:Error in
 creating
  Transform Handler
   at
 
 org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
 ingStr
  eamPipeline.java:379)
   at
 
 org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.resource_look_and_feel(s
 itemap
  _xmap.java:1618)
   at java.lang.reflect.Method.invoke(Native Method)
   at
 
 org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.j
 ava:35
  1)
   at
 
 org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.wildcardMatchN400282(sit
 emap_x
  map.java:3306)
   at
 
 org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.process(sitemap_xmap.jav
 a:1922
  )
   at
 
 org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.process(sitemap_xmap.jav
 a:1824
  )
   at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
   at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:116)
   at org.apache.cocoon.Cocoon.process(Cocoon.java:495)
   at
 org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:534)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
  Thanks Alex.
 
 


 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

 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. http://xml.apache.org/cocoon/faqs.html

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




Error handling design question

2002-02-14 Thread Alexander Smirnoff

After playing with cocoon for few month I found that it quite
strong and bold to be used in production environment. But
there are some weak points which I've noticed.

One of those is abnormal situation handling in XSP files. So
far I've tried few approaches.

The requirement is :

In the case of error present XML message containing the 
error number and the reason of error occurred.

First straight-forward approach was to use
request.sendRedirect(messagepage) method. But this in
some cases will result in IllegalStateException.

Second (which we are using in our application) is embedded
message approach. In the case of error message is 
embedded in XSP and later in the pipeline is filtered from
excessive tags. The only drawback of this approach is that
in some cases the execution of XSP must be terminated
with return statement or throwing an exception, which 
means all open SAX events must be consistently 
closed. Using autocomplete-documents will cause 
additional CPU load.

Maybe there are better solutions?

I'll appreciate to get some new opinion about this issue.

Thanks,
Alex.




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Error handling design question

2002-02-13 Thread Alexander Smirnoff

After playing with cocoon for few month I found that it quite
strong and bold to be used in production environment. But
there are some weak points which I've noticed.

One of those is abnormal situation handling in XSP files. So
far I've tried few approaches.

The requirement is :

In the case of error present XML message containing the 
error number and the reason of error occurred.

First straight-forward approach was to use
request.sendRedirect(messagepage) method. But this in
some cases will result in IllegalStateException.

Second (which we are using in our application) is embedded
message approach. In the case of error message is 
embedded in XSP and later in the pipeline is filtered from
excessive tags. The only drawback of this approach is that
in some cases the execution of XSP must be terminated
with return statement or throwing an exception, which 
means all open SAX events must be consistently 
closed. Using autocomplete-documents will cause 
additional CPU load.

Maybe there are better solutions?

I'll appreciate to get some new opinion about this issue.

Thanks,
Alex.



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: New release 2.0.1 woes

2002-02-08 Thread Alexander Smirnoff

Thanks, Vadim, for help it seems start to work. Just one intersting problem.

It looks like I missed many new features lately. One of those: I found out that on each
request context is changing to the directory where sitemap.xmap located. I do not use 
multiple sitemap application and I would like to freeze context to some specific 
lication 
for each request.

Is there any way to do it?

Thanks,
Alex.

- Original Message - 
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 05, 2002 3:24 PM
Subject: RE: New release 2.0.1 woes


  From: Alexander Smirnoff [mailto:[EMAIL PROTECTED]]
  
  Hi,
  
  I was trying to integrate new cocoon 2.0.1 version with my old sitemap
 and
  apparently It was not able to compile sitemap.xmap file
  because of the next errors (2.0rc1 works without errors):
  
  javax.xml.transform.TransformerException: Sitemap pipeline with
  map:generate|aggregate|transform must have map:serialize.
  
  as I understand sitemap is not able to compile because I have used
 something
  like this:
  
  map:match pattern=site/asset_mgmnt
 map:generate src=xsp/asset_mgmnt.xsp
 type=serverpages/
 map:redirect-to resource=look-and-feel
 target=asset_mgmnt/
  /map:match
 
 This construct has been deprecated in favor of map:call. Once you
 replace it with map:call everything should be ok. From the sample
 sitemap:
 
 map:call resource=dynamic-page
   map:parameter name=target
 value={../target}/state{../../../0}{../../0}/
 /map:call
 
 
 
 Vadim
 
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html

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




New release 2.0.1 woes

2002-02-05 Thread Alexander Smirnoff

Hi,

I was trying to integrate new cocoon 2.0.1 version with my old sitemap and apparently 
It was not able to compile sitemap.xmap file
because of the next errors (2.0rc1 works without errors):

javax.xml.transform.TransformerException: Sitemap pipeline with 
map:generate|aggregate|transform must have map:serialize.

as I understand sitemap is not able to compile because I have used something like this:

map:match pattern=site/asset_mgmnt
   map:generate src=xsp/asset_mgmnt.xsp type=serverpages/
   map:redirect-to resource=look-and-feel target=asset_mgmnt/
/map:match

and this redirection is properly ended with:

map:resource name=look-and-feel
map:transform src=stylesheets/xsl/message_filter.xsl/
map:act type=gwvas-look-and-feel
map:parameter name=target value={target}/
map:transform src={path}/xsl/{../target}.xsl
map:parameter name=basepath value={basepath}/
/map:transform
map:serialize/
/map:act
map:serialize type=xml/
/map:resource

if I put map:serialize at the end of the first pipeline - I'll get next:

javax.xml.transform.TransformerException:
 Sitemap pipeline with map:serialize|read|mount|redirect-to|call can not have any 
components after them.

So what is the the solution?

Thanks,
Alex.


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Redirects from XSP with RequestDispatcher

2002-01-30 Thread Alexander Smirnoff

Hi,

Does anybody tried to redirect with RequestDispatcher forward method in XSP? If yes 
could you show a snippet of code?

I cannot get javax.servlet.http.HttpServletRequest object from 
org.apache.cocoon.environment.http.HttpRequest wrapper to run this
method. But I can get javax.servlet.RequestDispatcher.

I'm using Cocoon 2.0rc1.

Thanks,
Alex.


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: Mysql, Tomcat 3.2.3, Cocoon 1.8.2

2001-11-30 Thread Alexander Smirnoff



I guess JDBC is the only way you could make MySQL 
work with cocoon directly. I do not remember where to get JDBC driver, you 
better look into MYSQL web site there are few of them...

How to use them in cocoon is very clear from 
examples...

Good luck,
Alex.

  - Original Message - 
  From: 
  Ivan 
  Manuel Andrade Muñoz 
  To: [EMAIL PROTECTED] 
  
  Sent: Friday, November 30, 2001 4:55 
  PM
  Subject: Mysql, Tomcat 3.2.3, Cocoon 
  1.8.2
  
  
  
  
  Hello, from already thank you for their help:
  If I have installed:
  - Red Hat Linux 7.2 
  - JDK1.3
  - Jakarta Tomcat 3.2.3
  -Cocoon 1.8.2
  
  Do I have to install the package JDBC, for you work him with 
  cocoon.? Is Mysql to install it with some special options for 
  cocoon?.
  
  
  Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.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]>


Session Invalidation at the end of pipline

2001-11-29 Thread Alexander Smirnoff

How to invalidate session after pipline executes?

If I put map:act type=session-invalidate/ inside pipline no matter
where, it executes invalidation before execution of pipline. If I put it
after map:serialize/ - it never reaches the invalidation code because
there is funny

if(true)
return true;

piece of code before invalidation action...

Any Ideas?

Thanks,
Alex.


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: [Announcement] Apache Cocoon 2.0 Release

2001-11-29 Thread Alexander Smirnoff

Great job guys! But...

As soon as I've installed new libraries I've got :

Original exception : java.lang.RuntimeException: Problem in
getTransformer:Error in creating Transform Handler
 at
org.apache.cocoon.transformation.TraxTransformer.setConsumer(TraxTransformer
.java:279)
 at
org.apache.cocoon.components.pipeline.CachingEventPipeline.connectPipeline(C
achingEventPipeline.java:352)
 at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:206)
 at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:359)
 at
org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.wildcardMatchN4001B1(sitemap
_xmap.java:2158)
 at
org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.process(sitemap_xmap.java:19
08)
 at
org.apache.cocoon.www.WEB_INF.conf.sitemap_xmap.process(sitemap_xmap.java:18
61)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:514)

sitemap_xmap.java part of exception is:

2155  // performing link translation
2156  if (environment.getObjectModel().containsKey(
2157Constants.LINK_OBJECT)) {
2158eventPipeline.addTransformer (!link-translator!,
2159  null, emptyParam);
2160  }

What did I wrong?

Thanks,
Alex.


 Apache Cocoon 2.0 Released
 --

The Apache Cocoon development community is very proud to announce the
long-awaited first stable release of the next generation of Apache
 Cocoon.

Apache Cocoon is an XML framework that raises the usage of
XML and XSLT technologies for server applications to a new level.
Designed for performance and scalability around pipelined SAX
processing, Cocoon offers a flexible environment based on the
separation of concerns between content, logic and style.
A centralized configuration system and sophisticated caching
top this all off and help you to create, deploy and maintain
rock-solid XML server applications.

Today, most web engineers consider XML as the key for an improved
web model and web site managers see XML as a way to reduce costs
and ease production. In an era where services rather than software
will be key for economic success, a better and less expensive model
for web publishing will be a winner, especially one based on open
standards.

This release of Cocoon is a complete rewrite of the first generation
that removes all of those design constraints that emerged during
almost three years of worldwide use.

This release is considered stable in both implementation and on the API
it provides: this means that the Apache Cocoon development community
is now fully committed to preserve backwards compatibility with this
 release.

We value the time and energy that our users will spend in order to
deploy
Cocoon technologies in their solutions and will make all possible
effort
to keep Cocoon a solid platform to work on.

For more information about Apache Cocoon, please go to

http://xml.apache.org/cocoon/

Thank for your interest and thanks to all who made this possible.


 The Apache Cocoon Worldwide Community


 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

 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. http://xml.apache.org/cocoon/faqs.html

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




Re: Look-and-feel approach with views

2001-11-27 Thread Alexander Smirnoff

Thanks Cris for suggestion.

 On 26.Nov.2001 -- 06:20 PM, Alexander Smirnoff wrote:
  OK. Then how could I implement dynamically look-and-feel based on user
  credentials (customer-id, user_id) ? I see only one possible way:
inserting
  action for each XSL transformation in each pipeline... That approach
makes
  sitemap look even more ugly...

 It depends a bit on how complex the differences for each user are. You
 might get away with

  map:transform src=resource:/styles/look+feel/{user_credentials}/

With this kind of redirection is throwing an exception while connecting
Piplines (Cocoon 2.1 cvs HEAD branch):

Original exception : java.lang.RuntimeException: Problem in
getTransformer:Error in creating Transform Handler
 at
org.apache.cocoon.transformation.TraxTransformer.setConsumer(TraxTransformer
.java:279)
 at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.connectPipeline(
AbstractEventPipeline.java:216)
 at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.process(Abstract
EventPipeline.java:106)
 at
org.apache.cocoon.components.pipeline.AbstractStreamPipeline.process(Abstrac
tStreamPipeline.java:140)
 at
org.apache.cocoon.www.file_.C_.java.tomcat.webapps.gwvas.WEB_INF.conf.sitema
p_xmap.wildcardMatchN400065(sitemap_xmap.java:782)

This type of exception gave me a wrongful impression that you cannot break
the pipeline and connect with another one from the transformation point.
I don't know, the lack of clear rules in documentation cause me huge headake
while debugging such stuff.

But apparently redirect-to IS working ! So I guess this will be the right
answer. Thanks, Cris.


 in every subpipeline. Or, if there are many subpipelines, you could
 create a resource that does the styling (and serializing) and

  map:redirect-to resource=look+feel/

 or, for more complex stylings even

  map:redirect-to resource=look+feel/{user_credentials}/

 in every pipeline where it's applicable.

 In addition, you could use selectors to chose between different
 look+feels based on some user parameter.

 HTH.

 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. http://xml.apache.org/cocoon/faqs.html

 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. http://xml.apache.org/cocoon/faqs.html

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




Re: Look-and-feel approach with views

2001-11-27 Thread Alexander Smirnoff

That exactly what I mean on functional level, but unfortunately, this kind
connection in Cocoon causes an exception:

Original exception : java.lang.RuntimeException: Problem in
getTransformer:Error in creating Transform Handler
 at
org.apache.cocoon.transformation.TraxTransformer.setConsumer(TraxTransformer
.java:279)
 at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.connectPipeline(
AbstractEventPipeline.java:216)
 at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.process(Abstract
EventPipeline.java:106)
 at
org.apache.cocoon.components.pipeline.AbstractStreamPipeline.process(Abstrac
tStreamPipeline.java:140)
 at
org.apache.cocoon.www.file_.C_.java.tomcat.webapps.gwvas.WEB_INF.conf.sitema
p_xmap.wildcardMatchN400063(sitemap_xmap.java:752)
 at
org.apache.cocoon.www.file_.C_.java.tomcat.webapps.gwvas.WEB_INF.conf.sitema
p_xmap.process(sitemap_xmap.java:568)
 at
org.apache.cocoon.www.file_.C_.java.tomcat.webapps.gwvas.WEB_INF.conf.sitema
p_xmap.process(sitemap_xmap.java:521)


 I suggest that there is an easier approach to solve your lookfeel issue.

 Assuming that the LF is supported by means of some transformation, then
why
 not use the following sitemap construct:

 map:pipeline
 map:match pattern=xslt/look_feel.xsl
 map:action get-user-l_f
 map:read src=xslt/skins/{look-n-feel}.xsl
 /map:action
 map:read src=xslt/default_l_f.xsl/
 /map:match

 map:match pattern=*
 map:generate src={1}/
 map:transform src=cocoon:/xslt/look_feel.xsl/
 map:serialize/
 /map:match
 /map:pipeline

 That way, look and feel is handled in a single location and there is no
need
 to extend the sitemap language.

 Hope this helps,
 Adrian
 (I haven't tested the above, but I want to illustrate the idea)

 - Original Message -
 From: Alexander Smirnoff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, November 26, 2001 11:20 PM
 Subject: Re: Look-and-feel approach with views


  OK. Then how could I implement dynamically look-and-feel based on user
  credentials (customer-id, user_id) ? I see only one possible way:
 inserting
  action for each XSL transformation in each pipeline... That approach
makes
  sitemap look even more ugly...
 
  Comments are follows,
  Alex.
  - Original Message -
  From: giacomo [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, November 26, 2001 5:50 PM
  Subject: Re: Look-and-feel approach with views
 
 
   On Mon, 26 Nov 2001, Alexander Smirnoff wrote:
  
OK. I've got it.
   
Well, is it possible to trigger the view from inside sitemap? What
 about
Passing parameters?
   
I think the idea of breaking pipeline and continuing it from another
resource-like pipeline (view) from labeled predefined point is
 very
powerful. Imagine having the same long chain of transformations
 through
group or even all of pipelines in the sitemap! From my point of view
 it
makes sitemap more unreadable. From the other side, if you have some
resource-like view which could be processed from any pipeline and
  being
returned to the point of entry will make readability of sitemap
more
easy...
   
Something like that:
!-- declaration --
map:chain name=look-feel
!-- action get-user-skin :-) defines path to the source of
the
skin --
map:act type=get-user-skin
map:transform src={srcpath}/{src}/
/map:act
map:transform src=default/{src}/
/map:chain
   
!-- from pipline --
map:match pattern=...
map:generate src=welcome.xml/
map:call-chain name=look-feel
map:parameter name=src value=welcome.xsl/
/map:call-chain
map:serialize/
/map:match
   
This is just a random thought. Sorry for being naive if this is the
case...Probably there are some workaround which I don't know, - I'll
 be
  glad
to comprehend.
  
   I can't see what your approach is good for. Views aren't made for
   skinning. They are for producing view in the sense of schema, meta
data,
   links etc. but not for green or red. If you like to use it that way,
 yes,
   your sitemap might look ugly then.
 
  So what would be more elegant approach ? Use actions in each
 transformation
  point in sitemap?
 
  
   Your proposed enhancement is only giving another programmers view
   into the sitemap which isn't what we initially wanted and is what
   we like to get fixed in the future.
 
  The only proposition I made is to manipulate sitemap in orthogonal
fashion
  like views do. Why not?
  I do understand...
 
  What are the tradeoffs?
 
  
   Giacomo
  
   
Thanks,
Alex.
   
   
- Original Message -
From: giacomo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 26, 2001 2:46 PM
Subject: Re: Look-and-feel approach with views
   
   
 On Mon, 26 Nov 2001, Alexander Smirnoff wrote:

  I'm using 2.0rc1, but even if I put

LF: passing parameters to resource

2001-11-27 Thread Alexander Smirnoff

Is there any way to pass parameters to resource from redirect-to point. for
example:

map:resources
map:resource name=transf
map:transform src=stylesheets/xsl/{file}.xsl/
map:serialize/
/map:resource
/map:resources

map:pipelines
map:pipeline
map:match pattern=home
map:parameter name=file value=welcome/ !-- This
doesn't work --
map:generate src=content/xml/welcome.xml /
map:redirect-to resource=transf/
/map:match
/map:pipeline
/map:pipelines

Any ideas?

Alex


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: LF: passing parameters to resource

2001-11-27 Thread Alexander Smirnoff

Nope it doesn't.

- Original Message -
From: David Rosenstrauch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 27, 2001 2:10 PM
Subject: Re: LF: passing parameters to resource


 I think this works:

  map:match pattern=home
  map:generate src=content/xml/welcome.xml /
  map:redirect-to resource=transf
  map:parameter name=file value=welcome/
  /map:redirect-to
  /map:match

 Haven't tried it though.  Email back if I'm wrong.


 DR


 At 01:22 PM 11/27/01 -0500, you wrote:
 Is there any way to pass parameters to resource from redirect-to point.
for
 example:
 
  map:resources
  map:resource name=transf
  map:transform src=stylesheets/xsl/{file}.xsl/
  map:serialize/
  /map:resource
  /map:resources
 
  map:pipelines
  map:pipeline
  map:match pattern=home
  map:parameter name=file value=welcome/ !-- This
 doesn't work --
  map:generate src=content/xml/welcome.xml /
  map:redirect-to resource=transf/
  /map:match
  /map:pipeline
  /map:pipelines
 
 Any ideas?
 
 Alex
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html

 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. http://xml.apache.org/cocoon/faqs.html

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




Re: LF: passing parameters to resource

2001-11-27 Thread Alexander Smirnoff

Thanks Cris,

Again you saved me, man. Thanks.

This works now:

map:resources
 map:resource name=transf
 map:transform src=stylesheets/xsl/{target}.xsl/
 map:serialize/
 /map:resource
/map:resources
...
map:match pattern=home
 map:generate src=content/xml/welcome.xml/
 map:redirect-to resource=transf target=welcome/
/map:match
...
Approach with map:parameter name=target value=welcome/ generates code
in wrong place, which cause compilation error of sitemap. So I guess it
could be treated as a BUG.

Regards,
Alex.

 On 27.Nov.2001 -- 01:22 PM, Alexander Smirnoff wrote:
  Is there any way to pass parameters to resource from redirect-to point.
for
  example:
 
  map:resources
  map:resource name=transf
  map:transform src=stylesheets/xsl/{file}.xsl/
  map:serialize/
  /map:resource
  /map:resources
 
  map:pipelines
  map:pipeline
  map:match pattern=home
  map:parameter name=file value=welcome/ !-- This
  doesn't work --
  map:generate src=content/xml/welcome.xml /
  map:redirect-to resource=transf/
  /map:match
  /map:pipeline
  /map:pipelines

 Alexander,

 all sitemap parameters are still available after the redirection. In
 addition you can give it an additional attribute @target which will
 show up as additional sitemap parameter {target}. Obviously,
 redirect-to resource introduces a new layer of parameters, thus {1}
 before will be {../1} afterwards.

 HTH

 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. http://xml.apache.org/cocoon/faqs.html

 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. http://xml.apache.org/cocoon/faqs.html

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




Re: Look-and-feel approach with views

2001-11-26 Thread Alexander Smirnoff

I'm using 2.0rc1, but even if I put label=xsltran into generator...
declaration this doesnt work either...

I feel that I misundersatnd the concept. It seems, for example, in webapp
sitemap.xconf (in HEAD branch) the view declaration like:

map:view name=links from-position=last
   map:serialize type=links/
/map:view

never executes... Otherwise it supposed to be executed for every pipline
after last component in pipline... So I'm really confused...

Thanks,
Alex.

 On Fri, 23 Nov 2001, Alexander Smirnoff wrote:

  Hi everyone,
 
  I'm trying to use Views for setting look and feel based on specific user
  logged on the web site. So far I cannot even make very basic view
working:
 
  map:views
  map:view from-label=xsltran name=xsltran
  map:transform src=stylesheets/xsl/welcome.xsl/
  map:serialize/
  /map:view
  /map:views
 
  map:pipelines
  map:pipeline
  map:match pattern=site/*
...
map:match pattern=site/workframe
  map:label name=xsltran
  map:generate
src=content/xml/welcome.xml/
  /map:label
  map:transform
src=stylesheets/xsl/welcome1.xsl/
  map:serialize/
/map:match
...
  /map:match
  /map:pipeline
  map:pipelines

 What version are you using? In the current 2.0 and HEAD branches of the
 CVS there isn't a map:label anymore. So you need to specify it this way:

  map:match pattern=site/workframe
map:generate src=content/xml/welcome.xml labelxsltran/
map:transform src=stylesheets/xsl/welcome1.xsl/
map:serialize/
  /map:match

 Giacomo

 
  this falls through welcome1.xsl, but not through welcome.xsl which
  suppose to be called from the xsltran view...
 
  What is my mistake?
 
  Thanks,
  Alexander Smirnoff
 
 
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  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. http://xml.apache.org/cocoon/faqs.html

 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. http://xml.apache.org/cocoon/faqs.html

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




Re: Look-and-feel approach with views

2001-11-26 Thread Alexander Smirnoff

Here is my confusion sources compiled with Cocoon2 CVS HEAD branch.

It seems that in this really simple case View MUST work, but it doesnt - I'm
still getting welcome1.xsl transformation.

I feel that I missed something big.

Thanks for help,
Alex.
- Original Message -
From: Alexander Smirnoff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 26, 2001 12:28 PM
Subject: Re: Look-and-feel approach with views


 I'm using 2.0rc1, but even if I put label=xsltran into generator...
 declaration this doesnt work either...

 I feel that I misundersatnd the concept. It seems, for example, in webapp
 sitemap.xconf (in HEAD branch) the view declaration like:

 map:view name=links from-position=last
map:serialize type=links/
 /map:view

 never executes... Otherwise it supposed to be executed for every pipline
 after last component in pipline... So I'm really confused...

 Thanks,
 Alex.

  On Fri, 23 Nov 2001, Alexander Smirnoff wrote:
 
   Hi everyone,
  
   I'm trying to use Views for setting look and feel based on specific
user
   logged on the web site. So far I cannot even make very basic view
 working:
  
   map:views
   map:view from-label=xsltran name=xsltran
   map:transform src=stylesheets/xsl/welcome.xsl/
   map:serialize/
   /map:view
   /map:views
  
   map:pipelines
   map:pipeline
   map:match pattern=site/*
 ...
 map:match pattern=site/workframe
   map:label name=xsltran
   map:generate
 src=content/xml/welcome.xml/
   /map:label
   map:transform
 src=stylesheets/xsl/welcome1.xsl/
   map:serialize/
 /map:match
 ...
   /map:match
   /map:pipeline
   map:pipelines
 
  What version are you using? In the current 2.0 and HEAD branches of the
  CVS there isn't a map:label anymore. So you need to specify it this way:
 
   map:match pattern=site/workframe
 map:generate src=content/xml/welcome.xml labelxsltran/
 map:transform src=stylesheets/xsl/welcome1.xsl/
 map:serialize/
   /map:match
 
  Giacomo
 
  
   this falls through welcome1.xsl, but not through welcome.xsl which
   suppose to be called from the xsltran view...
  
   What is my mistake?
  
   Thanks,
   Alexander Smirnoff
  
  
   -
   Please check that your question has not already been answered in the
   FAQ before posting. http://xml.apache.org/cocoon/faqs.html
  
   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. http://xml.apache.org/cocoon/faqs.html
 
  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. http://xml.apache.org/cocoon/faqs.html

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



?xml version=1.0 encoding=ISO-8859-1?
map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
!-- === Components  --
map:components
map:generators default=file
map:generator name=file src=org.apache.cocoon.generation.FileGenerator/
/map:generators
map:transformers default=xslt
map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer
use-storetrue/use-store
use-request-parametersfalse/use-request-parameters
use-browser-capabilities-dbfalse/use-browser-capabilities-db
/map:transformer
/map:transformers
map:serializers default=html
map:serializer mime-type=text/html name=html src=org.apache.cocoon.serialization.HTMLSerializer/
/map:serializers
map:matchers default=wildcard
map:matcher name=wildcard src=org.apache.cocoon.matching.WildcardURIMatcherFactory/
/map:matchers
/map:components
!-- === Views === --
map:views
map:view from-label=xsltran name=xsltran
map:transform src=stylesheets/xsl/welcome.xsl/
map:serialize/
/map:view
/map:views
!-- === Pipelines = --
map:pipelines
map:pipeline
map:match pattern=home
map:generate src=content/xml/welcome.xml label=xsltran

Re: Look-and-feel approach with views

2001-11-26 Thread Alexander Smirnoff

OK. I've got it.

Well, is it possible to trigger the view from inside sitemap? What about
Passing parameters?

I think the idea of breaking pipeline and continuing it from another
resource-like pipeline (view) from labeled predefined point is very
powerful. Imagine having the same long chain of transformations through
group or even all of pipelines in the sitemap! From my point of view it
makes sitemap more unreadable. From the other side, if you have some
resource-like view which could be processed from any pipeline and being
returned to the point of entry will make readability of sitemap more
easy...

Something like that:
!-- declaration --
map:chain name=look-feel
!-- action get-user-skin :-) defines path to the source of the
skin --
map:act type=get-user-skin
map:transform src={srcpath}/{src}/
/map:act
map:transform src=default/{src}/
/map:chain

!-- from pipline --
map:match pattern=...
map:generate src=welcome.xml/
map:call-chain name=look-feel
map:parameter name=src value=welcome.xsl/
/map:call-chain
map:serialize/
/map:match

This is just a random thought. Sorry for being naive if this is the
case...Probably there are some workaround which I don't know, - I'll be glad
to comprehend.

Thanks,
Alex.


- Original Message -
From: giacomo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 26, 2001 2:46 PM
Subject: Re: Look-and-feel approach with views


 On Mon, 26 Nov 2001, Alexander Smirnoff wrote:

  I'm using 2.0rc1, but even if I put label=xsltran into generator...
  declaration this doesnt work either...
 
  I feel that I misundersatnd the concept. It seems, for example, in
webapp
  sitemap.xconf (in HEAD branch) the view declaration like:
 
  map:view name=links from-position=last
 map:serialize type=links/
  /map:view
 
  never executes... Otherwise it supposed to be executed for every pipline
  after last component in pipline... So I'm really confused...

 If you don't request that view it will never be executed :) use a

 http://localhost:8080/cocoon/welcome?cocoon-view=links

 and you'll get all the links in the welcome page as response.

 Giacomo

 
  Thanks,
  Alex.
 
   On Fri, 23 Nov 2001, Alexander Smirnoff wrote:
  
Hi everyone,
   
I'm trying to use Views for setting look and feel based on specific
user
logged on the web site. So far I cannot even make very basic view
  working:
   
map:views
map:view from-label=xsltran name=xsltran
map:transform src=stylesheets/xsl/welcome.xsl/
map:serialize/
/map:view
/map:views
   
map:pipelines
map:pipeline
map:match pattern=site/*
  ...
  map:match pattern=site/workframe
map:label name=xsltran
map:generate
  src=content/xml/welcome.xml/
/map:label
map:transform
  src=stylesheets/xsl/welcome1.xsl/
map:serialize/
  /map:match
  ...
/map:match
/map:pipeline
map:pipelines
  
   What version are you using? In the current 2.0 and HEAD branches of
the
   CVS there isn't a map:label anymore. So you need to specify it this
way:
  
map:match pattern=site/workframe
  map:generate src=content/xml/welcome.xml
labelxsltran/
  map:transform src=stylesheets/xsl/welcome1.xsl/
  map:serialize/
/map:match
  
   Giacomo
  
   
this falls through welcome1.xsl, but not through welcome.xsl
which
suppose to be called from the xsltran view...
   
What is my mistake?
   
Thanks,
Alexander Smirnoff
   
   
  
 -
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html
   
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. http://xml.apache.org/cocoon/faqs.html
  
   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. http://xml.apache.org/cocoon/faqs.html
 
  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. http://xml.apache.org/cocoon

Re: Look-and-feel approach with views

2001-11-26 Thread Alexander Smirnoff

OK. Then how could I implement dynamically look-and-feel based on user
credentials (customer-id, user_id) ? I see only one possible way: inserting
action for each XSL transformation in each pipeline... That approach makes
sitemap look even more ugly...

Comments are follows,
Alex.
- Original Message -
From: giacomo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 26, 2001 5:50 PM
Subject: Re: Look-and-feel approach with views


 On Mon, 26 Nov 2001, Alexander Smirnoff wrote:

  OK. I've got it.
 
  Well, is it possible to trigger the view from inside sitemap? What about
  Passing parameters?
 
  I think the idea of breaking pipeline and continuing it from another
  resource-like pipeline (view) from labeled predefined point is very
  powerful. Imagine having the same long chain of transformations through
  group or even all of pipelines in the sitemap! From my point of view it
  makes sitemap more unreadable. From the other side, if you have some
  resource-like view which could be processed from any pipeline and
being
  returned to the point of entry will make readability of sitemap more
  easy...
 
  Something like that:
  !-- declaration --
  map:chain name=look-feel
  !-- action get-user-skin :-) defines path to the source of the
  skin --
  map:act type=get-user-skin
  map:transform src={srcpath}/{src}/
  /map:act
  map:transform src=default/{src}/
  /map:chain
 
  !-- from pipline --
  map:match pattern=...
  map:generate src=welcome.xml/
  map:call-chain name=look-feel
  map:parameter name=src value=welcome.xsl/
  /map:call-chain
  map:serialize/
  /map:match
 
  This is just a random thought. Sorry for being naive if this is the
  case...Probably there are some workaround which I don't know, - I'll be
glad
  to comprehend.

 I can't see what your approach is good for. Views aren't made for
 skinning. They are for producing view in the sense of schema, meta data,
 links etc. but not for green or red. If you like to use it that way, yes,
 your sitemap might look ugly then.

So what would be more elegant approach ? Use actions in each transformation
point in sitemap?


 Your proposed enhancement is only giving another programmers view
 into the sitemap which isn't what we initially wanted and is what
 we like to get fixed in the future.

The only proposition I made is to manipulate sitemap in orthogonal fashion
like views do. Why not?
I do understand...

What are the tradeoffs?


 Giacomo

 
  Thanks,
  Alex.
 
 
  - Original Message -
  From: giacomo [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, November 26, 2001 2:46 PM
  Subject: Re: Look-and-feel approach with views
 
 
   On Mon, 26 Nov 2001, Alexander Smirnoff wrote:
  
I'm using 2.0rc1, but even if I put label=xsltran into
generator...
declaration this doesnt work either...
   
I feel that I misundersatnd the concept. It seems, for example, in
  webapp
sitemap.xconf (in HEAD branch) the view declaration like:
   
map:view name=links from-position=last
   map:serialize type=links/
/map:view
   
never executes... Otherwise it supposed to be executed for every
pipline
after last component in pipline... So I'm really confused...
  
   If you don't request that view it will never be executed :) use a
  
   http://localhost:8080/cocoon/welcome?cocoon-view=links
  
   and you'll get all the links in the welcome page as response.
  
   Giacomo
  
   
Thanks,
Alex.
   
 On Fri, 23 Nov 2001, Alexander Smirnoff wrote:

  Hi everyone,
 
  I'm trying to use Views for setting look and feel based on
specific
  user
  logged on the web site. So far I cannot even make very basic
view
working:
 
  map:views
  map:view from-label=xsltran name=xsltran
  map:transform src=stylesheets/xsl/welcome.xsl/
  map:serialize/
  /map:view
  /map:views
 
  map:pipelines
  map:pipeline
  map:match pattern=site/*
...
map:match pattern=site/workframe
  map:label name=xsltran
  map:generate
src=content/xml/welcome.xml/
  /map:label
  map:transform
src=stylesheets/xsl/welcome1.xsl/
  map:serialize/
/map:match
...
  /map:match
  /map:pipeline
  map:pipelines

 What version are you using? In the current 2.0 and HEAD branches
of
  the
 CVS there isn't a map:label anymore. So you need to specify it
this
  way:

  map:match pattern=site/workframe
map:generate src=content/xml/welcome.xml
  labelxsltran/
map:transform src=stylesheets/xsl/welcome1.xsl

Selector question....

2001-10-31 Thread Alexander Smirnoff

What could be wrong in this snippet?

map:select type=parameter
map:parameter name=parameter-selector-test value={../role}/
map:when test=su
map:generate type=serverpages src=xsp/account_su.xsp/
/map:when
map:otherwise
map:generate type=serverpages src=xsp/account.xsp/
/map:otherwise
map:serialize type=xml/
/map:select

It doesn't work as expected and I'm getting irrelevant Exception:

java.net.SocketException: Connection aborted by peer: socket write error


Thanks,
Alex



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: Selector question....

2001-10-31 Thread Alexander Smirnoff

My bad, sorry: map:serialize type=xml/ must be outside map:select!

Alex.

- Original Message - 
From: Alexander Smirnoff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2001 1:33 PM
Subject: Selector question


 What could be wrong in this snippet?
 
 map:select type=parameter
 map:parameter name=parameter-selector-test value={../role}/
 map:when test=su
 map:generate type=serverpages src=xsp/account_su.xsp/
 /map:when
 map:otherwise
 map:generate type=serverpages src=xsp/account.xsp/
 /map:otherwise
 map:serialize type=xml/
 /map:select
 
 It doesn't work as expected and I'm getting irrelevant Exception:
 
 java.net.SocketException: Connection aborted by peer: socket write error
 
 
 Thanks,
 Alex
 
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 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. http://xml.apache.org/cocoon/faqs.html

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




Using Custom Component in Cocoon2

2001-10-19 Thread Alexander Smirnoff

Hi,

I have made custom Component and trying to access it from XSP file. It seems
that it passes OK all main steps of
composition/configuration/initialization, but somehow at the end I getting
the next exception:

org.apache.avalon.framework.component.ComponentException: Could not access
the Component
at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Unkno
wn Source) -- Why ? It seems that it found it ?
at
org.apache.cocoon.www.xsp.messages_xsp.generate(messages_xsp.java:278)
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:175)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:214)
...

thats the way how I look for it in XSP file:

com.gwvas.manager.Manager myComponent = (com.gwvas.manager.Manager)
manager.lookup(com.gwvas.manager.Manager);

thats the way how I defined it in cocoon.xconf

component role=com.gwvas.manager.Manager
class=com.gwvas.manager.DBCoreManager
dbpooldocuments/dbpool
/component

Component itself is attached to this email... Any ideas?

Thanks,
alex

 DBCoreManager.java

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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


About connecting pipelines - something is wrong.....

2001-10-04 Thread Alexander Smirnoff

Hi evryone,

The same problem still bothering me:

map:pipeline
 map:match pattern=request/messages
   map:generate src=cocoon:/req/
   map:serialize type=xml/
 /map:match
/map:pipeline
map:pipeline internal-only=true
 map:match pattern=req
   map:generate src=content/xml/cover.xml/
   map:serialize type=xml/
 /map:match
/map:pipeline

This example works fine, but when I use map:generate type=stream/ in the
second pipeline I'm getting an error: org.apache.cocoon.ProcessingException:
Exception in StreamGenerator.generate(): java.lang.ClassCastException:
org.apache.cocoon.environment.wrapper.RequestWrapper.

Is this a BUG? Or its just me?

My basic idea is to get request XML from the client, transform it with XSLT
into legal XSP, process it in the second pipeline and get it back to the
client.


Alexander Smirnoff


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: Aggregation Error

2001-10-02 Thread Alexander Smirnoff

Oops.. My bad... But I still have an aggregation problem with stream type of
generators:

map:match pattern=request
map:generate type=stream/
map:serialize type=xml/
/map:match
map:match pattern=request/messages
map:aggregate element=Response
map:part src=cocoon:/request/
/map:aggregate
map:serialize type=xml/
/map:match

Exception is:

Exception in StreamGenerator.generate(): java.lang.ClassCastException:
org.apache.cocoon.environment.wrapper.RequestWrapper

Maybe it doesnt inherit the environment from request/messages ? Ideas?

Alex.


- Original Message -
From: Morrison, John [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 11:28 AM
Subject: RE: Aggregation Error




  -Original Message-
  From: Alexander Smirnoff [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, 02 October 2001 4:20 pm
  To: [EMAIL PROTECTED]
  Subject: Aggregation Error
 
 
  Hi everyone,
 
  Maybe I do not get the idea of pipelines and the aggregation
  stuff, but this
  what happens:
 
  My sitemap has:
 
  map:pipeline
  
 map:match pattern=account
 map:generate src=xsp/account.xsp type=serverpages/
 map:serialize type=xml/
 /map:match
 map:match pattern=request/messages
 map:aggregate element=Response
 map:part src=cocoon:account/

 try

 map:part src=cocoon:/account/

 /map:aggregate
 map:serialize type=xml/
 /map:match
  
  /map:pipeline
 
  When I send http://loalhost:8080/mysite/request/messages
  cocoon goes wild by
  giving me Exception:
 
  Could not get sitemap source http://localhost:8080/mysite/account:
  java.lang.NullPointerException,
 
  but http://localhost:8080/mysite/account does work fine. Any ideas?
 
  Thanks,
  Alexander Smirnoff
 
 
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 ===
 Information in this email and any attachments are confidential, and may
 not be copied or used by anyone other than the addressee, nor disclosed
 to any third party without our permission.  There is no intention to
 create any legally binding contract or other commitment through the use
 of this email.

 Experian Limited (registration number 653331).
 Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

 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. http://xml.apache.org/cocoon/faqs.html

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




Re: Tomcat 4.0 final and Cocoon 2.0rc1 again...

2001-09-26 Thread Alexander Smirnoff

I had many times the same error. Unfotunately the error message you get in
the browser is incomplete and does not include the actual Exception causing
the fault. You Look better into cocoon.log and at the bottom of exception
bundle
you'll find the answer.

In my case there were few classes decleared in sitemap, which are not
compiled
by default with cocoon2:

- org.apache.cocoon.transformation.LDAPTransformer
- org.apache.cocoon.matching.WildcardSessionStateMatcherFactory

I would be very thanksfull if experienced folks could explain what are those
and
where to look for documentations.

Alex.

- Original Message -
From: Didier Villevalois [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 26, 2001 12:30 PM
Subject: Tomcat 4.0 final and Cocoon 2.0rc1 again...


 Hello,

 I'm trying to run Cocoon 2.0rc1 with Tomcat 4.0 final on a Linux Debian.

 I tried all the tips provided yesterday on the mailing list:
 - Empty CLASSPATH while building cocoon.war
 - Replacement of the jaxp.jar and crimson.jar libs

 But i encounter the same problem again:

 *type* internal-server-error

 *message*_Exception in Handler_

 *description*_ org.apache.cocoon.ProcessingException: Exception in
 Handler: org.apache.avalon.framework.component.ComponentException: Could
 not set up Component for hint: org/apache/cocoon/www/sitemap_xmap_

 *sender* org.apache.cocoon.servlet.CocoonServlet

 *source* Cocoon servlet

 *request-uri*

 /cocoon/

 *exception*

 org.apache.cocoon.ProcessingException: Exception in Handler:
org.apache.avalon.framework.component.ComponentException: Could not set up
Component for hint: org/apache/cocoon/www/sitemap_xmap

 *path-info*

 *stacktrace*

 org.apache.cocoon.ProcessingException: Exception in Handler:
org.apache.avalon.framework.component.ComponentException: Could not set up
Component for hint: org/apache/cocoon/www/sitemap_xmap
 at
org.apache.cocoon.sitemap.Handler.throwEventualException(Handler.java:244)
 at org.apache.cocoon.sitemap.Handler.regenerate(Handler.java:155)
 at org.apache.cocoon.sitemap.Manager.getHandler(Manager.java:232)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:109)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:495)
 at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:534)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
 at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
 at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.connector.http.HttpProcessor.process(Unknown
Source)
 at org.apache.catalina.connector.http.HttpProcessor.run(Unknown Source)
 at java.lang.Thread.run(Thread.java:484)
 org.apache.avalon.framework.component.ComponentException: Could not set up
Component for hint: org/apache/cocoon/www/sitemap_xmap
 at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerat
or(GeneratorSelector.java:152)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addComp
iledComponent(ProgramGeneratorImpl.java:348)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:326)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
esource(ProgramGeneratorImpl.java:275)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:192)
 at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
 at java.lang.Thread.run(Thread.java:484)

 Please let me know if you have the solution.
 Thanks. Didier.


 

Logging problem

2001-09-25 Thread Alexander Smirnoff

Hi all,

Some newbie question arised.

 I use c2b2 and cannot see the log files where it 
suppose to be. This is my log definition in web.xml:

...
  init-param
   param-namelog-level/param-name
   param-valueDEBUG/param-value
  /init-param
  init-param
   param-namelog-dir/param-name
   param-value/WEB-INF/logs/param-value
  /init-param
  init-param
   param-namelog-name/param-name
   param-valuemy.log/param-value
  /init-param
...

So the problem is that /WEB-INF/logs is empty and all cocoons 
logging goes to catalina's log files. What I did wrong?

Thanks in adnvance,
Alexander Smirnoff


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




XML Stream Selector

2001-09-24 Thread Alexander Smirnoff

Hi,
Lets say I have to dispatch XML sended in POST request body. There are many
differnet types of XML data which I would like to dipatch to correspondent
transformer. How could I do that?
Thanks,
Alex.


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




DTD or schema?

2001-09-19 Thread Alexander Smirnoff

Does exist any documented schema or dtd specification of :
- cocoon.xconf
- sitemap.xmap
or in any else readable format?

Thanks,
Alexander Smirnoff



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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