Using own application components in Cocoon

2002-12-03 Thread Vermeulen, Francis
Hi folks,

cab anyone tell me what the recommended way is to add Avalon/Excalibur
components to the Cocoon configuration? I guessed it is by adding
component entries in cocoon.xconf, but this is nowhere explicitely
mentioned in the developers docs. Related to this: does Cocoon use an
Excalibur role manager so that roles and components can be defined
independently? Can role entries be added to cocoon.xconf? Thanks for your
help.

Regards,


Ing. FRA Vermeulen
Senior J2EE Architect
ECM Solutions - Eindhoven
mobiel: +31 (0) 6 222 03 856
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]




Re: Sendmail serial email

2002-12-03 Thread Thorsten Scherler
Dear Ray, dear all,

thanks for the reply!

Ray Martin wrote:

Sir,
I too experienced that no one would give any answers.  But, i am wondering
if the cocoon-users mail list server is always behaving correctly.  i am
subscribed to the cocoon-users list, but this is the first time that i have
seen your message.  i did not receive any of your previous postings on this
question.


...and I have posted a lot.



i too got sendmail to work for me slightly.  however, i was never able to
get sendmail to authenticate or to attach a file.

i gave up on sendmail.  Instead i use an action in which i have some JAVA
mail client code.  Now i can control the code exactly to meet my
requirements.  i am no longer dependent on code that has no documentation
beyond a simple tutorial - which in its own self was very interesting - just
no clues as to how to proceed with such things as authentication and file
attachment.

if i can help in any way - a code snippet? - let me know. if you are going
to continue with sendmail, i cannot help.


YES PLEASE LET ME KNOW HOW YOU DID IT. I am not married to sendmail.

You are right in saying the tutorial is not enough, because to attach 
something to mail is quite basic stuff you want to do with mail.

authentication is no point at the moment but it should be possible.


another subject - i know that you are talking about attaching a file to an
email.  but, while we are on the subject of attaching files.  if there is
ever a time when you want to attach a file to an HTTP request  (file
uploading) - cocoon does this automatically.  i was going crazy trying to
figure out how to do it - i accidentally looked in the cocoon upload
directory and there the file was - sitting right there as nice as could be -
kinda like magic.  i would like to know more about the class that was used
to parse the multipart form, but i have not been able to fidn it just yet.

good luck with sending emails,

Ray



-Original Message-
From: Scherler, Thorsten [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: AW: Sendmail serial email


Hello group,

I don't know why I don't get any answers on that topic, but it is
quit frustrating.

http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon-p2.ht


ml#sidebar1


There you can find how to nested a esql with sendmail.

It is working!

Now I just suffering how to attach a pdf.

...but I don't think I will get any answers on that,or?

:-(

-Ursprüngliche Nachricht-
Von: Scherler, Thorsten
Gesendet: Montag, 2. Dezember 2002 13:58
An: Cocoon-Dev (E-Mail); Cocoon-Users (E-Mail)
Betreff: Sendmail serial email


Hello group,

I am still trying to send a serial email with cocoon ... and I am
stucked big time

I got the sendmail logic sheet runnig (without the possiblity to
attach a file or a URL).

I have my query (with esql) running.

Now I want to do the following:
The query looks for the date on which information has to be send
(info.xsp:)
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:esql=http://apache.org/cocoon/SQL/v2;
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
dataset
esql:connection
esql:poolIDC2/esql:pool
esql:execute-query
esql:query
select * from info where Info_datum = #xsp-request:get-parameter
name=date/#
address
bname1
esql:get-string column=business_name/
/bname1
bname2
esql:get-string column=business_name_2/
/bname2
bname3
esql:get-string column=business_name_3/
/bname3
street
esql:get-string column=address/
/street
ZIP
esql:get-string column=zip_code/
/ZIP
City
esql:get-string column=city/
/City
country
esql:get-string column=country/
/country
telephone_number
esql:get-string column=telephone_number/
/telephone_number
/address
aktion
Info_datum
esql:get-date column=Info_datum/
/Info_datum
/aktion
WD
district
esql:get-string column=district/
/district
ADM
name
esql:get-string column=ADM/
/name
email
esql:get-string column=ADM_email/
/email
/ADM
/WD
/client
/esql:row-results
/esql:results
esql:no-results/
esql:error-results/
/esql:execute-query
/esql:connection
/dataset
/xsp:page

Now I want to send each ADM an eMail.
I have the following sendmail.xsp. I have to replace empfaenger
with the emailesql:get-string column=ADM_email//email :

?xml version=1.0 encoding=UTF-8?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
xmlns:sendmail=http://apache.org/cocoon/sendmail/1.0;
page
xsp:expr
xsp-request:get-parameter name=./ADM/email/
/xsp:expr
xsp:logic
  String empfaenger =
  [EMAIL PROTECTED]\n;
 /xsp:logic
xsp:logic
  String text =
  \n+
  something\n+
  \n+
  more:\n+
  empfaenger;
  /xsp:logic
xsp-request:get-parameter name=date/
sendmail:send-mail
sendmail:charsetISO-8859-1/sendmail:charset
sendmail:from[EMAIL PROTECTED]/sendmail:from
sendmail:to
xsp:exprempfaenger/xsp:expr
/sendmail:to
sendmail:cc
xsp:exprempfaenger/xsp:expr
/sendmail:cc
sendmail:subjectD 200203 V/sendmail:subject
!-- Modify the next line to 

Anyway to handle a servlet exception inside the sitemap

2002-12-03 Thread Jordi Valldaura i Riqué
Hi,

I have several servlets on my application, and I want to handle their 
exceptions with handle-errors...

I've tried map:redirect ... to call the servlets but when a servlet 
throws an exception I only get a white page. Then I tried map:generate 
src=myservlet but the sitemap gives me an error(cannot find myservlet).

Is there any generator to call servlets or anyway to catch servlet 
exceptions inside cocoon sitemap?

Thanks in advance


Jordi Valldaura i Riqué
CSI - Centre de Serveis Informàtics
Enginyeria i Arquitectura La Salle
Universitat Ramón Llull



-
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: XMLForm and Table output

2002-12-03 Thread Kirchhoff, Lars
Can somebody explain me why there are two stylesheets used for 
the transformation in the XMLWizard Howto example?

What is the reason to separate the transformation in two different
files?

Lars

 -Ursprüngliche Nachricht-
 Von: Kirchhoff, Lars 
 Gesendet: Dienstag, 3. Dezember 2002 12:58
 An: '[EMAIL PROTECTED]'
 Betreff: Re: XMLForm and Table output
 
 
 I mean NOW I can access the dom..
 
  -Ursprüngliche Nachricht-
  Von: Kirchhoff, Lars 
  Gesendet: Dienstag, 3. Dezember 2002 12:54
  An: '[EMAIL PROTECTED]'
  Betreff: AW: XMLForm and Table output
  
  
  no I didn't, but I forget to set the get and set method in 
  the JavaBean.
  No I can access the dom   with the following:
  
  xf:selectMany ref=/system selectUIType=checkbox
xf:captionUsername:/xf:caption
  xf:itemset nodeset=/system
  xf:caption ref=user/custname/
  /xf:itemset
  /xf:selectMany
  
  xf:captionUserlist:/xf:caption
  xf:repeat nodeset=/system id=system
  xf:textbox ref=user/custname 
  class=info/xf:textbox
  xf:textbox ref=user/address 
  class=info/xf:textbox
  xf:textbox ref=user/zip class=info/xf:textbox
  xf:textbox ref=user/city class=info/xf:textbox
  /xf:repeat
  
  but the funny thing is, that I only can access the first 
  user element. I
  don't 
  get all user elements.
  
   -Ursprüngliche Nachricht-
   Von: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
   Gesendet: Dienstag, 3. Dezember 2002 12:05
   An: [EMAIL PROTECTED]
   Betreff: Re: XMLForm and Table output
   
   
   Did you try setting your form model as a DocumentContainer 
   which contains
   the DOM object?
   
   
 http://jakarta.apache.org/commons/jxpath/users-guide.html#Containers
   
   
   
   
   - Original Message -
   From: Kirchhoff, Lars [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, December 02, 2002 8:35 PM
   Subject: AW: XMLForm and Table output
   
   
   maybe I was a bit unprecise. I already could see that the xml 
   output is
   correct.
   the only thing I'm still not sure is how to reference the dom 
   in the xml
   page.
   I tried the following:
   xf:repeat nodeset=/Users/user id=myUsers
   xf:textbox ref=custname class=info/xf:textbox
   xf:textbox ref=address class=info/xf:textbox
   xf:textbox ref=city class=info/xf:textbox
   xf:textbox ref=zip class=info/xf:textbox
   /xf:repeat
   
   and
   
   xf:selectMany ref=/ selectUIType=checkbox
 xf:captionUsernames:/xf:caption
 xf:itemset nodeset=/Users/user
   xf:caption ref=custname/
   xf:caption ref=address/
   xf:caption ref=city/
   xf:caption ref=zip/
 /xf:itemset
   /xf:selectMany
   
   and several others ... (but this seemed to be the most 
 logical ones
   after reading the xmlform specs from w3c)
   
   but it's not working. Now my guess is that probably the 
 data is not
   return probaply to the xml page or better the pipeline. In 
  the action
   java file I have this getForm().getModel(); statement and am now
   wondering if this returns all Data, not only the bean data?
   
   maybe you can help finding the light out of this...
   
   ciao Lars
   
-Ursprüngliche Nachricht-
Von: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 3. Dezember 2002 10:00
An: [EMAIL PROTECTED]
Betreff: Re: XMLForm and Table output
   
   
I am not sure what exactly the problem is,
but I guess you might be actually looking for a file reader 
   instead of
generator.
   
I have not really used Cocoon for printing.
   
Ivelin
   
   
- Original Message -
From: Kirchhoff, Lars [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 02, 2002 12:15 AM
Subject: AW: XMLForm and Table output
   
   
thanks Ivelin,
   
but now I'm right in front of a new problem, how to print out
the document
using
cocoon? I couldn't find a generator that gets the input right
from a stream?
Do I have to write my own generator? If yes, can you point 
   me to some
documentation
about this, because I couldn't found it.
   
thanks Lars
   
 -Ursprüngliche Nachricht-
 Von: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
 Gesendet: Sonntag, 1. Dezember 2002 00:03
 An: [EMAIL PROTECTED]
 Betreff: Re: XMLForm and Table output


 Yes. You are on the right track.
 Why don't you print the XML document once it is created to
see what it
 actually contains.
 I suspect this might be a simple mistake due to misuse of the
 API. It is not
 very convenient.
 Actually if you plan writing a lot of DOM code, you may want
 to look at JDOM
 or some of the O/R mapping frameworks.


 Ivelin



 - Original Message -
 From: Kirchhoff, Lars [EMAIL PROTECTED]
 

how to fix this bug???

2002-12-03 Thread Hong Gia Dinh
Title: how to fix this bug???





i ran my application with cocoon2.0.3 in Tomcat-4.1.x . it's ok
but when i ran it in JBOSS 3.0.4 it kept on reporting error like this :



Cocoon 2 - Internal server error


---


type fatal


message Language Exception


description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 22, column 49: cannot access class Component; file org\apache\avalon\framework\component\Component.class not found Line 23, column 53: cannot access class Configurable; file org\apache\avalon\framework\configuration\Configurable.class not found Line 24, column 53: cannot access class Configuration; file org\apache\avalon\framework\configuration\Configuration.class not found Line 25, column 53: cannot access class ConfigurationException; file org\apache\avalon\framework\configuration\ConfigurationException.class not found Line 26, column 53: cannot access class DefaultConfiguration; file org\apache\avalon\framework\configuration\DefaultConfiguration.class not found Line 27, column 50: cannot access class Parameters; file org\apache\avalon\framework\parameters\Parameters.class not found Line 29, column 29: cannot access class Constants; file org\apache\cocoon\Constants.class not found Line 30, column 29: cannot access class ProcessingException; file org\apache\cocoon\ProcessingException.class not found Line 31, column 29: cannot access class ResourceNotFoundException; file org\apache\cocoon\ResourceNotFoundException.class not found Line 32, column 29: cannot access class ConnectionResetException; file org\apache\cocoon\ConnectionResetException.class not found Line 33, column 36: cannot access class Action; file org\apache\cocoon\acting\Action.class not found Line 34, column 41: cannot access class Environment; file org\apache\cocoon\environment\Environment.class not found Line 35, column 41: cannot access class Redirector; file org\apache\cocoon\environment\Redirector.class not found Line 36, column 38: cannot access class Matcher; file org\apache\cocoon\matching\Matcher.class not found Line 37, column 38: cannot access class PreparableMatcher; file org\apache\cocoon\matching\PreparableMatcher.class not found Line 38, column 39: cannot access class Selector; file org\apache\cocoon\selection\Selector.class not found Line 39, column 37: cannot access class AbstractSitemap; file org\apache\cocoon\sitemap\AbstractSitemap.class not found Line 40, column 49: cannot access class StreamPipeline; file org\apache\cocoon\components\pipeline\StreamPipeline.class not found Line 41, column 49: cannot access class EventPipeline; file org\apache\cocoon\components\pipeline\EventPipeline.class not found Line 42, column 37: cannot access class Sitemap; file org\apache\cocoon\sitemap\Sitemap.class not found Line 43, column 37: cannot access class NotifyingGenerator; file org\apache\cocoon\sitemap\NotifyingGenerator.class not found Line 44, column 37: cannot access class ContentAggregator; file org\apache\cocoon\sitemap\ContentAggregator.class not found Line 45, column 37: cannot access class Manager; file org\apache\cocoon\sitemap\Manager.class not found Line 46, column 37: cannot access class SitemapRedirector; file org\apache\cocoon\sitemap\SitemapRedirector.class not found Line 47, column 37: cannot access class SitemapComponentSelector; file org\apache\cocoon\sitemap\SitemapComponentSelector.class not found Line 48, column 60: cannot access class XSPRequestHelper; file org\apache\cocoon\components\language\markup\xsp\XSPRequestHelper.class not found Line 49, column 60: cannot access class XSPResponseHelper; file org\apache\cocoon\components\language\markup\xsp\XSPResponseHelper.class not found Line 50, column 53: cannot access class NotifyingBuilder; file org\apache\cocoon\components\notification\NotifyingBuilder.class not found Line 51, column 53: cannot access class Notifying; file org\apache\cocoon\components\notification\Notifying.class not found Line 52, column 53: cannot access class SimpleNotifyingBean; file org\apache\cocoon\components\notification\SimpleNotifyingBean.class not found Line 63, column 38: class AbstractSitemap not found in class org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap Line 102, column 64: class Parameters not found in class org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap Line 114, column 79: class Parameters not found in class org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap Line 132, column 28: class Configuration not found in class org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap Line 132, column 55: class ConfigurationException not found in class org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap Line 680, column 37: class SitemapComponentSelector not found in class org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap Line 712, column 32: class 

Submit and xsp-request:get-parameter name ...

2002-12-03 Thread Johannes . Becker
Hi,

I have a select box with several entries (with values).
An onCange - event should post the the value of the selected entrie. I'm
trying to do this in as much javascrit as possible.

Here my code so far:

!-- This should post the value of the selected entrie to the interactive
xsp-page, but I don't know if this is the right approach
form name=reportFrm method=post action=interactive
  select name=report_id onchange=document.reportFrm.submit();
option value=XX/option


!-- This should get the passed parameters (the value of the selected
entrie)
function passedParameter()
{
xsp:logic
  String value = xsp-request:get-parameter name=report_id
/;
/xsp:logic
...

Thanks
Jonny




This electronic message contains information from the mmo2 plc Group which
may be
privileged or confidential. The information is intended to be for the use
of the
individual(s) or entity named above. If you are not the intended recipient
be aware
that any disclosure, copying, distribution or use of the contents of this
information
is prohibited. If you have received this electronic message in error,
please notify
us by telephone or email (to the numbers or address above) immediately.




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




cocoon 2 to WebSphere

2002-12-03 Thread Vasil I. Yaroshevich
Hello.

I want to install Cocoon 2 to WebSphere Application Server 4.0.4. What's
requirements for this task? Whether somebody did it?



Regards
Vasil Yaroshevich


-
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: Where does Cocoon store state between Tomcat restarts?

2002-12-03 Thread Alex McLintock
At 17:10 02/12/02, you wrote:

Tomcat/Cocoon on our production server has somehow reached a bad state after
attempting to launch our Web site. Tomcat restarts but does not respond to
any requests.



Are you sure that the previous tomcat is genuinely killed off? If it merely 
got stuck then you may think you restarted it, but in fact only started a 
new tomcat which is unable to grab the relevant ports.

Just a guess though

Alex





Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here 
http://www.OWAL.co.uk/oss_support/


-
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: Using own application components in Cocoon

2002-12-03 Thread Bruno Dumon
On Tue, 2002-12-03 at 09:12, Vermeulen, Francis wrote:
 Hi folks,
 
 cab anyone tell me what the recommended way is to add Avalon/Excalibur
 components to the Cocoon configuration? I guessed it is by adding
 component entries in cocoon.xconf, but this is nowhere explicitely
 mentioned in the developers docs.

That's the way to go indeed.

  Related to this: does Cocoon use an
 Excalibur role manager so that roles and components can be defined
 independently?

Yes (the default excalibur role manager)

  Can role entries be added to cocoon.xconf?

You need to create your own roles file, and refer to it using the
user-roles attribute on the cocoon element (the root element of the
cocoon.xconf file). This is also mentioned in the faq item at
http://xml.apache.org/cocoon/faq/faq-configure-c2.html

The use of a roles file optional though, you can also use the generic
component declaration syntax.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[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]




Re: Cocoon not compatible with latest Avalon/Excalibur version?

2002-12-03 Thread Bruno Dumon
On Mon, 2002-12-02 at 17:25, Vermeulen, Francis wrote:
 Hi folks,
 
 we are trying to invoke an application framework from within Cocoon by means
 of a custom transformer. This framework itself uses Avalon/Excalibur
 components through a separate component and role manager, instantiated from
 within the framework. The framework is developed using the version 4.1.2 of
 Avalon and 4.1 of Excalibur and works fine in stand-alonemode when invoked
 from our own servlet. However when invoked from the custom transformer in
 Cocoon version 2.0.3, the Avalon/Excalibur part doesn't work because we are
 then using the version supplied with Cocoon as libraries.

What exactly do you mean with doesn't work? Do you get any exceptions
or just strange behaviour?

  So to me it looks
 as if Cocoon comes bundled with its own version of Avalon/Excalibur that is
 not compatible with the latest release of these. 

Wouldn't it help to simply recompile your own framework against the
avalon libraries that ship with cocoon?

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[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]




Re: [Help] Session manager errors.

2002-12-03 Thread Antonio Gallardo
Hi.

I have another question.

I changed all the headers of the inside XSP pages from:

xmlns:xsp-session=http://apache.org/xsp/session/2.0;

to:

xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=false

Can this help?

Thanks in advance,

Antonio Gallardo.



Antonio Gallardo dijo:
 Hi.

 I am still having problem in a production environment with the session
 manager. There are 35 registered users. Of course the users sometimes
 does not close sessions.

 All the day everything works fine. But at the end of the day I was
 starting to get the following errors:

 1-Message: Handler information not found
   Description: org.apache.cocoon.ProcessingException: Handler
 information
 not found.

 2-Message: Exception in ServerPagesGenerator.generate()
   Description: org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.IllegalArgument:
 SessionManager.getContextFragment Context 'authentication' not found.

 3-Also I saw after that another error related with the ComponentManager
 lookup.


 Currently I was updated in the cocoon.xconf to:

 session-manager logger=core.session-manager pool-grow=4
 pool-max=100 pool-min=8/

 authentication-manager logger=core.authentication-manager
 pool-grow=4 pool-max=100 pool-min=8
 mediatypes default=html
 media name=wap useragent=Nokia/
 media name=wap useragent=UP/
 media name=wap useragent=Wapalizer/
 /mediatypes
 /authentication-manager

 Please note that I changed the value of attribute pool-max from 32
 to 100 in both elements:

 session-manager
 authentication-manager

 I will try tomorrow what will happends with this new config of
 cocoon.xconf

 Please note that the Squid proxy is now turned off. This let
 users'request go directly to the Cocoon server.

 Another problem is that still there are some problems with the session
 mixing. If I request a page from one user

 I forgotted: I am using Tomcat 4.1.12, Java 1.4.1_01, Cocoon 2.1 from
 25-Nov-2002 on Red Hat Linux 8.0.

 The computer is a PIII 600 with 384 MB of RAM.

 Please helpme.

 Antonio Gallardo






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




Re: [Help] Session manager errors.

2002-12-03 Thread Antonio Gallardo
Another question:

This issue can be generated by a bad release of some components?

xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=false

I am using the xsp-session:getxml tag, but I am suspecting that this tag
is not working good.

Here the original code:


public static DocumentFragment getXML(ComponentManager cm, String context,
String path) throws ProcessingException {

 DocumentFragment df = null;
 SessionManager sm = null;

 try {
 // Start looking up the manager
 sm = (SessionManager)cm.lookup(SessionManager.ROLE);
 // Make our work
 df = sm.getContextFragment(context, path);
 if (sm != null) {
 cm.release(sm);
 }
 } catch (ComponentException ce) {
throw new ProcessingException(Error during lookup of
SessionManager component., ce);
 }
 // End releasing the sessionmanager
return df;
 }
}

**
But now I was rewriting this to:
**

public static DocumentFragment getXML(ComponentManager cm, String
context, String path) throws ProcessingException {

   DocumentFragment df = null;
   SessionManager sm = null;

   // First check if there is a valid ComponentManager
   if (cm != null) {
  try {
// Check if SessionManager is avaliable into the ComponentManager
if (cm.hasComponent(SessionManager.ROLE)) {
  // Looking up the SessionManager
sm = (SessionManager)cm.lookup(SessionManager.ROLE);
// Check if the requested context is avaliable
if (sm.existsContext(context)) {
   // The context exist
   df = sm.getContextFragment(context, path);
}
else { // Context does not exist
;
}
if (sm!=null)
  cm.release(sm);
}
else
   ;
 } catch (ComponentException ce) {
throw new ProcessingException(ags: Unknown Error using
SessionManager component., ce);
 }
   }
   return df;
}
**

Antonio Gallardo


Antonio Gallardo dijo:
 Hi.

 I am still having problem in a production environment with the session
 manager. There are 35 registered users. Of course the users sometimes
 does not close sessions.

 All the day everything works fine. But at the end of the day I was
 starting to get the following errors:

 1-Message: Handler information not found
   Description: org.apache.cocoon.ProcessingException: Handler
 information
 not found.

 2-Message: Exception in ServerPagesGenerator.generate()
   Description: org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.IllegalArgument:
 SessionManager.getContextFragment Context 'authentication' not found.

 3-Also I saw after that another error related with the ComponentManager
 lookup.


 Currently I was updated in the cocoon.xconf to:

 session-manager logger=core.session-manager pool-grow=4
 pool-max=100 pool-min=8/

 authentication-manager logger=core.authentication-manager
 pool-grow=4 pool-max=100 pool-min=8
 mediatypes default=html
 media name=wap useragent=Nokia/
 media name=wap useragent=UP/
 media name=wap useragent=Wapalizer/
 /mediatypes
 /authentication-manager

 Please note that I changed the value of attribute pool-max from 32
 to 100 in both elements:

 session-manager
 authentication-manager

 I will try tomorrow what will happends with this new config of
 cocoon.xconf

 Please note that the Squid proxy is now turned off. This let
 users'request go directly to the Cocoon server.

 Another problem is that still there are some problems with the session
 mixing. If I request a page from one user

 I forgotted: I am using Tomcat 4.1.12, Java 1.4.1_01, Cocoon 2.1 from
 25-Nov-2002 on Red Hat Linux 8.0.

 The computer is a PIII 600 with 384 MB of RAM.

 Please helpme.

 Antonio Gallardo






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




RE: Cocoon not compatible with latest Avalon/Excalibur version?

2002-12-03 Thread Vermeulen, Francis
Hi Bruno,

thanks for your answers. In the meantime I did what you suggested and it
seems to work with our own instances of ExcaliburComponentManager and
DefaultRoleManager.

Regards,
Francis

-Original Message-
From: Bruno Dumon [mailto:[EMAIL PROTECTED]]
Sent: dinsdag 3 december 2002 11:38
To: [EMAIL PROTECTED]
Subject: Re: Cocoon not compatible with latest Avalon/Excalibur version?


On Mon, 2002-12-02 at 17:25, Vermeulen, Francis wrote:
 Hi folks,
 
 we are trying to invoke an application framework from within Cocoon by
means
 of a custom transformer. This framework itself uses Avalon/Excalibur
 components through a separate component and role manager, instantiated
from
 within the framework. The framework is developed using the version 4.1.2
of
 Avalon and 4.1 of Excalibur and works fine in stand-alonemode when
invoked
 from our own servlet. However when invoked from the custom transformer in
 Cocoon version 2.0.3, the Avalon/Excalibur part doesn't work because we
are
 then using the version supplied with Cocoon as libraries.

What exactly do you mean with doesn't work? Do you get any exceptions
or just strange behaviour?

  So to me it looks
 as if Cocoon comes bundled with its own version of Avalon/Excalibur that
is
 not compatible with the latest release of these. 

Wouldn't it help to simply recompile your own framework against the
avalon libraries that ship with cocoon?

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[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]


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




XSP create dynamic an element

2002-12-03 Thread Cocoon User

i call an .xsp page like
http://.../viewer.xsp?image=test.gif

i send the image file name
but i dont know how to create an image element with dynamic content for
the src attribute


i have the follow .xsp code

xsp:page
  xsp:logic xmlns:xscript=http://apache.org/xsp/xscript/1.0;
xmlns:xsp=http://apache.org/xsp;

String imageDisplay = request.getParameter(image);




how can i create here an img element with src attribute the
content of imageDisplay string variable?

exaple img src={imageDisplay content} width=100 height=100/



/xsp:page



thnx
Stavros Kounis



-
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: cocoon 2 to WebSphere

2002-12-03 Thread robert_hitchins
Vasil,

I've done this...all I had to do was to deploy the cocoon.war file 
using the admin console and restart the server...everything worked 
fairly seamlessly.  However, if you need to install under 3.5.X send me 
an email and I'll let you know the specifics of how to do it...it was 
NOT straightforward at all.

Bob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 5:11 AM
To: [EMAIL PROTECTED]
Subject: cocoon 2 to WebSphere


Hello.

I want to install Cocoon 2 to WebSphere Application Server 4.0.4. What's
requirements for this task? Whether somebody did it?



Regards
Vasil Yaroshevich


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




[Fwd: Re: Sendmail serial email]

2002-12-03 Thread Thorsten Scherler
 text/plain; charset=us-ascii; format=flowed: Unrecognized 
---BeginMessage---
Dear Ray, dear all,

thanks for the reply!

Ray Martin wrote:

Sir,
I too experienced that no one would give any answers.  But, i am wondering
if the cocoon-users mail list server is always behaving correctly.  i am
subscribed to the cocoon-users list, but this is the first time that i have
seen your message.  i did not receive any of your previous postings on this
question.


...and I have posted a lot.



i too got sendmail to work for me slightly.  however, i was never able to
get sendmail to authenticate or to attach a file.

i gave up on sendmail.  Instead i use an action in which i have some JAVA
mail client code.  Now i can control the code exactly to meet my
requirements.  i am no longer dependent on code that has no documentation
beyond a simple tutorial - which in its own self was very interesting - just
no clues as to how to proceed with such things as authentication and file
attachment.

if i can help in any way - a code snippet? - let me know. if you are going
to continue with sendmail, i cannot help.


YES PLEASE LET ME KNOW HOW YOU DID IT. I am not married to sendmail.

You are right in saying the tutorial is not enough, because to attach 
something to mail is quite basic stuff you want to do with mail.

authentication is no point at the moment but it should be possible.


another subject - i know that you are talking about attaching a file to an
email.  but, while we are on the subject of attaching files.  if there is
ever a time when you want to attach a file to an HTTP request  (file
uploading) - cocoon does this automatically.  i was going crazy trying to
figure out how to do it - i accidentally looked in the cocoon upload
directory and there the file was - sitting right there as nice as could be -
kinda like magic.  i would like to know more about the class that was used
to parse the multipart form, but i have not been able to fidn it just yet.

good luck with sending emails,

Ray



-Original Message-
From: Scherler, Thorsten [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: AW: Sendmail serial email


Hello group,

I don't know why I don't get any answers on that topic, but it is
quit frustrating.

http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon-p2.ht


ml#sidebar1


There you can find how to nested a esql with sendmail.

It is working!

Now I just suffering how to attach a pdf.

...but I don't think I will get any answers on that,or?

:-(

-Ursprüngliche Nachricht-
Von: Scherler, Thorsten
Gesendet: Montag, 2. Dezember 2002 13:58
An: Cocoon-Dev (E-Mail); Cocoon-Users (E-Mail)
Betreff: Sendmail serial email


Hello group,

I am still trying to send a serial email with cocoon ... and I am
stucked big time

I got the sendmail logic sheet runnig (without the possiblity to
attach a file or a URL).

I have my query (with esql) running.

Now I want to do the following:
The query looks for the date on which information has to be send
(info.xsp:)
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:esql=http://apache.org/cocoon/SQL/v2;
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
dataset
esql:connection
esql:poolIDC2/esql:pool
esql:execute-query
esql:query
select * from info where Info_datum = #xsp-request:get-parameter
name=date/#
address
bname1
esql:get-string column=business_name/
/bname1
bname2
esql:get-string column=business_name_2/
/bname2
bname3
esql:get-string column=business_name_3/
/bname3
street
esql:get-string column=address/
/street
ZIP
esql:get-string column=zip_code/
/ZIP
City
esql:get-string column=city/
/City
country
esql:get-string column=country/
/country
telephone_number
esql:get-string column=telephone_number/
/telephone_number
/address
aktion
Info_datum
esql:get-date column=Info_datum/
/Info_datum
/aktion
WD
district
esql:get-string column=district/
/district
ADM
name
esql:get-string column=ADM/
/name
email
esql:get-string column=ADM_email/
/email
/ADM
/WD
/client
/esql:row-results
/esql:results
esql:no-results/
esql:error-results/
/esql:execute-query
/esql:connection
/dataset
/xsp:page

Now I want to send each ADM an eMail.
I have the following sendmail.xsp. I have to replace empfaenger
with the emailesql:get-string column=ADM_email//email :

?xml version=1.0 encoding=UTF-8?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
xmlns:sendmail=http://apache.org/cocoon/sendmail/1.0;
page
xsp:expr
xsp-request:get-parameter name=./ADM/email/
/xsp:expr
xsp:logic
  String empfaenger =
  [EMAIL PROTECTED]\n;
 /xsp:logic
xsp:logic
  String text =
  \n+
  something\n+
  \n+
  more:\n+
  empfaenger;
  /xsp:logic
xsp-request:get-parameter name=date/
sendmail:send-mail
sendmail:charsetISO-8859-1/sendmail:charset
sendmail:from[EMAIL PROTECTED]/sendmail:from
sendmail:to
xsp:exprempfaenger/xsp:expr
/sendmail:to
sendmail:cc
xsp:exprempfaenger/xsp:expr

[2.1] - About Sessions

2002-12-03 Thread Antonio Gallardo
Hi Cocooners!

I am trying to fix an error in the xsp-session. See in bugzilla (13070).

Can someone explain if in the current 2.1 CVS is a different approach to
get session context from the following interfaces:

xsp-session
sesion-fw-block
authentication-fw-block
portal-fw-block

Will be possible in the future access the authentication framework using XSP?

Thanks in advance,

Antonio Gallardo



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




SVG - java socket exception

2002-12-03 Thread Chris Faulkner
Hello

I am getting on OK with Cocoon. I like it very much. I am using some JSP code as a 
generator. This creates some XML data which I apply xsl to transform to SVG. This is 
then serialised with 
svgxml and returned to the client. It all works fine. Except that, looking at my logs, 
very often, the first execution of the JSP returns this to stdout/stderr.

java.lang.RuntimeException: java.net.SocketException: Connection aborted by peer
: socket write error
at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
:3231)
at java.lang.Thread.run(Thread.java:479)

I can see in the logs that Cocoon automatically seems to fire the same JSP again. It 
then works on the next shot, I get my SVG displayed in my SVG viewing app and it is 
just fine. This is 
obviously slowing things up though. 

Any ideas - I am using Cocoon 2.0.3 on Tomcat 4.0.1, JDK 1.3.1_06 on W2K.

Thanks

Chris




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




Problems using the esql:error-results tag

2002-12-03 Thread boessem








Hi,



I am working on a simple
online registration tool, to register for exams. That for I have got a mysql database server, to insert and read the data.



Within that database I have
set a primary key that is made out of lets say the studentid,
and the id from the exam. I have set it to primary for the reason,
that no double entry can be done.



So if a student wants to
register to one exam twice, there is an exception saying, that there is a Duplicate
entry for that field. Now instead of throwing out the exception within cocoon, I
want to display something like, an error occurs instead. That
for I used the tag esql:error-results
to give a different message than that from cocoon.



Could anybody give me a hint
how that could be done.



__

Philipp Bößem

Heubnerstraße 10

09599 Freiberg



Tel: 03731/449142

Mob: 01794612471

Email: [EMAIL PROTECTED]










Re: Problems using the esql:error-results tag

2002-12-03 Thread Olivier GUCKERT
 Hi,

 

 I am working on a simple online registration tool, to register for exams. That for I 
have got a mysql database server, to insert and read the data.

 

 Within that database I have set a primary key that is made out of lets say the 
studentid, and the id from the exam. I have  set it to primary for the reason, that 
no double entry
 can be done.

 

 So if a student wants to register to one exam twice, there is an exception saying, 
that there is a Duplicate entry for that  field. Now instead of throwing out the 
exception within
 cocoon, I want to display something like, “an error occurs” instead”. That for I 
used the tag esql:error-results to give a  different message than that from cocoon.

If i understand tour problem, you just have to do :
esql:error-results
error
an error occurs
/error
/esql:error-results


 Could anybody give me a hint how that could be done.

If it doesn't match, you just have to telle me more ...

Olivier GUCKERT

-
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: XSP create dynamic an element

2002-12-03 Thread Stephen Ng
Try something like:

img
xsp:attribute
name=srcxsp:exprimageDisplay/xsp:expr/xsp:attribute
/img

--Steve
 -Original Message-
 From: Cocoon User [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, December 03, 2002 6:42 AM
 To: [EMAIL PROTECTED]
 Subject: XSP create dynamic an element
 
 
 
 i call an .xsp page like
 http://.../viewer.xsp?image=test.gif
 
 i send the image file name
 but i dont know how to create an image element with dynamic 
 content for the src attribute
 
 
 i have the follow .xsp code
 
 xsp:page
   xsp:logic xmlns:xscript=http://apache.org/xsp/xscript/1.0;
 xmlns:xsp=http://apache.org/xsp;
 
   String imageDisplay = request.getParameter(image);
 
 
   
 
   how can i create here an img element with src attribute the
 content of imageDisplay string variable?
 
   exaple img src={imageDisplay content} width=100 
 height=100/
 
   
 
 /xsp:page
 
 
 
 thnx
 Stavros Kounis
 
 
 
 -
 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]




escaping special characthers: xsp or xslt problem?

2002-12-03 Thread [EMAIL PROTECTED]
I'm reading some data from a database (mysql) using an xsp page.

My xsp is very simple, something like:
esql:results
  news
esql:row-results
  titleesql:get-string column=title//title
/esql:row-results
  /news
/esql:results

Then I fill a text field using this data:

input type=text name=title size=50 maxlength=100
  xsl:attribute name=valuexsl:value-of select=normalize-space
(news/title) disable-output-escaping=yes//xsl:attribute
/input

When I wrote my data into the database, I converted special characters 
like à to à (I think this is a good practice, but correct me 
if I'm wrong!).

My problem is that the result after XSLT processing is:
input maxlength=100 size=50 name=titolo type=text
value=amp;#224;
and this is not what I really want, 'cause the user don't see the 
character à but the string à.

As you can see, I've used the attribute disable-output-escaping, but 
the output IS escaped.
If I try to output the content of (news/title) with a simple xsl:value-
of select (not wrapped by xsl:attribute), the characther is displayed 
as I expect.

any suggestion?



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




how to serve static content from webserver?

2002-12-03 Thread Jakob

Hi there,

I want static files (images, js, css) be served by the web server (apache
port 80).

I have found a FAQ How can I improve performance by making the web-server
deliver the static contents? which partly answers this questions.

I have successfully followed steps 1 and 2.

However, the third list item  3. Reference the static contents in your
Cocoon app ... is not clear at all to me.  What am I supposed to do
exactly?

My XSLT stylesheet produces HTML output where, for example all images
paths are created as /rules/img/[imgname].gif.  Thus, I have created a
map:match element as this:

map:match pattern=/rules/img/*.gif
 map:call resource=resource_images
  map:parameter name=target value={1}/
 /map:call
/map:match

Ok, then I have created this resources snippet which I thought should be
called when the pattern is matched:

  map:resources
   map:resource name=resource_images
map:generate src=/rules/img/{target}.gif/
   /map:resource
  /map:resources

However, the url of an image is still localhost:8080/rules/img/[image].gif

So, I guess this is the wrong approach.  Anybody?

Thanks in advance,
Jakob.


-- 
Jakob.



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




JDOM

2002-12-03 Thread Sylvain.Thevoz
Hello,

Does Cocoon use JDOM?

Tank you
Sylvain

-
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: Using own application components in Cocoon

2002-12-03 Thread Geoff Howard
By they way, the faq mentioned below on declaring a
user roles file in cocoon.xconf may be incorrect (at
least for Catalina/Tomcat).  The path to the roles
file as shown should be an absolute reference.  i.e.,

cocoon version=2.0 user-roles=/WEB-INF/my.roles

See
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101769807107026w=2

Geoff Howard

--- Bruno Dumon [EMAIL PROTECTED] wrote:
 On Tue, 2002-12-03 at 09:12, Vermeulen, Francis
 wrote:
  Hi folks,
  
  cab anyone tell me what the recommended way is to
 add Avalon/Excalibur
  components to the Cocoon configuration? I guessed
 it is by adding
  component entries in cocoon.xconf, but this is
 nowhere explicitely
  mentioned in the developers docs.
 
 That's the way to go indeed.
 
   Related to this: does Cocoon use an
  Excalibur role manager so that roles and
 components can be defined
  independently?
 
 Yes (the default excalibur role manager)
 
   Can role entries be added to cocoon.xconf?
 
 You need to create your own roles file, and refer to
 it using the
 user-roles attribute on the cocoon element (the root
 element of the
 cocoon.xconf file). This is also mentioned in the
 faq item at

http://xml.apache.org/cocoon/faq/faq-configure-c2.html
 
 The use of a roles file optional though, you can
 also use the generic
 component declaration syntax.
 
 -- 
 Bruno Dumon
 http://outerthought.org/
 Outerthought - Open Source, Java  XML Competence
 Support Center
 [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]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Complicated setup

2002-12-03 Thread Jeremy Quinn
Hi All

Can anyone advise me on getting this complicated setup right?

We have a website that will have some stuff served by Cocoon and some 
served by Apache.

It is not easy to separate them out because we need to retain legacy 
URLs. Likewise, it is not possible to give Cocoon served material a URL 
prefix, primarily because we need Cocoon to serve the home page of the 
site.

From Cocoon:

	/
	/index
	/general/*
	/archive/*
	/x-space/*
	etc. (about 10 items)

From Apache:

	/images/*
	/movies/*
	/audio/*
	/x-spaceprojects/*
	/harlem/*
	etc. (also about 10 items)


And then we need Slide-based WebDAV access to the Cocoon based 
material, with Cocoon generating from the Slide repository . and 
this I have still never had working .

If necessary we /could/:
a) place all static content in a single directory and redirect (legacy 
URLs) into it from Cocoon.
b) use virtual-hosts, one for Cocoon and one for the static stuff and 
redirect from Cocoon. But redirecting to images etc. is not that great 
;)

I am getting confused with all the options .. virtual-hosts, 
web-app, JK, JK2 connectors and all the options in them!

Have any of you lot tried any of this before?
How did you approach it?

Many thanks for any help


regards Jeremy








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

2002-12-03 Thread Reinhard Poetz
Sylvain,

According to the lib/core and lib/optional directories JDOM is currently not
used. But if you need it (e.g. in a custom transformer) it's very easy to
use it.

Regards,
Reinhard

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 3:14 PM
 To: [EMAIL PROTECTED]
 Subject: JDOM


 Hello,

 Does Cocoon use JDOM?

 Tank you
 Sylvain

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




Re: how to serve static content from webserver?

2002-12-03 Thread Alex McLintock
At 14:04 03/12/02, you wrote:

I want static files (images, js, css) be served by the web server (apache
port 80).


You set up your Apache front end to serve static content - eg from a 
directory called images, or js, or static, and you set up apache to forward 
dynamic stuff to your java servlet engine and thus Cocoon.

What precisely is the problem you are having?

Alex



Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here 
http://www.OWAL.co.uk/oss_support/


-
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 serve static content from webserver?

2002-12-03 Thread Geoff Howard
by specifying :8080 you have forced (tomcat) to handle
the image - apache is only listening on 80.  Are you
saying that when you try the same url with default
port 80 you are not seeing the image?  If so,
something is wrong in your first two steps.  Once you
have configured apache to handle the images, you don't
need any of the resource pipeline setup you have
described below.  

How are you serving your dynamic pages?  If they are
on :8080 (no connector to apache, no port forwarding)
then the images are at 80, but you'll have to
construct absolute references to them
(http://localhost/rules/img/[imgname].gif).  Relative
references (/rules...) will reference back to :8080
and bypass.

If, on the other hand you are using some method to
cause your servlet container to be accessed on default
port 80, you need to look into how you are
accomplishing that and whether it is overriding your
attempt to let apache handle static images.

HTH, 
Geoff Howard

--- Jakob [EMAIL PROTECTED] wrote:
 
 Hi there,
 
 I want static files (images, js, css) be served by
 the web server (apache
 port 80).
 
 I have found a FAQ How can I improve performance by
 making the web-server
 deliver the static contents? which partly answers
 this questions.
 
 I have successfully followed steps 1 and 2.
 
 However, the third list item  3. Reference the
 static contents in your
 Cocoon app ... is not clear at all to me.  What am
 I supposed to do
 exactly?
 
 My XSLT stylesheet produces HTML output where, for
 example all images
 paths are created as /rules/img/[imgname].gif. 
 Thus, I have created a
 map:match element as this:
 
 map:match pattern=/rules/img/*.gif
  map:call resource=resource_images
   map:parameter name=target value={1}/
  /map:call
 /map:match
 
 Ok, then I have created this resources snippet which
 I thought should be
 called when the pattern is matched:
 
   map:resources
map:resource name=resource_images
 map:generate src=/rules/img/{target}.gif/
/map:resource
   /map:resources
 
 However, the url of an image is still
 localhost:8080/rules/img/[image].gif
 
 So, I guess this is the wrong approach.  Anybody?
 
 Thanks in advance,
 Jakob.
 
 
 -- 
 Jakob.
 
 
 

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


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




AW: Problems using the esql:error-results tag

2002-12-03 Thread boessem
Hi,

Thank for answering.

totaly right. My problem in this case is, that i dont want the common
internal server error message, rather than my own, to explain what
mistake took place.

Here is my code, to give you a better idea of what I want. 

esql:execute-query
esql:query
insert
into
anmeldung

(studid,matr,vorname,name,email,id,klausur) 
values 

('xsp-request:get-parameter name=matr/xsp-request:get-parameter
name=id/','xsp-request:get-parameter
name=matr/','xsp-request:get-parameter
name=vorname/','xsp-request:get-parameter
name=name/','xsp-request:get-parameter
name=email/','xsp-request:get-parameter
name=id/','xsp-request:get-parameter name=fach/')
/esql:query
esql:error-results
errorAn error
occurred/error
/esql:error-results
/esql:execute-query

is there maybe something to change within the pipeling, or some where
else, or is my source code just wrong?

When I do it this way, there is still the same cocoon pre-set error
message.

-Ursprüngliche Nachricht-
Von: Olivier GUCKERT [mailto:[EMAIL PROTECTED]] 
Gesendet: Dienstag, 3. Dezember 2002 14:07
An: [EMAIL PROTECTED]
Betreff: Re: Problems using the esql:error-results tag

 Hi,

 

 I am working on a simple online registration tool, to register for
exams. That for I have got a mysql database server, to insert and read
the data.

 

 Within that database I have set a primary key that is made out of lets
say the studentid, and the id from the exam. I have  set it to primary
for the reason, that no double entry
 can be done.

 

 So if a student wants to register to one exam twice, there is an
exception saying, that there is a Duplicate entry for that  field. Now
instead of throwing out the exception within
 cocoon, I want to display something like, “an error occurs” instead”.
That for I used the tag esql:error-results to give a  different
message than that from cocoon.

If i understand tour problem, you just have to do :
esql:error-results
error
an error occurs
/error
/esql:error-results


 Could anybody give me a hint how that could be done.

If it doesn't match, you just have to telle me more ...

Olivier GUCKERT

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




Re: AW: Problems using the esql:error-results tag

2002-12-03 Thread Antonio Gallardo
If you are using modular Database actions you can turn of the throw of
exceptions:

Here is the config:

   !-- Modular DB --
   map:action name=mod-db-add
src=org.apache.cocoon.acting.modular.DatabaseAddAction
  descriptordatabase.xml/descriptor
  inputrequest-param/input
  outputrequest-attr/output
  throw-exceptiontrue/throw-exception
   /map:action
   map:action name=mod-db-upd
src=org.apache.cocoon.acting.modular.DatabaseUpdateAction
  descriptordatabase.xml/descriptor
  inputrequest-param/input
  outputrequest-attr/output
  throw-exceptionfalse/throw-exception
   /map:action
   map:action name=mod-db-del
src=org.apache.cocoon.acting.modular.DatabaseDeleteAction
  descriptordatabase.xml/descriptor
  inputrequest-param/input
  outputrequest-attr/output
  throw-exceptionfalse/throw-exception
   /map:action

Antonio Gallardo

boessem dijo:
 Hi,

 Thank for answering.

 totaly right. My problem in this case is, that i dont want the common
 internal server error message, rather than my own, to explain what
 mistake took place.

 Here is my code, to give you a better idea of what I want.

   esql:execute-query
   esql:query
   insert
   into
 anmeldung

 (studid,matr,vorname,name,email,id,klausur)
   values

 ('xsp-request:get-parameter name=matr/xsp-request:get-parameter
 name=id/','xsp-request:get-parameter
 name=matr/','xsp-request:get-parameter
 name=vorname/','xsp-request:get-parameter
 name=name/','xsp-request:get-parameter
 name=email/','xsp-request:get-parameter
 name=id/','xsp-request:get-parameter name=fach/')
   /esql:query
   esql:error-results
   errorAn error
 occurred/error
   /esql:error-results
   /esql:execute-query

 is there maybe something to change within the pipeling, or some where
 else, or is my source code just wrong?

 When I do it this way, there is still the same cocoon pre-set error
 message.

 -Ursprüngliche Nachricht-
 Von: Olivier GUCKERT [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 3. Dezember 2002 14:07
 An: [EMAIL PROTECTED]
 Betreff: Re: Problems using the esql:error-results tag

 Hi,



 I am working on a simple online registration tool, to register for
 exams. That for I have got a mysql database server, to insert and read
 the data.



 Within that database I have set a primary key that is made out of lets
 say the studentid, and the id from the exam. I have  set it to primary
 for the reason, that no double entry
 can be done.



 So if a student wants to register to one exam twice, there is an
 exception saying, that there is a Duplicate entry for that  field. Now
 instead of throwing out the exception within
 cocoon, I want to display something like, “an error occurs” instead”.
 That for I used the tag esql:error-results to give a  different
 message than that from cocoon.

 If i understand tour problem, you just have to do :
 esql:error-results
   error
   an error occurs
   /error
 /esql:error-results


 Could anybody give me a hint how that could be done.

 If it doesn't match, you just have to telle me more ...

 Olivier GUCKERT

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




-
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: Complicated setup

2002-12-03 Thread Andrew Savory

On Tue, 3 Dec 2002, Jeremy Quinn wrote:

 We have a website that will have some stuff served by Cocoon and some
 served by Apache.

Is the stuff served by Apache static content, ie html, mpeg, avi, etc?

 It is not easy to separate them out because we need to retain legacy
 URLs. Likewise, it is not possible to give Cocoon served material a URL
 prefix, primarily because we need Cocoon to serve the home page of the
 site.

Ok, I'd get Cocoon to serve the whole lot (assuming you want to gradually
replace legacy stuff with Cocoon anyway), but use the sitemap to pass
through the legacy bits.

  From Apache:

   /images/*

eg:
  map:match pattern=/images/**.jpg
map:read src=/legacy/root/images/{1}.jpg mime-type=image/jpg/
  /map:match

   /movies/*

eg:
  map:match pattern=/movies/**.avi
map:read src=/legacy/root/movies/{1}.avi mime-type=video/x-msvideo/
  /map:match

 And then we need Slide-based WebDAV access to the Cocoon based
 material, with Cocoon generating from the Slide repository . and
 this I have still never had working .

Not used this, so can't help, sorry.

 a) place all static content in a single directory and redirect (legacy
 URLs) into it from Cocoon.

I'd leave it where it is, and get Cocoon to do the hard work of dealing
with legacy urls.


Hope that helps,

Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk


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

2002-12-03 Thread Sylvain.Thevoz
OK, thank you Reinhard.

I don't plan to use JDOM in a custom transformer but your remark is very interesting. 
What do you think about? Have you an example of use?

Regards
Sylvain

-Message d'origine-
De: Reinhard Poetz [mailto:[EMAIL PROTECTED]]
Date: mardi, 3. décembre 2002 15:38
À: [EMAIL PROTECTED]
Objet: RE: JDOM


Sylvain,

According to the lib/core and lib/optional directories JDOM is currently not
used. But if you need it (e.g. in a custom transformer) it's very easy to
use it.

Regards,
Reinhard

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 3:14 PM
 To: [EMAIL PROTECTED]
 Subject: JDOM


 Hello,

 Does Cocoon use JDOM?

 Tank you
 Sylvain

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


-
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: RE: cocoon 2 to WebSphere

2002-12-03 Thread Gernot Koller
Hi!

I'm currently trying to get Cocoon 2.1 (i.e. CVS Head) running on Websphere 4.x,
or to be more exact on the Integreated Websphere Test Environment of WSAD 4.1.0.
While every things works perfectly well with Tomcat, on Webshpere I experience problems
with redirects. For example: trying to laucht the cocoon sample page with
http://localhost:8080/cocoon/samples/
wrongly redirects me to the following url:
http://localhost:8080/cocoon/cocoon/samples/welcome
which is obviosly wrong (two successive coocon/ entries) and therefore only results
in a fatal Internal Server Error: Failed to load sitemap...

Entereing the correct URL directly (i.e. http://localhost:8080/cocoon/samples/welcome)
works perfectly well.

Any clues what to do ?

thanks,

Gernot.


03.12.2002 13:25:06, [EMAIL PROTECTED] wrote:

Vasil,

I've done this...all I had to do was to deploy the cocoon.war file 
using the admin console and restart the server...everything worked 
fairly seamlessly.  However, if you need to install under 3.5.X send me 
an email and I'll let you know the specifics of how to do it...it was 
NOT straightforward at all.

Bob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 5:11 AM
To: [EMAIL PROTECTED]
Subject: cocoon 2 to WebSphere


Hello.

I want to install Cocoon 2 to WebSphere Application Server 4.0.4. What's
requirements for this task? Whether somebody did it?



Regards
Vasil Yaroshevich


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






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

2002-12-03 Thread Reinhard Poetz
No, it was only a thought.

Regards,
Reinhard

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 4:07 PM
 To: [EMAIL PROTECTED]
 Subject: RE: JDOM


 OK, thank you Reinhard.

 I don't plan to use JDOM in a custom transformer but your remark
 is very interesting. What do you think about? Have you an example of use?

 Regards
 Sylvain

 -Message d'origine-
 De: Reinhard Poetz [mailto:[EMAIL PROTECTED]]
 Date: mardi, 3. décembre 2002 15:38
 À: [EMAIL PROTECTED]
 Objet: RE: JDOM


 Sylvain,

 According to the lib/core and lib/optional directories JDOM is
 currently not
 used. But if you need it (e.g. in a custom transformer) it's very easy to
 use it.

 Regards,
 Reinhard

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 03, 2002 3:14 PM
  To: [EMAIL PROTECTED]
  Subject: JDOM
 
 
  Hello,
 
  Does Cocoon use JDOM?
 
  Tank you
  Sylvain
 
  -
  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]


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




Re: Complicated setup

2002-12-03 Thread leo leonid

On Tuesday, December 3, 2002, at 03:34 PM, Jeremy Quinn wrote:


Hi All

Can anyone advise me on getting this complicated setup right?

We have a website that will have some stuff served by Cocoon and some 
served by Apache.

It is not easy to separate them out because we need to retain legacy 
URLs. Likewise, it is not possible to give Cocoon served material a 
URL prefix, primarily because we need Cocoon to serve the home page of 
the site.

From Cocoon:

	/
	/index
	/general/*
	/archive/*
	/x-space/*
	etc. (about 10 items)

From Apache:

	/images/*
	/movies/*
	/audio/*
	/x-spaceprojects/*
	/harlem/*
	etc. (also about 10 items)


And then we need Slide-based WebDAV access to the Cocoon based 
material, with Cocoon generating from the Slide repository . and 
this I have still never had working .

If necessary we /could/:
a) place all static content in a single directory and redirect (legacy 
URLs) into it from Cocoon.
b) use virtual-hosts, one for Cocoon and one for the static stuff and 
redirect from Cocoon. But redirecting to images etc. is not that great 
;)

I am getting confused with all the options .. virtual-hosts, 
web-app, JK, JK2 connectors and all the options in them!

Have any of you lot tried any of this before?
How did you approach it?

Many thanks for any help


regards Jeremy




I had a very similar situation, I solved it by regarding the suffix. In 
my Apache DocumentRoot are all directories with static content. I only 
mount the following

JkMount /  worker2
JkMount /*.html  worker2
JkMount /*.xml  worker2

Sure you'll run into troubles if there are html files in the static 
directories, or you rename it to *.htm

I you find a more flexible solution, please tell me.

/Leo


-
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: [Authentication] - Generate javascript using XSP

2002-12-03 Thread Antonio Gallardo
Thanks Christoph!

I will make it later, because I need to sleep a little.

Antonio Gallardo

Christoph Gaffga dijo:
 Where I can configure for all the pages the
 response.setHeader(Cache-Control, No-Cache);

 I'm using a filter for that:

 in my web.xml-file:
   filter
 filter-nameModifyRequest/filter-name

 filter-classcom.triplemind.asp.server.ModifyRequestFilter/filter-class
   /filter
   filter-mapping
 filter-nameModifyRequest/filter-name
 servlet-nameCocoon2/servlet-name
   /filter-mapping

 And a short Filter-Class:
   package com.triplemind.asp.server;
   import javax.servlet.Filter;
   import javax.servlet.FilterChain;
   import javax.servlet.FilterConfig;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletResponse;

   public class ModifyRequest implements Filter {
 private FilterConfig filterConfig = null;
 public ModifyRequest() { }
 public void init(FilterConfig filterConfig) {
   this.filterConfig = filterConfig;
 }
 public void doFilter(ServletRequest request,
  ServletResponse response,
  FilterChain chain) {
   try {
 response.setHeader(Cache-Control, No-Cache);
 chain.doFilter(request, response);
   } catch(Exception e) {
 e.printStackTrace();
   }
 }
 public void destroy() { }
   }

 hope, that helps.
 I put some more features in my ModfiyRequest, to change the Request-URL,
 and Cookies and put some more Header-Information, such as
 Expires-Headers.

 Christoph Gaffga
 [EMAIL PROTECTED]


 - Original Message -
 From: Antonio Gallardo [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, November 30, 2002 8:25 PM
 Subject: Re: [Authentication] - Generate javascript using XSP


 Where I can configure for all the pages the

 response.setHeader(Cache-Control, No-Cache);

 Can I put it into the header of the HTML in my XSL?

 Regards,

 Antonio Gallardo

 Christoph Gaffga dijo:
  Hi,
 
  I think that this can be done because the proxy is returning a
 cached page from another user. Because the request has the same URI
 from every user (as long as I can see). The request URI does not
 have info about sessions.
 
  If you are behind a proxy maybe you can configure it not to cache
 urls at http://internalserver:8080/theapp/.
  Or it helps if you do
  response.setHeader(Cache-Control, No-Cache);
 
  yours
  Christoph Gaffga
  [EMAIL PROTECTED]
 
  - Original Message -
  From: Antonio Gallardo [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, November 30, 2002 9:32 AM
  Subject: [Authentication] - Generate javascript using XSP
 
 
  Hi Cococoners!
 
  I am currently an application that is currently running on a test
 mode with a small amount of users (20) in a Intranet environment.
 With the following characteristics:
 
  The application is running behind a proxy.
  The app use the authentication framework.
  The app have a page called welcome that show the current user.
 
  I am currently having problem with session management:
 
  The users told me that sometimes when they are already
 authenticated and request the welcome page, the response present
 another user.
 
  The page is called with http://internalserver:8080/theapp/welcome
 
  I think that this can be done because the proxy is returning a
 cached page from another user. Because the request has the same URI
 from every user (as long as I can see). The request URI does not
 have info about sessions. But I read in the book from Carsten and
 Mathhew on page 303 (second paragraph from the end):
 
  The default is usually to use cookies, because the developer of
 the web application does not need to do anything special to use
 them. ...
 
  Please Dont let me wrong. I now that the problem is caused by me.
 :-D
 
  The menu of the application is a static Javascript file served with
 a reader. This file hs no info about sessions. Now I realized that
 in order to set a session into the request I need to include a
 parameter with the SessionID for every request. I does not include
 it before because the quote above.
 
  With this scenario my questions is:
 
  How I can ensure that every request URI from the user will have the
 SessionID included or use the default cookies?
 
  For me this is not a trivial question, because:
 
  I thinked first: OK, I will generate the menu.js on ther fly using
 XSP.
 
  But after think a while I realized that this issue will fall again
 in the same category as the
 http://internalserver:8080/theapp/welcome explained above. :-(
 
  Please tell me what can I do?
 
  I am currently thinking in calling the menu.js with the sessionID
 too.
 
  This will work or there is another easier way to do that?
 
  Many thanks in advance,
 
  Antonio Gallardo.
 
 
 
 
  -
 Please check that your question  has not already been answered in
 the FAQ before posting.
 

Coplet and Webapplications

2002-12-03 Thread Gernot Koller
Hi!

We are currently evaluating the cocoon portal functionality. So far we have seen a lot 
of very promising stuff!
Now the question arises, wether it would be possible to integrate webappications 
within coplets.
To be more exact: Is it possible to write a coplet, that acts like a webapplication 
(dealing with forms, holding an internal state etc.)

I've only found the so called Configurable Dynamic Coplet, which goes in this 
direction, but definitly not 
far enough ;-)

Any ideas?

thanks,

Gernot.



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




Oracle access

2002-12-03 Thread Rano, Didier

I tried to access a Oracle database with SQL transformer.

Then, I modified cocoon.xconf

jdbc logger=core.datasources.hub_annuaire name=hub_annuaire
  pool-controller min=1 max=2 keep-alive=true/
  dburljdbc:oracle:thin:@:1521:HUB0/dburl
  user/user
  password***/password
/jdbc 

I have add a .xml file with

?xml version=1.0?

page xmlns:sql=http://apache.org/cocoon/SQL/2.0;

 titleHello/title
 content
  paraThis is my first Cocoon2 page filled with sql data!/para

  execute-query xmlns=http://apache.org/cocoon/SQL/2.0; 
   query
select field1 from myTable
   /query
  /execute-query

 /content
/page

I verified if data exist in my database, but the result gives:

page
titleHello/title
content
paraThis is my first Cocoon2 page filled with sql data!/para
 sql:rowset xmlns:sql=http://apache.org/cocoon/SQL/2.0;
sql:row
sql:field1/
/sql:row
/sql:rowset
/content
/page

How avoid this problem ? And add value in sql:field1/ ?

Thank you

Didier Rano
Serv'N Data

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

2002-12-03 Thread Reinhard Poetz
 -Original Message-
 From: Reinhard Poetz [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 4:23 PM
 To: [EMAIL PROTECTED]
 Subject: RE: JDOM
 
 
 No, it was only a thought.

I meant you can collect the incoming data and store it in a JDom.

 
 Regards,
 Reinhard
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 03, 2002 4:07 PM
  To: [EMAIL PROTECTED]
  Subject: RE: JDOM
 
 
  OK, thank you Reinhard.
 
  I don't plan to use JDOM in a custom transformer but your remark
  is very interesting. What do you think about? Have you an 
 example of use?
 
  Regards
  Sylvain


-
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: Complicated setup

2002-12-03 Thread Jeremy Quinn

On Tuesday, Dec 3, 2002, at 15:03 Europe/London, Andrew Savory wrote:



On Tue, 3 Dec 2002, Jeremy Quinn wrote:


We have a website that will have some stuff served by Cocoon and some
served by Apache.


Is the stuff served by Apache static content, ie html, mpeg, avi, etc?


correct, but we cannot rely on suffixes for mapping (if that's what you 
were leading to )

Obviously static content served by Apache will have suffixes . the 
stuff served by Cocoon will not, but it does need to be able to handle 
situations where someone adds a suffix to the url (and redirects to the 
un-suffixed version of the same url).



It is not easy to separate them out because we need to retain legacy
URLs. Likewise, it is not possible to give Cocoon served material a 
URL
prefix, primarily because we need Cocoon to serve the home page of the
site.

Ok, I'd get Cocoon to serve the whole lot (assuming you want to 
gradually
replace legacy stuff with Cocoon anyway), but use the sitemap to pass
through the legacy bits.

We will not be converting the legacy stuff to Cocoon, they are 3rd 
party projects, hosted on the site because they have some relationship 
with the hosting organisation.



 From Apache:

	/images/*


eg:
  map:match pattern=/images/**.jpg
map:read src=/legacy/root/images/{1}.jpg mime-type=image/jpg/
  /map:match


	/movies/*


eg:
  map:match pattern=/movies/**.avi
map:read src=/legacy/root/movies/{1}.avi 
mime-type=video/x-msvideo/
  /map:match


We really want to get Apache serving this content if possible, it is 
going to have less overhead and be faster, as I understand it.

But I do see your point, if the worst comes to the worst, we can serve 
all the static content (even HTML) using a 'reader'.

And then we need Slide-based WebDAV access to the Cocoon based
material, with Cocoon generating from the Slide repository . and
this I have still never had working .


Not used this, so can't help, sorry.


Still trying to find someone who's used this stuff ;)




a) place all static content in a single directory and redirect (legacy
URLs) into it from Cocoon.


I'd leave it where it is, and get Cocoon to do the hard work of dealing
with legacy urls.


Thanks for your suggestions.

regards Jeremy


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




Viewing XML files through Cocoon

2002-12-03 Thread David Cahill
Hi,
I'm attempting to view an xml/xsl page in a browser through Cocoon. I have Tomcat up and running andmy browser pointingto the following URL:
http://localhost:8080/cocoon/mystuff/person.xml
However I encounter the following error: "Cocoon 2 - Resource not found"
I created the person subdirectory within cocoon to store all my xml/xsl files. Am I directing the browser to this file in the proper manner? Even when I place my files within the welcome(default) subdirectory in cocoonand enter:
http://localhost:8080/cocoon/person.xml
I still encounter the same error: "Cocoon 2 - Resource not found"
Does anyone know where I'm going wrong??
Many thanks,
DavidWith Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs

dynamic xsl:fo image inclusion

2002-12-03 Thread Robert Sösemann
I tried every tip I could find on the web, but I never had success including
an jpg into an pdf with cocoon.
Maybe sombody can help?

Thats what I have:

XSL:FO fragment transforming IMG tags:

   xsl:template match=IMG
fo:inline
fo:external-graphic src=url(MYPATHBASE/{$src})/
/fo:inline
   /xsl:template

MYPATHPATH is changed to the real cocoon base path before serializing. So
the serializer should request the image in a correct way, that it is caugth
by this sitemap matcher:

map:match pattern=**.jpg
map:read mime-type=image/jpg src=resources/{1}.jpg/
/map:match

Why do I never get to see an image in my pdf`?


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




dynamic atylesheet assignment

2002-12-03 Thread Robert Sösemann
I am working on a news site, where every author can assign own xsl
stylesheet to their article. I want to bring cocoon dynamically insert an
article's path into the transformer src attribute.

I thought of generating an parameter inside the xsp for the following
components an later catch it by the transformer. (How) can I do this?

map:match pattern=**article_*.html
map:act type=url-extract^

!-- Inside the generate the path info is extracted from
db --
map:generate src=logicsheets/get-articledata.xsp
type=xsp
map:parameter name=article-id value={../2}/
/map:generate
/map:act

map:transform src=transform/style-frame.xsl type=xslt/

!-- here I want to access the path info --
map:transform src=transform/{dynamic-path} type=xslt/

map:transform src=transform/style-footer.xsl
type=xslt/
map:serialize type=html/
/map:match

Thanks a lot!

Robert



-
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: Viewing XML files through Cocoon

2002-12-03 Thread Alten, Jelle Paul (uto)



Hi 
David,

Yes... 
you are supposed to edit the sitemap.xmap and tell cocoon what to do with the 
request: to get the xml-file, transform it and present the result to the 
user.
This 
might scare you for a moment, just before it opens up a whole new world to 
you.
Look 
in the documentation under sitemap and start fiddling from 
there.

Good 
luck.

Jelle


  -Oorspronkelijk bericht-Van: David Cahill 
  [mailto:[EMAIL PROTECTED]]Verzonden: dinsdag 3 december 2002 
  17:39Aan: CocoonOnderwerp: Viewing XML files through 
  Cocoon
  Hi,
  I'm attempting to view an xml/xsl page in a browser through Cocoon. I 
  have Tomcat up and running andmy browser pointingto the following 
  URL:
  http://localhost:8080/cocoon/mystuff/person.xml
  However I encounter the following error: "Cocoon 2 - Resource not 
found"
  I created the person subdirectory within cocoon to store all my xml/xsl 
  files. Am I directing the browser to this file in the proper manner? 
  Even when I place my files within the welcome(default) subdirectory in 
  cocoonand enter:
  http://localhost:8080/cocoon/person.xml
  I still encounter the same error: "Cocoon 2 - Resource not found"
  Does anyone know where I'm going wrong??
  Many thanks,
  David
  
  
  
  With Yahoo! Mail you can get a bigger mailbox -- choose a 
  size that fits your needs


Re: Viewing XML files through Cocoon

2002-12-03 Thread Alex McLintock
David,

when asking this sort of question try to give us all possible information.

Have you got the samples working?

Have you modified the sitemap to take into account mystuff?

Alex

At 16:39 03/12/02, David Cahill wrote:


Hi,

I'm attempting to view an xml/xsl page in a browser through Cocoon.  I 
have Tomcat up and running and my browser pointing to the following URL:

http://localhost:8080/cocoon/mystuff/person.xmlhttp://localhost:8080/cocoon/mystuff/person.xml

However I encounter the following error: Cocoon 2 - Resource not found

I created the person subdirectory within cocoon to store all my xml/xsl 
files.  Am I directing the browser to this file in the proper manner? Even 
when I place my files within the welcome(default) subdirectory in cocoon 
and enter:

http://localhost:8080/cocoon/person.xmlhttp://localhost:8080/cocoon/person.xml

I still encounter the same error: Cocoon 2 - Resource not found

Does anyone know where I'm going wrong??

Many thanks,

David



http://uk.yahoo.com/mail/tagline_xtra/?http://uk.docs.yahoo.com/mail_storage.htmlWith 
Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs



Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here 
http://www.OWAL.co.uk/oss_support/


-
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: dynamic xsl:fo image inclusion

2002-12-03 Thread Ludovic de Beaurepaire
Hi robert,

I solved this problem this afternoon :-) there were no error message in the
logs, and the cause was a too large image. try with a small jpg.

Regards,

Ludovic
- Original Message -
From: Robert Sösemann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 03, 2002 5:21 PM
Subject: dynamic xsl:fo image inclusion


 I tried every tip I could find on the web, but I never had success
including
 an jpg into an pdf with cocoon.
 Maybe sombody can help?

 Thats what I have:

 XSL:FO fragment transforming IMG tags:

xsl:template match=IMG
 fo:inline
 fo:external-graphic src=url(MYPATHBASE/{$src})/
 /fo:inline
/xsl:template

 MYPATHPATH is changed to the real cocoon base path before serializing. So
 the serializer should request the image in a correct way, that it is
caugth
 by this sitemap matcher:

 map:match pattern=**.jpg
 map:read mime-type=image/jpg src=resources/{1}.jpg/
 /map:match

 Why do I never get to see an image in my pdf`?


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




Re: Complicated setup

2002-12-03 Thread Jeremy Quinn

On Tuesday, Dec 3, 2002, at 15:31 Europe/London, leo leonid wrote:



On Tuesday, December 3, 2002, at 03:34 PM, Jeremy Quinn wrote:


Hi All

Can anyone advise me on getting this complicated setup right?


snip/



Many thanks for any help



I had a very similar situation, I solved it by regarding the suffix. 
In my Apache DocumentRoot are all directories with static content. I 
only mount the following

JkMount /  worker2
JkMount /*.html  worker2
JkMount /*.xml  worker2


Is 'JK2' the best one to be using now?
I am a bit confused between mod_webapp (warp) and JK[n] TBH.


Sure you'll run into troubles if there are html files in the static 
directories, or you rename it to *.htm

Can't change the urls ;)



I you find a more flexible solution, please tell me.


The problem here, is relying on suffixes . we cannot .


As I remember, mapping '/' to mod_webapp stopped Apache from serving 
ANYTHING.

But as you imply in your sample above, this is not the case with JK2?

So I would be able to map a long list of folders to JK2 and have 
everything else automatically handled by Apache?

eg.

JkMount / worker2
JkMount /index worker2
JkMount /index.* worker2
JkMount /archive/* worker2
JkMount /collaboration/* worker2
JkMount /education/* worker2
JkMount /general/* worker2
JkMount /library/* worker2
JkMount /news/* worker2
JkMount /press/* worker2
JkMount /publications/* worker2
JkMount /season/* worker2
JkMount /search/* worker2
JkMount /x-space/* worker2

Is this going to work?

Will Cocoon 'receive' the whole URL, or just the bit picked up by the 
'*'?

Thanks for your help.

regards Jeremy






-
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: Display problem

2002-12-03 Thread Reinhard Poetz
Peter,

I don't understand your task completly but maybe this helps: If you have a
certain number of xml files in a directory you can use the directory
generator to produce a list of all files in it and if you like of it's
subdirectories.

Regards,
Reinhard

 -Original Message-
 From: Peter Bradburn [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 5:31 PM
 To: [EMAIL PROTECTED]
 Subject: Display problem


 Hi,
   I am creating a simple system with the use of Cocoon which
 outputs several versions of the same file in different formats.

 I want to dynamically display a list of files in a web browser
 which Cocoon could produce given the input xml files available in
 a directory, and the potential transfomations which could be made
 according to the sitemap.

 Is the Cocoon portal a suitable solution for a task like this or
 should I be looking somewhere else. Does anyone know of any
 existing examples, that could point me in the right direction.

 I want to use Cocoon if at all possible to solve this problem.

 Thanks
 Peter Bradburn

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




RE: Viewing XML files through Cocoon

2002-12-03 Thread Reinhard Poetz
David,

Did you set up the necessary pipelines in the sitemap.xmap? Do you get the
cocoon examples or the cocoon docs?

Regards,
Reinhard

-Original Message-
From: David Cahill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 5:39 PM
To: Cocoon
Subject: Viewing XML files through Cocoon


Hi,
I'm attempting to view an xml/xsl page in a browser through Cocoon.  I have
Tomcat up and running and my browser pointing to the following URL:
http://localhost:8080/cocoon/mystuff/person.xml
However I encounter the following error: Cocoon 2 - Resource not found
I created the person subdirectory within cocoon to store all my xml/xsl
files.  Am I directing the browser to this file in the proper manner? Even
when I place my files within the welcome(default) subdirectory in cocoon and
enter:
http://localhost:8080/cocoon/person.xml
I still encounter the same error: Cocoon 2 - Resource not found
Does anyone know where I'm going wrong??
Many thanks,
David




With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits
your needs


-
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: Complicated setup

2002-12-03 Thread Alex McLintock
At 16:52 03/12/02, Jeremy Quinn wrote:


Is 'JK2' the best one to be using now?
I am a bit confused between mod_webapp (warp) and JK[n] TBH.



If it is any consolation so am I.

I am using mod_webapp happily which I believe is the supposedly correct 
thing to use, but since the JK one is older it has more documentation 
pointing to it.

Alex





Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here 
http://www.OWAL.co.uk/oss_support/


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



Changing Xalan XSL (WAS Re: SVG - java socket exception)

2002-12-03 Thread Chris Faulkner
HI

More on this - a couple of others seem to have similar problems but nobody ever got a 
reply when they post the error  makes me think it  is a bug. Anyhow, if I change 
this parameter to false (it is true by default) in
cocoon.xconf

parameter name=incremental-processing value=false/

I don't get the errors but the JSP is still being called 2 or 3 times so it is much 
slower and I'd rather leave the incremental-processing  parameter at true. How can I 
change from xalan to another XSL engine ? There 
is
a mention of this on the performance tips page but no instructions about how to do it.

Chris

Hello

I am getting on OK with Cocoon. I like it very much. I am using some JSP code as a 
generator. This creates some XML data which I apply xsl to transform to SVG. This is 
then serialised with 
svgxml and returned to the client. It all works fine. Except that, looking at my 
logs, very often, the first execution of the JSP returns this to stdout/stderr.

java.lang.RuntimeException: java.net.SocketException: Connection aborted by peer
: socket write error
at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
:3231)
at java.lang.Thread.run(Thread.java:479)

I can see in the logs that Cocoon automatically seems to fire the same JSP again. It 
then works on the next shot, I get my SVG displayed in my SVG viewing app and it is 
just fine. This is 
obviously slowing things up though. 

Any ideas - I am using Cocoon 2.0.3 on Tomcat 4.0.1, JDK 1.3.1_06 on W2K.

Thanks

Chris




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




Re: how to serve static content from webserver?

2002-12-03 Thread Jakob

Alex McLintock said:
 At 14:04 03/12/02, you wrote:
I want static files (images, js, css) be served by the web server
 (apache port 80).

 You set up your Apache front end to serve static content - eg from a
 directory called images, or js, or static, and you set up apache to
 forward  dynamic stuff to your java servlet engine and thus Cocoon.

 What precisely is the problem you are having?

Actually, in the meantime I have investigated a bit further.

To recall: in my httpd.conf, I added the following line:
Alias /rules/ E:/temp/rules/

In the E:/temp/rules/ directory are all the images, js, css.  Apache
restarted ...

If I have my stylesheet generate a URL like
script type=text/javascript
src=http://localhost:80/rules/go_cocoon.js;/script

this works.  However, if I instruct it to only generate
script type=text/javascript src=/rules/go_cocoon.js/script

it won't find the resource.

Well, I am already happy to have it kind of working, but it's not very
portable if I have to construct a full URL for each resource.  There
probably is still a better way than that.

Thanks for your responses so far.

Cheers,
Jakob.



-
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: Complicated setup

2002-12-03 Thread Andrew Savory

On Tue, 3 Dec 2002, Jeremy Quinn wrote:

 Is 'JK2' the best one to be using now?
 I am a bit confused between mod_webapp (warp) and JK[n] TBH.

I never got warp working, so I've always used Jk myself.

  Sure you'll run into troubles if there are html files in the static
  directories, or you rename it to *.htm

 Can't change the urls ;)

And besides, we're geeks, so an elegant solution that doesn't require
modifying existing content would be desirable too ;-)

 As I remember, mapping '/' to mod_webapp stopped Apache from serving
 ANYTHING.

True.

 But as you imply in your sample above, this is not the case with JK2?

The samples above don't map '/' to mod_webapp, they only map selected
filetypes.

 So I would be able to map a long list of folders to JK2 and have
 everything else automatically handled by Apache?

Sure, but we probably should try and achieve the opposite: I assume the
number of Cocoon resources will grow, whilst the legacy stuff will
remain constant (or at least constantly in the same place).

 JkMount / worker2
 JkMount /index worker2
 JkMount /index.* worker2
 JkMount /archive/* worker2
 JkMount /collaboration/* worker2
 JkMount /education/* worker2
 JkMount /general/* worker2
 JkMount /library/* worker2
 JkMount /news/* worker2
 JkMount /press/* worker2
 JkMount /publications/* worker2
 JkMount /season/* worker2
 JkMount /search/* worker2
 JkMount /x-space/* worker2

 Is this going to work?

 Will Cocoon 'receive' the whole URL, or just the bit picked up by the
 '*'?

I'm not sure - I'd guess it'll have the whole URL somewhere in the
headers, but possibly not where you want it. Besides, the solution above
isn't very future-proof IMHO.

You also said:

 We really want to get Apache serving this content if possible, it is
 going to have less overhead and be faster, as I understand it.

I think your best solution is going to be in the Apache httpd.conf - maybe
Rewrite will do what you want. Can't figure out how to limit what is
passed on to Cocoon via JkMount though :-/

Effectively I guess you want rules that pass everything but images,
movies, audio, x-spaceprojects, harlem etc to mod_jk. Anyone else know how
to do that? ;-)

I mean something like:

JkMount /!(images|movies|audio)*


Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk



-
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: Complicated setup

2002-12-03 Thread leo leonid

On Tuesday, December 3, 2002, at 05:52 PM, Jeremy Quinn wrote:



On Tuesday, Dec 3, 2002, at 15:31 Europe/London, leo leonid wrote:



On Tuesday, December 3, 2002, at 03:34 PM, Jeremy Quinn wrote:


Hi All

Can anyone advise me on getting this complicated setup right?


snip/



Many thanks for any help



I had a very similar situation, I solved it by regarding the suffix. 
In my Apache DocumentRoot are all directories with static content. I 
only mount the following

JkMount /  worker2
JkMount /*.html  worker2
JkMount /*.xml  worker2


Is 'JK2' the best one to be using now?
I am a bit confused between mod_webapp (warp) and JK[n] TBH.



I actually use JK1.2 ajp13 connector (works fine with Jetty, too)

I formerly used mod_webapp, which is simple to setup, but less flexible 
in managing the urispace. Apart from this it does not support 
load-balancing and has it has turned out to be not as stable as my 
current solution.

I experimented with jk2, too. Big advantage with jk2 is that you don't 
have to change the httpd.conf with every change in your mounts (you 
keep them in a separate file workers2.properties). But I had some very 
strange results with jk2, resources like images and css has been served 
in a random-like order after some hours with heavy load and my boring 
pages looked like artwork :-) maybe a cashing problem, never found the 
reason, so I switched back to jk1.2. (at that time jk2 was still alpha, 
maybe it is fine now, but AFAIK there is currently no solution with jk2 
and Jetty)


Sure you'll run into troubles if there are html files in the static 
directories, or you rename it to *.htm

Can't change the urls ;)



I you find a more flexible solution, please tell me.


The problem here, is relying on suffixes . we cannot .


As I remember, mapping '/' to mod_webapp stopped Apache from serving 
ANYTHING.


WebAppConnection warpConnection warp ministrant.leonid:8008
WebAppDeploy cocoon warpConnection /

this works, but now EVERYTHING is handled by cocoon. (That's maybe what 
you mean)


But as you imply in your sample above, this is not the case with JK2?

So I would be able to map a long list of folders to JK2 and have 
everything else automatically handled by Apache?

eg.

JkMount / worker2
JkMount /index worker2
JkMount /index.* worker2
JkMount /archive/* worker2
JkMount /collaboration/* worker2
JkMount /education/* worker2
JkMount /general/* worker2
JkMount /library/* worker2
JkMount /news/* worker2
JkMount /press/* worker2
JkMount /publications/* worker2
JkMount /season/* worker2
JkMount /search/* worker2
JkMount /x-space/* worker2

Is this going to work?


Yes, this will work - with the drawback, that you probably have to 
update httpd.conf very often.
 It would be famous if the guys from jk would adopt the cocoon sitemap 
language. But at present the matching possibilities are very limited. 
*/dir/ or **/dir/* does not work :(



Will Cocoon 'receive' the whole URL, or just the bit picked up by the 
'*'?


yes, the whole URL


Thanks for your help.

regards Jeremy



/Leo


-
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: RE: Changing Xalan XSL (WAS Re: SVG - java socket exception)

2002-12-03 Thread Reinhard Poetz
 -Original Message-
 From: Chris Faulkner [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 7:20 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: RE: Changing Xalan XSL (WAS Re: SVG - java socket
 exception)


 Thanks for that - I did search the archives and found some
 messages with the same error message as I had but none that I saw
 had a follow-up. I really did search but until you understand the
 nature of the problem
 better, it is difficult to know what terms to search on.  I do
 apologise for wasting any of your time and thanks again.

The user-list is for questions like yours the best place. For me the only
rule is looking at http://xml.apache.org/cocoon/faq/index.html before
posting.


 I'll try Saxon. I'm not immediately certain how to install it
 with Cocoon but I'll find out !

It's quite easy - one of the links at
http://outerthought.net/wiki/Wiki.jsp?page=Saxon (I think it's the fourth
...) points out all necessary steps.

 The journey is part of the fun.

Yes, Cocoon makes a lot of fun !!! :-)

Regards,
Reinhard


 Chris

 Chris,
 
 The problem you have is a well-known problem of Cocoon or more
 precicly of
 Xalan. There are many mails in the archives about this topic (e.g.:
 http://marc.theaimsgroup.com/?l=xml-cocoon-devm=101994024218728w=2).
 
 If you want to use Saxon have a look at
 http://outerthought.net/wiki/Wiki.jsp?page=Saxon - it should help (and is
 faster than Xalan).
 
 Regards,
 Reinhard
 
  -Original Message-
  From: Chris Faulkner [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 03, 2002 6:26 PM
  To: [EMAIL PROTECTED]
  Subject: Changing Xalan XSL (WAS Re: SVG - java socket exception)
 
 
  HI
 
  More on this - a couple of others seem to have similar problems
  but nobody ever got a reply when they post the error  makes
  me think it  is a bug. Anyhow, if I change this parameter to
  false (it is true by default) in
  cocoon.xconf
 
  parameter name=incremental-processing value=false/
 
  I don't get the errors but the JSP is still being called 2 or 3
  times so it is much slower and I'd rather leave the
  incremental-processing  parameter at true. How can I change from
  xalan to another XSL engine ? There
  is
  a mention of this on the performance tips page but no
  instructions about how to do it.
 
  Chris
 
  Hello
  
  I am getting on OK with Cocoon. I like it very much. I am using
  some JSP code as a generator. This creates some XML data which I
  apply xsl to transform to SVG. This is then serialised with
  svgxml and returned to the client. It all works fine. Except
  that, looking at my logs, very often, the first execution of the
  JSP returns this to stdout/stderr.
  
  java.lang.RuntimeException: java.net.SocketException: Connection
  aborted by peer
  : socket write error
  at
  org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
  :3231)
  at java.lang.Thread.run(Thread.java:479)
  
  I can see in the logs that Cocoon automatically seems to fire
  the same JSP again. It then works on the next shot, I get my SVG
  displayed in my SVG viewing app and it is just fine. This is
  obviously slowing things up though.
  
  Any ideas - I am using Cocoon 2.0.3 on Tomcat 4.0.1, JDK
 1.3.1_06 on W2K.
  
  Thanks
  
  Chris
  
  
  
  
  -
  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]
 
 
 
 -
 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]



-
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: Complicated setup

2002-12-03 Thread Ryan Agler
No need to redirect, your problems can be solved with the AliasMatch
directive in httpd.conf:

AliasMatch ^(.*)/([^/]+\.gif)$ /path/to/images/$2
AliasMatch ^(.*)/([^/]+\.css)$ /path/to/css/$2

The above will match any .gif or .ccs, both legacy and cocoon, and serve
them from the same location.

HTH
+Ryan

-Original Message-
From: Jeremy Quinn [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 9:35 AM
To: [EMAIL PROTECTED]
Subject: Complicated setup

Hi All

Can anyone advise me on getting this complicated setup right?

We have a website that will have some stuff served by Cocoon and some 
served by Apache.

It is not easy to separate them out because we need to retain legacy 
URLs. Likewise, it is not possible to give Cocoon served material a URL 
prefix, primarily because we need Cocoon to serve the home page of the 
site.

 From Cocoon:

/
/index
/general/*
/archive/*
/x-space/*
etc. (about 10 items)

 From Apache:

/images/*
/movies/*
/audio/*
/x-spaceprojects/*
/harlem/*
etc. (also about 10 items)

And then we need Slide-based WebDAV access to the Cocoon based 
material, with Cocoon generating from the Slide repository . and 
this I have still never had working .

If necessary we /could/:
a) place all static content in a single directory and redirect (legacy 
URLs) into it from Cocoon.
b) use virtual-hosts, one for Cocoon and one for the static stuff and 
redirect from Cocoon. But redirecting to images etc. is not that great 
;)

I am getting confused with all the options .. virtual-hosts, 
web-app, JK, JK2 connectors and all the options in them!

Have any of you lot tried any of this before?
How did you approach it?

Many thanks for any help

regards Jeremy


-
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: Complicated setup

2002-12-03 Thread Jeremy Quinn

On Tuesday, Dec 3, 2002, at 17:57 Europe/London, leo leonid wrote:



On Tuesday, December 3, 2002, at 05:52 PM, Jeremy Quinn wrote:



On Tuesday, Dec 3, 2002, at 15:31 Europe/London, leo leonid wrote:



On Tuesday, December 3, 2002, at 03:34 PM, Jeremy Quinn wrote:


Hi All

Can anyone advise me on getting this complicated setup right?


snip/



Many thanks for any help



I had a very similar situation, I solved it by regarding the suffix. 
In my Apache DocumentRoot are all directories with static content. I 
only mount the following

JkMount /  worker2
JkMount /*.html  worker2
JkMount /*.xml  worker2


Is 'JK2' the best one to be using now?
I am a bit confused between mod_webapp (warp) and JK[n] TBH.



I actually use JK1.2 ajp13 connector (works fine with Jetty, too)



OK, that's good the hear.
I am testing on MacOSX, and that's the only version available ATM.


I formerly used mod_webapp, which is simple to setup, but less 
flexible in managing the urispace. Apart from this it does not support 
load-balancing and has it has turned out to be not as stable as my 
current solution.


OK, I have used mod_webapp before for simpler stuff, and it has been 
stable.

I experimented with jk2, too. Big advantage with jk2 is that you don't 
have to change the httpd.conf with every change in your mounts (you 
keep them in a separate file workers2.properties).

Do you mean this is where you differentiate between different Servlets? 
Or do you do more than that in this file? I've never used one before, 
except probably the default.

But I had some very strange results with jk2, resources like images 
and css has been served in a random-like order after some hours with 
heavy load and my boring pages looked like artwork :-) maybe a cashing 
problem, never found the reason, so I switched back to jk1.2. (at that 
time jk2 was still alpha, maybe it is fine now, but AFAIK there is 
currently no solution with jk2 and Jetty)

You are using Jetty rather than TomCat?





Sure you'll run into troubles if there are html files in the static 
directories, or you rename it to *.htm

Can't change the urls ;)



I you find a more flexible solution, please tell me.


The problem here, is relying on suffixes . we cannot .


As I remember, mapping '/' to mod_webapp stopped Apache from serving 
ANYTHING.


WebAppConnection warpConnection warp ministrant.leonid:8008
WebAppDeploy cocoon warpConnection /

this works, but now EVERYTHING is handled by cocoon. (That's maybe 
what you mean)


exactly




But as you imply in your sample above, this is not the case with JK2?

So I would be able to map a long list of folders to JK2 and have 
everything else automatically handled by Apache?

eg.

JkMount / worker2
JkMount /index worker2
JkMount /index.* worker2
JkMount /archive/* worker2
JkMount /collaboration/* worker2
JkMount /education/* worker2
JkMount /general/* worker2
JkMount /library/* worker2
JkMount /news/* worker2
JkMount /press/* worker2
JkMount /publications/* worker2
JkMount /season/* worker2
JkMount /search/* worker2
JkMount /x-space/* worker2

Is this going to work?


Yes, this will work - with the drawback, that you probably have to 
update httpd.conf very often.

yeah, not much fun 


 It would be famous if the guys from jk would adopt the cocoon sitemap 
language. But at present the matching possibilities are very limited. 
*/dir/ or **/dir/* does not work :(


Oh would'nt it!

Reading the docs, for JK, (not sure if I understood them correctly), 
but configuring:

	JkOptions +ForwardDirectories

in conjunction with DirectoryIndex ??

quote:

If ForwardDirectories is set to true and Apache doesn't find any files 
that match, the request will be forwarded to Tomcat for resolution. 
This is used in cases when Apache cannot see the index files on the 
file system for various reasons: Tomcat is running on a different 
machine, the JSP file has been precompiled etc. 

I do not know if this is relevant to my situation, whereby if an 
incoming URL does not match a file, the request is automatically sent 
to TomCat?

A setup like that would make it really easy!

What's more the client could decide at any time to statically render 
parts of the Cocoon site (that were not changing regularly) and have 
them served by Apache.

Do you have any experience of these directives?





Will Cocoon 'receive' the whole URL, or just the bit picked up by the 
'*'?


yes, the whole URL


good to hear!

Thanks, this has been very helpful.

regards Jeremy


-
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: sunShine context c2.0.3

2002-12-03 Thread Terry Paddy
Thanks Carsten,

We have used the latest CVS 2.0.3 and the problem is
fixed.

--- Carsten Ziegeler [EMAIL PROTECTED] wrote:
 Hi Terry,
 
 did you try the latest CVS version of the 2.0.3
 branch?
 The NPE should be fixed there.
 
 HTH
 Carsten
 
  -Original Message-
  From: Terry Paddy [mailto:[EMAIL PROTECTED]]
  Sent: Friday, November 29, 2002 11:25 PM
  To: [EMAIL PROTECTED]
  Subject: sunShine context c2.0.3
  
  
  Hi,
  
  I have a question regarding the sunRise context. I
  appreciate that everything has
 improved/moved/changed
  to the frameworks in 2.1-dev but unfortunately I
 must
  continue to use 2.0.3 scratch pad until 2.1 is
  released.
  
  I cannot get any info out of the sunRise context
 with
  sunshine:getxml context='sunRise'
  path='/authentication/role'/ etc
  
  As a test, I put the above request in the
 feedback
  sunlet of the working sample in 2.0.3 I made
 sure
  that the sunlets were able to process the request
 by
  putting map:transform type=sunShine/ in the
  sunspotdemosunlet-*.xml pipeline
  
  The result was a nullpointerexception when the
 sunRise
  context was being accessed. The context existed
 but no
  object was present?
  
  However sunshine:getxml context=request
  path=/querystring / does give me the query
 string
  AND I can store and extract stuff into and out
 of my
  own context (context=mycontext).
  
  QUESTION: Why can't I access the sunRise context?
  
  Thanks in advance.
  
  =
  ___
  Terry Paddy - Christchurch, New Zealand
  
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
  http://mailplus.yahoo.com
  
 

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


=
___
Terry Paddy - Christchurch, New Zealand

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
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: Complicated setup

2002-12-03 Thread leo leonid

Jeremy Quinn writes:

 
 On Tuesday, Dec 3, 2002, at 17:57 Europe/London, leo leonid wrote:
 
 
  On Tuesday, December 3, 2002, at 05:52 PM, Jeremy Quinn wrote:
 
 
  On Tuesday, Dec 3, 2002, at 15:31 Europe/London, leo leonid wrote:
 
 
  On Tuesday, December 3, 2002, at 03:34 PM, Jeremy Quinn wrote:
 
  Hi All
 
  Can anyone advise me on getting this complicated setup right?
 
  snip/
 
 
  Many thanks for any help
 
 
  I had a very similar situation, I solved it by regarding the suffix. 
  In my Apache DocumentRoot are all directories with static content. I 
  only mount the following
 
  JkMount /  worker2
  JkMount /*.html  worker2
  JkMount /*.xml  worker2
 
 
  Is 'JK2' the best one to be using now?
  I am a bit confused between mod_webapp (warp) and JK[n] TBH.
 
 
  I actually use JK1.2 ajp13 connector (works fine with Jetty, too)
 
 
 OK, that's good the hear.
 I am testing on MacOSX, and that's the only version available ATM.
 
  I formerly used mod_webapp, which is simple to setup, but less 
  flexible in managing the urispace. Apart from this it does not support 
  load-balancing and has it has turned out to be not as stable as my 
  current solution.
 
 
 OK, I have used mod_webapp before for simpler stuff, and it has been 
 stable.
 
  I experimented with jk2, too. Big advantage with jk2 is that you don't 
  have to change the httpd.conf with every change in your mounts (you 
  keep them in a separate file workers2.properties).
 
 Do you mean this is where you differentiate between different Servlets? 
 Or do you do more than that in this file? I've never used one before, 
 except probably the default.

There you define hosts, ports, workers, uri mapping etc ... a sample

[shm]
file=/usr/jakarta/catalina/work/jk2.shm
size=1048576

# Example socket channel, override port and host.
[channel.socket:ministrant.leonid:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:ministrant.leonid:8009]
channel=channel.socket:ministrant.leonid:8009

# Uri mapping
[uri:ministrant.leonid/*]
worker=ajp13:ministrant.leonid:8009
context=/cocoon




 
  But I had some very strange results with jk2, resources like images 
  and css has been served in a random-like order after some hours with 
  heavy load and my boring pages looked like artwork :-) maybe a cashing 
  problem, never found the reason, so I switched back to jk1.2. (at that 
  time jk2 was still alpha, maybe it is fine now, but AFAIK there is 
  currently no solution with jk2 and Jetty)
 
 You are using Jetty rather than TomCat?
 
Yes, a big advantage while developing is that it starts and stops x-times
faster. And it is very stable for production use.
 
 
  Sure you'll run into troubles if there are html files in the static 
  directories, or you rename it to *.htm
 
  Can't change the urls ;)
 
 
  I you find a more flexible solution, please tell me.
 
  The problem here, is relying on suffixes . we cannot .
 
 
  As I remember, mapping '/' to mod_webapp stopped Apache from serving 
  ANYTHING.
 
 
  WebAppConnection warpConnection warp ministrant.leonid:8008
  WebAppDeploy cocoon warpConnection /
 
  this works, but now EVERYTHING is handled by cocoon. (That's maybe 
  what you mean)
 
 
 exactly
 
 
  But as you imply in your sample above, this is not the case with JK2?
 
  So I would be able to map a long list of folders to JK2 and have 
  everything else automatically handled by Apache?
 
  eg.
 
  JkMount / worker2
  JkMount /index worker2
  JkMount /index.* worker2
  JkMount /archive/* worker2
  JkMount /collaboration/* worker2
  JkMount /education/* worker2
  JkMount /general/* worker2
  JkMount /library/* worker2
  JkMount /news/* worker2
  JkMount /press/* worker2
  JkMount /publications/* worker2
  JkMount /season/* worker2
  JkMount /search/* worker2
  JkMount /x-space/* worker2
 
  Is this going to work?
 
 
  Yes, this will work - with the drawback, that you probably have to 
  update httpd.conf very often.
 
 yeah, not much fun 
 
   It would be famous if the guys from jk would adopt the cocoon sitemap 
  language. But at present the matching possibilities are very limited. 
  */dir/ or **/dir/* does not work :(
 
 
 Oh would'nt it!
 
 Reading the docs, for JK, (not sure if I understood them correctly), 
 but configuring:
 
   JkOptions +ForwardDirectories
 
 in conjunction with DirectoryIndex ??
 
 quote:
 
 If ForwardDirectories is set to true and Apache doesn't find any files 
 that match, the request will be forwarded to Tomcat for resolution. 
 This is used in cases when Apache cannot see the index files on the 
 file system for various reasons: Tomcat is running on a different 
 machine, the JSP file has been precompiled etc. 
 
 I do not know if this is relevant to my situation, whereby if an 
 incoming URL does not match a file, the request is automatically sent 
 to TomCat?
 
 A setup like that would make it really easy!
 
 What's more the client could decide at any time to statically render 
 parts of 

RE: dynamic atylesheet assignment

2002-12-03 Thread Conal Tuohy
Here's one way:

See the Meta-Stylesheets page on the Wiki.
http://outerthought.net/wiki/Wiki.jsp?page=MetaStylesheets

I assume that the article contains a PI or similar, pointing to the
stylesheet the author wants to use? You can transform the document using an
XSLT that is generated by another pipeline. This XSLT is generated by
transforming the content document (by extracting and resolving the URL
inside the PI in the document) into the stylesheet to which it refers.

match pattern=dynamic-xslt/*.xsl
generate src={1}.html
transform src=convert-pi-to-xinclude.xsl
transform type=xinclude
serialize type=xml

match pattern=article/*.html
generate src={1}.html
transform src=cocoon:/dynamic-xslt/{1}.xsl
serialize type=xml

Cheers!

Con


 -Original Message-
 From: Robert Sösemann [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 4 December 2002 05:31
 To: [EMAIL PROTECTED]
 Subject: dynamic atylesheet assignment


 I am working on a news site, where every author can assign own xsl
 stylesheet to their article. I want to bring cocoon
 dynamically insert an
 article's path into the transformer src attribute.

 I thought of generating an parameter inside the xsp for the following
 components an later catch it by the transformer. (How) can I do this?

 map:match pattern=**article_*.html
 map:act type=url-extract^

 !-- Inside the generate the path info is
 extracted from
 db --
 map:generate
 src=logicsheets/get-articledata.xsp
 type=xsp
 map:parameter name=article-id
 value={../2}/
 /map:generate
 /map:act

 map:transform
 src=transform/style-frame.xsl type=xslt/

 !-- here I want to access the path info --
 map:transform src=transform/{dynamic-path}
 type=xslt/

 map:transform src=transform/style-footer.xsl
 type=xslt/
 map:serialize type=html/
 /map:match


-
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: escaping special characthers: xsp or xslt problem?

2002-12-03 Thread Joerg Heinicke
Hello,

there shell be no difference between xsl:value-of/ with 
xsl:attribute/ or without it. What I can definitively say, is, that 
you don't need disable-output-escaping in general. Is there any 
difference between with or without it? d-o-e shell only be used, if you 
need  (less than) in a non XML conformant way like PHP (? ... ?) or 
JSP (%). But you use Cocoon, so there shell be no need in (again) 
general. Can you look at the result of the XSP without transforming it?

The problem in your case seems to be the esql:get-string/. The data 
will be escaped then. Doesn't there exist a esql:get-xml/?

Regards,

Joerg

[EMAIL PROTECTED] wrote:
I'm reading some data from a database (mysql) using an xsp page.

My xsp is very simple, something like:
esql:results
  news
esql:row-results
  titleesql:get-string column=title//title
/esql:row-results
  /news
/esql:results

Then I fill a text field using this data:

input type=text name=title size=50 maxlength=100
  xsl:attribute name=valuexsl:value-of select=normalize-space
(news/title) disable-output-escaping=yes//xsl:attribute
/input

When I wrote my data into the database, I converted special characters 
like à to à (I think this is a good practice, but correct me 
if I'm wrong!).

My problem is that the result after XSLT processing is:
input maxlength=100 size=50 name=titolo type=text
value=amp;#224;
and this is not what I really want, 'cause the user don't see the 
character à but the string à.

As you can see, I've used the attribute disable-output-escaping, but 
the output IS escaped.
If I try to output the content of (news/title) with a simple xsl:value-
of select (not wrapped by xsl:attribute), the characther is displayed 
as I expect.

any suggestion?


-
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: Complicated setup

2002-12-03 Thread Skip Carter

 Can anyone advise me on getting this complicated setup right?
 
 We have a website that will have some stuff served by Cocoon and some 
 served by Apache.
 
 It is not easy to separate them out because we need to retain legacy 
 URLs. Likewise, it is not possible to give Cocoon served material a URL 
 prefix, primarily because we need Cocoon to serve the home page of the 
 site.
 
  From Cocoon:
 
   /
   /index
   /general/*
   /archive/*
   /x-space/*
   etc. (about 10 items)
 
  From Apache:
 
   /images/*
   /movies/*
   /audio/*
   /x-spaceprojects/*
   /harlem/*
   etc. (also about 10 items)


I was able to move a large site (lots of legacy content and multiple virtual 
servers)
  over to serve everything thru Cocoon without changing any of the existing 
URLs.
  The apache.conf file looks like:

VirtualHost www1.myserver.com
  ServerName www1.myserver.com

IfModule mod_webapp.c
   WebAppConnection comConnection warp www1.myserver.com:8008
   WebAppDeploy cocoon   comConnection /
/IfModule
/VirtualHost


The Tomcat server.xml file has the cocoon directory as the default root:

Context path= docBase=cocoon debug=0 reloadable=true /



The only tricky part was handling the legacy CGI, that was handled by having 
another virtual server
and then redirecting to it in the Cocoon sitemap.xmap file:

   map:match pattern=cgi-bin/*
map:redirect-to uri=http://www2.myserver.com/cgi-bin/{1}/
   /map:match





-- 
 Dr. Everett (Skip) Carter  Phone: 831-641-0645 FAX:  831-641-0647
 Taygeta Scientific Inc.INTERNET: [EMAIL PROTECTED]
 1340 Munras Ave., Suite 314WWW: http://www.taygeta.com
 Monterey, CA. 93940












-
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: dynamic xsl:fo image inclusion

2002-12-03 Thread Robert Sösemann
My image was also very small. This could not be the reason. Maybe you could
send me some of your code snippets.

Robert
- Original Message -
From: Ludovic de Beaurepaire [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 03, 2002 5:51 PM
Subject: Re: dynamic xsl:fo image inclusion


 Hi robert,

 I solved this problem this afternoon :-) there were no error message in
the
 logs, and the cause was a too large image. try with a small jpg.

 Regards,

 Ludovic
 - Original Message -
 From: Robert Sösemann [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, December 03, 2002 5:21 PM
 Subject: dynamic xsl:fo image inclusion


  I tried every tip I could find on the web, but I never had success
 including
  an jpg into an pdf with cocoon.
  Maybe sombody can help?
 
  Thats what I have:
 
  XSL:FO fragment transforming IMG tags:
 
 xsl:template match=IMG
  fo:inline
  fo:external-graphic src=url(MYPATHBASE/{$src})/
  /fo:inline
 /xsl:template
 
  MYPATHPATH is changed to the real cocoon base path before serializing.
So
  the serializer should request the image in a correct way, that it is
 caugth
  by this sitemap matcher:
 
  map:match pattern=**.jpg
  map:read mime-type=image/jpg
src=resources/{1}.jpg/
  /map:match
 
  Why do I never get to see an image in my pdf`?
 
 
  -
  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]



-
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: dynamic xsl:fo image inclusion

2002-12-03 Thread Joerg Heinicke
Have a look into the log files (something like FileNotFoundException) 
and look, how the path is resolved. Furthermore is it possible to look 
at the XSL FO after MYPATHBASE is evaluated?

Joerg

Robert Sösemann wrote:
My image was also very small. This could not be the reason. Maybe you could
send me some of your code snippets.

Robert
- Original Message -
From: Ludovic de Beaurepaire [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 03, 2002 5:51 PM
Subject: Re: dynamic xsl:fo image inclusion




Hi robert,

I solved this problem this afternoon :-) there were no error message in


the


logs, and the cause was a too large image. try with a small jpg.

Regards,

Ludovic
- Original Message -
From: Robert Sösemann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 03, 2002 5:21 PM
Subject: dynamic xsl:fo image inclusion




I tried every tip I could find on the web, but I never had success


including


an jpg into an pdf with cocoon.
Maybe sombody can help?

Thats what I have:

XSL:FO fragment transforming IMG tags:

  xsl:template match=IMG
   fo:inline
   fo:external-graphic src=url(MYPATHBASE/{$src})/
   /fo:inline
  /xsl:template

MYPATHPATH is changed to the real cocoon base path before serializing.


So


the serializer should request the image in a correct way, that it is


caugth


by this sitemap matcher:

   map:match pattern=**.jpg
   map:read mime-type=image/jpg


src=resources/{1}.jpg/


   /map:match

Why do I never get to see an image in my pdf`?



-
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: dynamic xsl:fo image inclusion

2002-12-03 Thread J.Pietschmann
Joerg Heinicke wrote:

Have a look into the log files (something like FileNotFoundException) 
and look, how the path is resolved.
FO image source URLs are not resolved and leave no trace in the logs.
It may be necessary to look into the stdout/stderr for the FOP error
message.

J.Pietschmann


-
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: dynamic xsl:fo image inclusion

2002-12-03 Thread Joerg Heinicke
With

fo:external-graphic height=16cm src=../img/01.jpg/

I get at least following error message in the error.log:

ERROR   (2002-12-03) 23:06.40:484   [sitemap] (/cocoon/joerg/kal) 
Thread-7/ExternalGraphic: Error while creating area : Error with image 
URL: ..\img\01.jpg (Das System kann den angegebenen Pfad nicht finden) 
and no base directory is specified

(Cocoon 2.1.dev, JDK 1.4.1, FOP 0.20.4)

Joerg

J.Pietschmann wrote:
Joerg Heinicke wrote:


Have a look into the log files (something like FileNotFoundException) 
and look, how the path is resolved.

FO image source URLs are not resolved and leave no trace in the logs.
It may be necessary to look into the stdout/stderr for the FOP error
message.

J.Pietschmann



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




[2.1 CVS] - Build error

2002-12-03 Thread Antonio Gallardo
Hi!

I was currently downloading the lastest CVS of 2.1. I made a

./build.sh clean after download.

Now I am getting this error:

Error in:
xml-cocoon2/build/cocoon/blocks/databases/dest/db-modules-input.xconf

BUILD FAILED
file:xml-cocoon2/build.xml:1310: IOException: java.io.IOException: XPath
(/cocoon/input-modules) returned not one node, but 0 nodes

Regards,

Antonio Gallardo.



-
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: HSSFSerializer mime-type

2002-12-03 Thread neil
No, although the example sitemap includes config that looks like its setting the 
mime-type
HSSFSerializer.java doesn't actually use it. Its hardcoded - and I think its 
reasonable to
hardcode it as there is only one correct value (its just that the current hardcoded 
value
isn't it).

Andrew C. Oliver [EMAIL PROTECTED] wrote:
 IIRC this is configurable...  

 neil wrote:

 The HSSFSerializer hardcodes the mime-type as vnd.ms-excel whereas I think it \
 should be application/vnd.ms-excel (at lease that works better for me). Without \
 this I got erratic behavior with IE/Excel - sometimes the spreadsheet would appear \
 inside the IE window (excel inside IE) and othertimes it would appear inside a \
 separate Excel window. 


-
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: dynamic xsl:fo image inclusion

2002-12-03 Thread J.Pietschmann
Joerg Heinicke wrote:

With

fo:external-graphic height=16cm src=../img/01.jpg/

I get at least following error message in the error.log:

ERROR   (2002-12-03) 23:06.40:484   [sitemap] (/cocoon/joerg/kal) 
Thread-7/ExternalGraphic: Error while creating area : Error with image 
URL: ..\img\01.jpg (Das System kann den angegebenen Pfad nicht finden) 
and no base directory is specified

(Cocoon 2.1.dev, JDK 1.4.1, FOP 0.20.4)

I get something like cannot set logger for fo2pdf component with
a somewhat patched C2.0.2 and a FOP 0.20.5cvs. Maybe I should try
C2.1 again.

J.Pietschmann


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




[2.1 CVS] Missing blocks javadocs when generate Javadocs

2002-12-03 Thread Antonio Gallardo
Hi!

Currently the command:

./build.sh javadocs

does not include the docs for blocks.

Antonio Gallardo



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




Link Livesites: CaphNet upgraded to Cocoon 2

2002-12-03 Thread Skip Carter

The CaphNet site, http://www.caphnet.com/  is listed as a Cocoon 1 site,
it upgraded some time ago to Cocoon 2.

Thanks to Cocoon, its one of the few sites in the US that serves WML.


-
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: Changing Xalan XSL (WAS Re: SVG - java socket exception)

2002-12-03 Thread Reinhard Poetz
Chris,

The problem you have is a well-known problem of Cocoon or more precicly of
Xalan. There are many mails in the archives about this topic (e.g.:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=101994024218728w=2).

If you want to use Saxon have a look at
http://outerthought.net/wiki/Wiki.jsp?page=Saxon - it should help (and is
faster than Xalan).

Regards,
Reinhard

 -Original Message-
 From: Chris Faulkner [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 6:26 PM
 To: [EMAIL PROTECTED]
 Subject: Changing Xalan XSL (WAS Re: SVG - java socket exception)


 HI

 More on this - a couple of others seem to have similar problems
 but nobody ever got a reply when they post the error  makes
 me think it  is a bug. Anyhow, if I change this parameter to
 false (it is true by default) in
 cocoon.xconf

 parameter name=incremental-processing value=false/

 I don't get the errors but the JSP is still being called 2 or 3
 times so it is much slower and I'd rather leave the
 incremental-processing  parameter at true. How can I change from
 xalan to another XSL engine ? There
 is
 a mention of this on the performance tips page but no
 instructions about how to do it.

 Chris

 Hello
 
 I am getting on OK with Cocoon. I like it very much. I am using
 some JSP code as a generator. This creates some XML data which I
 apply xsl to transform to SVG. This is then serialised with
 svgxml and returned to the client. It all works fine. Except
 that, looking at my logs, very often, the first execution of the
 JSP returns this to stdout/stderr.
 
 java.lang.RuntimeException: java.net.SocketException: Connection
 aborted by peer
 : socket write error
 at
 org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
 :3231)
 at java.lang.Thread.run(Thread.java:479)
 
 I can see in the logs that Cocoon automatically seems to fire
 the same JSP again. It then works on the next shot, I get my SVG
 displayed in my SVG viewing app and it is just fine. This is
 obviously slowing things up though.
 
 Any ideas - I am using Cocoon 2.0.3 on Tomcat 4.0.1, JDK 1.3.1_06 on W2K.
 
 Thanks
 
 Chris
 
 
 
 
 -
 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]



-
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: RE: Changing Xalan XSL (WAS Re: SVG - java socket exception)

2002-12-03 Thread Chris Faulkner
Thanks for that - I did search the archives and found some messages with the same 
error message as I had but none that I saw had a follow-up. I really did search but 
until you understand the nature of the problem 
better, it is difficult to know what terms to search on.  I do apologise for wasting 
any of your time and thanks again. 

I'll try Saxon. I'm not immediately certain how to install it with Cocoon but I'll 
find out ! The journey is part of the fun.

Chris

Chris,

The problem you have is a well-known problem of Cocoon or more precicly of
Xalan. There are many mails in the archives about this topic (e.g.:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=101994024218728w=2).

If you want to use Saxon have a look at
http://outerthought.net/wiki/Wiki.jsp?page=Saxon - it should help (and is
faster than Xalan).

Regards,
Reinhard

 -Original Message-
 From: Chris Faulkner [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 03, 2002 6:26 PM
 To: [EMAIL PROTECTED]
 Subject: Changing Xalan XSL (WAS Re: SVG - java socket exception)


 HI

 More on this - a couple of others seem to have similar problems
 but nobody ever got a reply when they post the error  makes
 me think it  is a bug. Anyhow, if I change this parameter to
 false (it is true by default) in
 cocoon.xconf

 parameter name=incremental-processing value=false/

 I don't get the errors but the JSP is still being called 2 or 3
 times so it is much slower and I'd rather leave the
 incremental-processing  parameter at true. How can I change from
 xalan to another XSL engine ? There
 is
 a mention of this on the performance tips page but no
 instructions about how to do it.

 Chris

 Hello
 
 I am getting on OK with Cocoon. I like it very much. I am using
 some JSP code as a generator. This creates some XML data which I
 apply xsl to transform to SVG. This is then serialised with
 svgxml and returned to the client. It all works fine. Except
 that, looking at my logs, very often, the first execution of the
 JSP returns this to stdout/stderr.
 
 java.lang.RuntimeException: java.net.SocketException: Connection
 aborted by peer
 : socket write error
 at
 org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
 :3231)
 at java.lang.Thread.run(Thread.java:479)
 
 I can see in the logs that Cocoon automatically seems to fire
 the same JSP again. It then works on the next shot, I get my SVG
 displayed in my SVG viewing app and it is just fine. This is
 obviously slowing things up though.
 
 Any ideas - I am using Cocoon 2.0.3 on Tomcat 4.0.1, JDK 1.3.1_06 on W2K.
 
 Thanks
 
 Chris
 
 
 
 
 -
 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]



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




XML form How To's guide problem

2002-12-03 Thread Sreenivasan N.
Hi all

I was just trying to work with XML form and found that the folder name 
specified are different in each steps in 
xml.apache.org/cocoon/howto/xmlform

For ex step 1 say to create a how-to folder in src\webapp\samples\xmlform. 
In the same page for start.xml it says copy and save to 
src\webapp\mount\xmlform\howto
In step 2 for howto-xmlform-sch-report.xml its says place it inthe folder 
src\scratchpad\webapp\samples\xmlform\schematron

What is the exact flow and into which folder are these to be copied.
These steps are to be done in the cocoon 2.0.3 source file or binary file?

Kindly help me out to see a XML form working in Cocoon

Thanks in advance
Regards
Sreenivasan N.







Attitudes are much more important than aptitudes.
Nothing is impossible for a willing heart

Sreenivasan N.
Sony SARD
Ext 5816

Email. [EMAIL PROTECTED]
Per: [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]



Re: Microsoft SQLserver with cocoon

2002-12-03 Thread Gabriele Domenichini
Thanks all,
Please please contribute to the page on specific database 
connections on wiki.
It's pretty simple:
1. go to 
http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection
2. see what others like you have done. Copy one of them in a new page 
you create
3. Adapt it to the specifity of Ms SQL connection and add tips that you 
have learned

If someone had done it before, Maxime wouldn't have needed to ask for 
the solution to the group.


Christopher Watson wrote:

Maxime


1)

When I last got the drivers there were 3 jars, namely
msbase.jar
mssqlserver.jar
msutil.jar

Try putting all 3 jars into cocoon's WEB-INF/lib

2)

For mssql add following lines (between ... ...) to in WEB-INF/web.xml
within
   init-param
 param-nameload-class/param-name
 param-value

...
   !-- For mssql2000 Driver: --
   com.microsoft.jdbc.sqlserver.SQLServerDriver
...

3)

Add following jdbc element within datasources/ in cocoon.xconf

   jdbc name=my_sql2000_cocoon_datasource
 pool-controller min=5 max=10/

dburljdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydatabase
/dburl
 usersa/user
 passwordmypassword/password
   /jdbc

assuming database on 
Server:	localhost
Port:		1433
Database:	mydatabase
and user and password as specified
please edit as necessary

4)

You can now (after restarting servlet engine) do something like 

?xml version=1.0?
xsp:page language=java
 xmlns:xsp=http://apache.org/xsp;
	  xmlns:esql=http://apache.org/cocoon/SQL/v2;
 

page
  esql:connection
esql:poolmy_sql2000_cocoon_datasource/esql:pool
  my_table_element
esql:execute-query
  esql:query
select fld1 as myfield1, fld1 as myfield2 from mytable
/esql:query
esql:results
  esql:row-results
my_row_element
 	   my_column_one_elementesql:get-string
column=myfield1//my_column_one_element
 	   my_column_two_elementesql:get-string
column=myfield2//my_column_two_element
/my_row_element
  /esql:row-results
/esql:results
esql:no-results
  no-resultsno-results/no-results
/esql:no-results
  /esql:execute-query
  /my_table_element
/esql:connection
/page
/xsp:page

Where 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 02 December 2002 10:10
To: [EMAIL PROTECTED]
Subject: Microsoft SQLserver with cocoon


Hi
I want to use a microsoft sql server with cocoon, so I downloaded
Microsoft JDBC drivers for MS Sql server, and put the lib (JAR) into
cocoon's library dir, restarted cocoon. 
Now, do I have to modify the cocoon.xconf? Can anybody tell me the way
to make a connection and get data?

Thanks

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


 




-
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: AW: Sendmail serial email

2002-12-03 Thread Thorsten Scherler
Hello Frank,

so you patched the sendmail.xsl to have multiple cc. Rhanks for the reply.

What you have said makes sense (showing the concept). I had a look @ the 
JavaMail Design Specification. I have there my desiered result (a script 
for multipart message). That would be the ready to go Java code.

Coming from the sendmail.xsl I have to extend it in attaching the code 
for multipart. This I have to write in xsl because it will be parsed. 
The parsed result have to be in Java.

snip
// Instantiate a Multipart object
MimeMultipart mp = new MimeMultipart();
// create the first bodypart object
MimeBodyPart b1 = new MimeBodyPart();
// create textual content
// and add it to the bodypart object
b1.setContent(Spaceport Map,text/plain);
mp.addBodyPart(b1);
// Multipart messages usually have more than
// one body part. Create a second body part
// object, add new text to it, and place it
// into the multipart message as well. This
// second object holds postscript data.
MimeBodyPart b2 = new MimeBodyPart(); b2.setContent(map,application/
postscript);
mp.addBodyPart(b2);
// Create a new message object as described above,
// and set its attributes. Add the multipart
// object to this message and call saveChanges()
// to write other message headers automatically.
Message msg = new MimeMessage(session);
// Set message attrubutes as in a singlepart
// message.
msg.setContent(mp); // add Multipart
msg.saveChanges();
/snip

I have to get that result, right!

Thank you Frank for repling I am on my own and I will try my best! ;-)

Frank Ridderbusch wrote:
Scherler, Thorsten wrote:



Hello group,

I don't know why I don't get any answers on that topic, but it is quit
frustrating.




http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon-p2.html#sidebar1


There you can find how to nested a esql with sendmail.

It is working!

Now I just suffering how to attach a pdf.

...but I don't think I will get any answers on that,or?

:-(



Well, here is someone, who will answer, but I guess it is not quite the
expected answer. 

It does not appear, that you have looked at source of sendmail.xsp 
logisheet (to be found at the location 

src/java/org/apache/cocoon/components/language/markup/xsp/java/sendmail.xsl

If you do, then you realize, that sendmail.xsp ist basically a XSL
stylesheet, that generates Java code, which in turn send an email
though the Java Mail API. You're also see, that only a hand full of
tags are implemented and sendmail:attach is not one of them.
Apparently until now there wasn't anybody who felt the need to 
to attach a file in a sendmail.xsp logisheet. I guess, the current
sendmail.xsp is more of a prove of concept and this is probably
also the reason, that it not configured by default in the main sitemap.

I guess, you're on your own. You might want to look at the report
I filed with bugzilla:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15005

This might give you an idea, how to proceed. 


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