AW: How to get an absolute path ?

2003-02-11 Thread Jan Harms
Hi Olivier,

in a servlet the ServletContexts getRealPath() method does what you want. In Cocoon 
there is the class
org.apache.cocoon.environment.Context which should do the same. 

Hope this helps

-Jan Harms

> -Ursprüngliche Nachricht-
> Von: Olivier Billard [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 11. Februar 2003 16:24
> An: [EMAIL PROTECTED]
> Betreff: How to get an absolute path ?
> 
> 
> Hi all !
> 
> I am using Cocoon 2.0.4 with Tomcat 4.1.18.
> In an XSP page, I would like to get the "hard" path of the webapp or a
> sub-dir of the webapp, to use Lucene with an index directory. 
> I know I can
> get the relative path of the webapp with 
> , but I want
> to get the absolute path such like :
> "/apps/tomcat/webapps/cocoon/mycocoon/index". Is it possible ?
> 
> I apologize in advance if this doesn't concern this mailing list ! ...
> 
> Olivier BILLARD
 

-
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: anyone interested in a cocoon-users meeting in Köln/germany ?

2003-02-11 Thread Jan Harms
Hi Hussayn,

I´m interested too. The topics I would like to hear about or discuss are: "What do you 
use Cocoon for?" (i.e. what types of applications) and, of course, "best practices"   
:-)

BTW, is anyone of you going to the JAX 2003 Conference in Frankfurt (12.-16. May) ? 

Carsten and Matthew will be doing a "Powerworkshop" on Cocoon. 

Bye,

-Jan Harms

> -Ursprüngliche Nachricht-
> Von: SAXESS - Hussayn Dabbous [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 11. Februar 2003 13:53
> An: [EMAIL PROTECTED]
> Betreff: anyone interested in a cocoon-users meeting in Köln/germany ?
> 
> 
> Hy;
> 
> If there is interest, i could organise something in Köln.
> (maybe not as nice a place as some of you offered in this list ;-) )
> Just send me a note (possibly include a proposal for an agenda ... )
> 
> regards, Hussayn
> 
 

-
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: custom generator not working on a fresh install

2003-02-10 Thread Jan Harms
Hi Rick,

have you tried to call the java VM with the "-verbose:class" option? You will have to 
modify the tomcat startup skripts for that. With this option you can see which classes 
are actually loaded (and from where).

Are the cocoon classes loaded? What if you use a FileGenerator (inherits from 
AbstractGenerator), does that work? Which classes does your Generator import? You 
could try to write a simple CustomGenerator which does nothing. Just inherit from 
AbstractGenerator and see if it gets loaded...

Don´t panic  ;-)

-Jan Harms


> -Ursprüngliche Nachricht-
> Von: peter riegersperger [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 10. Februar 2003 22:09
> An: [EMAIL PROTECTED]
> Betreff: Re: custom generator not working on a fresh install
> 
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> hi again!
> 
> nobody any idea? i'm getting desperate here, so any 
> hint/pointer/tip would be 
> very very welcome!
> 
> thanks,
> 
> rick
> 
> 
> 
> On Friday 07 February 2003 22:52, peter riegersperger wrote:
> > Hi all!
> >
> > We reactivated a Cocoon-based project that I haven't 
> touched for a while,
> > and I try to get Cocoon (and that project) running on my notebook.
> > Included in this project is a custom generator, and this 
> seems to be a bit
> > of a problem.
> >
> > On the development server, all is running fine, but as soon 
> as I add the
> > custom generator to the sitemap on my notebook, I get the 
> following error:
> >
> > org.apache.cocoon.ProcessingException: Error compiling sitemap:
> > java.lang.NoClassDefFoundError:
> > org/apache/cocoon/generation/AbstractGenerator
> >
> > Our custom generator extends AbstractGenerator, but why 
> can't Cocoon find
> > it? On our server, there's no problem with the custom generator.
> > (The rest of cocoon is running excellent, as is everything 
> else I modified.
> > It's just the mention of the generator)
> >
> > The server is running on cocoon-2.0.3, I'm using 2.0.4 (Source
> > distribution) on my notebook.
> > All in all, I'm running:
> > Linux
> > Tomcat 4.0.4
> > Cocoon 2.0.4 (the source distribution)
> > j2sdk1.4.1_01
> >
> > First, I built Cocoon with
> > ./build.sh  -Dinclude.webapp.libs=yes 
> -Dinstall.war=$TOMCAT_HOME/webapps
> > webapp
> >
> > Then, I copied it to /tomcat/webapps
> >
> > I copied the following files to tomcat/common/lib:
> > xalan-2.3.1.jar
> > xercesImpl-2.0.0.jar
> > these two where present:
> > xercesImpl.jar
> > xmlParserAPIs.jar
> >
> > I copied the following files to jdk1.4-home/jre/endorsed:
> > xalan-2.3.1.jar
> > xercesImpl-2.0.0.jar
> > xml-apis.jar
> >
> > The jar with our custom generator is in
> > cocoon/WEB-INF/lib
> > and
> > tomcat/common/lib
> >
> > I've been fiddling around with this the whole day, and 
> obviously I've
> > forgotten something.
> >
> > I hope anyone can help me, and that this mail makes any 
> sense (after 13
> > hours of copying, deleting and modifying files on a 12"-screen),
> >
> > rick
> >
> > ps: In my desperation, I even tried copying the complete 
> cocoon-directory
> > from our server, but the error is exactly the same.
> 
> - -- 
> |-
> | peter riegersperger  <[EMAIL PROTECTED]>
> |-
> | ein windows switcher tagebuch:
> | http://forum.subnet.at/viewforum.php?f=22
> |-
> | subnet
> | platform for media art and experimental technologies
> |-
> | http://www.subnet.at/
> |-
> | muehlbacherhofweg 5 // 5020 salzburg // austria
> |-
> | fon/fax +43/662/842 897
> |- 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE+SBTuIMP39JYOy9IRAkpDAKDEfKf1C8XyBEd600yRj2YxZTx+twCgtKJ1
> iMyuvq4cyWUL+Pn5xjqj+bY=
> =/mC5
> -END PGP SIGNATURE-
> 
> 
> -
> 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]>




AW: AW: Not handle the XML header in the sax parser

2003-02-06 Thread Jan Harms
Heiko Milke wrote:
> Am Don, 2003-02-06 um 18.03 schrieb Jan Harms:
> > Well, that´s basically what the IncludeXMLConsumer (in 
> > package org.apache.cocoon.xml) does, doesn´t it? 
> > It additionally ignores the startDTD() and endDTD() methods.
> > 
> > Regards,
> > 
> > -Jan
> > 
> 
> 
> didnt know :)
> 
> Thanks for the hint !
> Heiko
> 
Well, I also keep reinventing wheels, you know.   ;-)

Would be nice to have an alarm that goes off every time I implement functionality that 
already exists for free. *That* would really be a useful IDE feature... :-) :-) :-)

Gruß aus Dortmund

-Jan Harms

-
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: Not handle the XML header in the sax parser

2003-02-06 Thread Jan Harms
Well, that´s basically what the IncludeXMLConsumer (in package org.apache.cocoon.xml) 
does, doesn´t it? 
It additionally ignores the startDTD() and endDTD() methods.

Regards,

-Jan

> -Ursprüngliche Nachricht-
> Von: Heiko Milke [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 6. Februar 2003 17:34
> An: [EMAIL PROTECTED]
> Betreff: Re: Not handle the XML header in the sax parser
> 
> 
> Hey there,
> 
> well actually i dont recommend doing that but here is a way to do it.
> 
> You simple write yourself a documenthandler transmitter or 
> whatever you
> call it (i named it FragmentHandler in the Example):P
> 
> --
> public class FragmentHandler implements ContentHandler {
> 
> ContentHandler parent = null;
> public FragmentHandler(ContentHandler parent) {
> this.parent = parent;
> }
> }
> --
> 
> 
> you have to implement ALL memberfunction of the 
> ContentHandler interface
> and send all the events to the parent like this.
> 
> --
> public void characters(char[] ch, int start, int length) throws
> SAXException {
>   parent.characters( ch,  start,  length);
> }
> --
> 
> and in the last step you simply catch the startDocument and 
> endDocument
> events and dont tell the parent 
> 
 

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

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




AW: AW: convert String into Sax events into my own transformer

2003-02-06 Thread Jan Harms
Sorry, I forgot to tell you that you can wrap your xmlConsumer into a 
org.apache.cocoon.xml.IncludeXMLConsumer.
This class basically ignores the start/endDocument() and start/endDTD() method call:

parser.parse(inputSource, new IncludeXMLConsumer(xmlConsumer()));


BTW, where does your String come from? If you just want to emit one single tag, e.g. 
 it will be easier to just call the sax methods directly.

I assume that your transformer extends AbstractTransformer. Then you can do the 
following

//create  in consumer
super.startElement("", "test", "test", new org.xml.sax.helpers.AttributesImpl()); 
super.endElement("", "test", "test");


If you really want to build your own transformer, I can only recommend to have a look 
at the sources of cocoon-transformers. This helps a lot.

What confused me a bit about your last post, is that you have xsp code in your 
browser... Maybe you could explain in more detail what you are trying to do, then we 
might help you better.

Regards,

-Jan

> -Ursprüngliche Nachricht-
> Von: Lionel Crine [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 6. Februar 2003 10:33
> An: [EMAIL PROTECTED]
> Betreff: Re: AW: convert String into Sax events into my own 
> transformer
> 
> 
> OK, it's allmost working because i still have :
> 
> 
> 
> and In my browser I have :
> 
> 
> 
> http://apache.org/xsp"; 
> xmlns:ixia-query="http://www.ixiasoft.com/ixia/query/1.0";>
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> I would like the parser to not keep the  encoding="UTF-8"?>.
> 
> Is it possible ?
> 
 

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

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




AW: convert String into Sax events into my own transformer

2003-02-05 Thread Jan Harms
You´ll need a XML-parser to do that. Something like that should do the trick...

import org.apache.avalon.excalibur.xml.Parser;
import org.xml.sax.InputSource;
import java.io.ByteArrayInputStream;
...
String my_string = ...
ByteArrayInputStream my_string_as_stream = new 
java.io.ByteArrayInputStream(my_string.getBytes());
InputSource input_source = new InputSource(my_string_as_stream);
Parser parser = (Parser) componentManager.lookup(Parser.ROLE);
parser.parse(input_source, xmlConsumer);
...

xmlConsumer is the transformers xmlConsumer attribute.

Your transformer must implement Composable in order to get the componentManager. 

Regards,

-Jan Harms

> -Ursprüngliche Nachricht-
> Von: Lionel Crine [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 5. Februar 2003 17:35
> An: [EMAIL PROTECTED]
> Betreff: convert String into Sax events into my own transformer
> 
> 
> I would like convert a String into SAX events into my transformer.
> 
> In my enddocument method i wrote :
> 
> super.character(my_String.toCharArray(), 0, myString.length());
> 
> But I don't want that because it spit text in my browser.
> I want my String to be decomposed into elements and text.
> 
> 
> Is there a way to do that ?
> 

-
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: matcher of a request

2003-02-05 Thread Jan Harms



Nesto,
 
I´m 
not sure if this works, but try 
 
      http://anotherHost:8080/theApp/{1}.jsp?user={request:user}&password={request:password}" 
/>       
>
 
The 
{request:yourparam} parts are so called input-modules. See:
 
http://xml.apache.org/cocoon/userdocs/concepts/modules.html
 
Be 
careful with the generator type you choose. The JSP generator expects the 
location of a JSP-File. You are calling a jsp from another server, that means 
you have to use a generator that matches the *output* of this jsp. I.e if the 
jsp produces HTML you need the HTML-generator. In your case you need the 
file-generator since the jsp produces XML.
 
Hope 
this helps,
 
-Jan 
Harms
 

  -Ursprüngliche Nachricht-Von: Nesto 
  [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 5. Februar 2003 
  15:00An: [EMAIL PROTECTED]Betreff: matcher of 
  a request
  How can I write a matcher for this type of 
  request:
   
  http://myhost.com:8080/cocoon/myApp/list.jsp?user=tom&password=tom
   
  I can't write a matcher that runs fine! I don't 
  know how the parameters can be passed.
  The jsp runs on another server and generates a 
  xml document.
   
        
   
        
  >
   
   
  How I have to modify the 
  matcher??
  Thanks in advance!
   
  Nesto


Wiki Rules [Was: AW: Added a beginners page on basic cocoonapp organisation]

2003-02-05 Thread Jan Harms
Niclas Hedhman wrote:

snip
> >
> > 2)
> > You may want to link to other pages in the wiki, especially 
> [sitemap] and
> > [UnderstandingCocoonMounts].
> 
> Why not you make the change yourself? I changed some 
> misdirected links on some 
> other pages, and didn't even ask for a login... Dirt easy for 
> small edits!!
> 
> Wiki Rules... If there was only a XML version available, so I 
> didn't have to 
> be bothered with YASL...
> 
> Niclas
> 

Hi Niclas,

you´re probably right. The reason I didn´t do the changes myself is that I´m not sure 
about the Wiki-rules. 

I understand that I can add a *new* wikipage anytime. But what about changing pages 
from another author? Of course I *can* change anything I want, since there is no login 
required... and of course I wouldn´t ask before fixing a broken link. However adding 
new links or content is something different, isn´t it?

Shall I mark my changes? Shall I inform the original author of the page? Shall I just 
add my comments at the end of the page, and leave the rest of the page unchanged?

Regards,

-Jan

Dipl. Inf. Jan Harms

Software Developer
VIVAI Software AG
Königswall 1
44137 Dortmund
Germany

email   mailto:harms_at_vivai.de
url http://www.vivai.de

-
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: Added a beginners page on basic cocoonapp organisation

2003-02-05 Thread Jan Harms
Hi Hussayn,

nice work! Just two comments:

1)
I didn´t test it but I suspect that there might be a problem with some of the default 
matchers, since "your" pipeline, i.e. the generic automount pipeline is the last one.

Here are some matchers which might interfere (there are more):

   
   
   
   

The user might name his work directory "news". In that case he won´t see any of his 
images, which is probably very confusing. I´m also not sure about the last matcher. 
Doesn´t it match everything?

2) 
You may want to link to other pages in the wiki, especially [sitemap] and 
[UnderstandingCocoonMounts].

Regards,

-Jan
----
Dipl. Inf. Jan Harms

Software Developer
VIVAI Software AG
Königswall 1
44137 Dortmund
Germany

email   mailto:harms_at_vivai.de
url http://www.vivai.de
 

> -Ursprüngliche Nachricht-
> Von: SAXESS - Hussayn Dabbous [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 4. Februar 2003 22:27
> An: [EMAIL PROTECTED]
> Betreff: Added a beginners page on basic cocoonapp organisation
> 
> 
> Hy;
> 
> After a break i made up my mind and added a simple tutorial on
> webapp organisation using subsitemaps. Most of this has already
> been adressed in several places, but maybe it fits best in the
> "Cocoon Competence Center". I would be glad, if someone
> could review this and eventually clearify parts of it, if i failed
> to find the right words.
> 
> http://wiki.cocoondev.org/Wiki.jsp?page=BeginnerSimpleWebappOr
ganisation

regards, Hussayn

--
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
D-50935 Köln
tel.:+49 221 56011 0
fax.:+49 221-56011 20
email:[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]>




AW: mapping to basepath in static content

2003-02-03 Thread Jan Harms
Hi Robert,

you could write your own custom transformer. That is *much* faster than using XSLT. 
Take a look at 

http://wiki.cocoondev.org/Wiki.jsp?page=ImplementingTransformers

to get started.

I was thinking about doing something similar. The basic idea is to use a list of 
"symbolic names" for URIs (e.g. in a simple .properties file):

home=/index.html
search.user.form=/search/user_search.html
search.user.action=/search/user_search.action
search.company.form=/search/company_search.html
search.company.action=/search/company_search.action
...

Inside of the pages I would replace all links like that:

Home
Search for a company

Enter a user name:


Transformer implementation shouldn´t be too complicated: Look at each attribute of the 
incoming XML/SAX and replace the {}-strings inside attributes. I guess the performance 
should also be okay.
This transformer could be put at the end of each pipeline. So that would allow all 
other components (XSP, XML, Transformers) to use only the "symbolic names" instead of 
the URI. This has the additional advantage, that you could assert referential 
integrity, i.e. broken links are very easy to find and fix.

Until now I didn´t have the time to implement this, because it has a rather low 
priority for our project, sorry :-( 

It´s just an idea. It may be stupid. Comments welcome.

-Jan

----
Dipl. Inf. Jan Harms
Software Developer

VIVAI Software AG
Königswall 1
44137 Dortmund
Germany

email   harms_at_vivai.de
url http://www.vivai.de
 

> -Ursprüngliche Nachricht-
> Von: Robert Sösemann [mailto:[EMAIL PROTECTED]]
> Gesendet: Samstag, 1. Februar 2003 16:10
> An: [EMAIL PROTECTED]
> Betreff: Re: mapping to basepath in static content
> 
> 
> Yes, thank you, it's better than nothing. But I need to 
> replace URL in scr,
> value, action ... attributes as well. Sometimes even in 
> javascript commands.
> I tried to write my own xsl, but then it really gets very slow.
> 
> Any idea.
> 
> Robert
> - Original Message -
> From: "Murad Jura" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, February 01, 2003 1:15 PM
> Subject: Re: mapping to basepath in static content
> 
> 
> > Hello Robert,
> >
> > there is the AugmentTransformer which augments all 'href' attributes
> > with the full path to the request. IMHO it is a good 
> starting point for
> you.
> >
> > Regards,
> > Murad Jura.
> >
> > Robert Sösemann wrote:
> > > Hello,
> > >
> > > what I need is a centralized mechanism to change the 
> paths in all my
> > > site-elements. (that means: Later when I switsch from 
> development to
> > > production I just want to change pathname at one single 
> point, not every
> > > single href, src ...)
> > >
> > > Inside elements handled by cocoon (XSP, Generators, 
> Action) thats no
> > > problem, because they know their own context. Things I 
> later add in my
> > > Transformers are also no problem. I use xsl:include to 
> set a variable in
> > > very other xsl.
> > >
> > > BUT: I also use static html or xhtml pages. How can change path
> attributes
> > > an even javascript command in a similar centralized way?
> > >
> > > Who can help? Maybe I am on a totally wrong way.
> > >
> > > Rob
> > >
> 

-
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: Sitemap.xmap giving ugly errors

2003-02-03 Thread Jan Harms
Hi Jason,

I believe the  element must be inside the  element. 

-Jan


> -Ursprüngliche Nachricht-
> Von: Jason Bruce [mailto:[EMAIL PROTECTED]]
> Gesendet: Samstag, 1. Februar 2003 16:16
> An: [EMAIL PROTECTED]
> Betreff: Sitemap.xmap giving ugly errors
> 
> 
> I have atached what I beleive to be a extremly simple 
> sitemap.xmap.  But
> when I try to use it I get an error.
> 
> description org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: 
> Error compiling
> sitemap_xmap: Line 324, column 54: '}' expected Line 63, 
> column 11: class
> org.apache.cocoon.www.sitemap_xmap should be declared 
> abstract; it does
> not define method process(org.apache.cocoon.environment.Environment,
> org.apache.cocoon.components.pipeline.StreamPipeline,
> org.apache.cocoon.components.pipeline.EventPipeline) in class
> org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors
> 
> Anyone have any ideas?  If you want to see the error check out
> http://216.87.136.82:8080/cocoon2/20030130.html
> 
> 

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

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




AW: xsp-element equivalent to xsl:param?

2003-01-31 Thread Jan Harms
Thorsten,

here is a tip that might be useful: When you get a message "Error compiling foo.xsp" 
you should have a look at the generated java class.

Like JSPs, XSPs are transformed into a .java source file. Afterwards cocoon tries to 
compile this .java file into a .class file. These files can be found in Tomcats (or 
your servlet-engines) work-directory. Search for a subdirectory called 

cocoon-files/org/apache/cocoon/www/

There you can find a "foo_xsp.java" file. Open this file and search for syntax errors 
(the exception contains a line number!). Sure it´s generated code, but quite readable.

-Jan


> -Ursprüngliche Nachricht-
> Von: Scherler, Thorsten [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 31. Januar 2003 14:09
> An: [EMAIL PROTECTED]
> Betreff: AW: xsp-element equivalent to xsl:param?
> 
> 
> Yes, I've noticed that as well but with
> getParameter("date")); -> same exception.
> 
> Thanks
> 
> -Ursprüngliche Nachricht-
> Von: Geoff Howard [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 31. Januar 2003 14:17
> An: [EMAIL PROTECTED]
> Betreff: RE: xsp-element equivalent to xsl:param?
> 
> 
> Wast that cut and pasted?  It looks like you're missing an 
> end ) - should
> be:
>   getParameter("date"));
> 
> Geoff
> 
> > -Original Message-
> > From: Scherler, Thorsten [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 31, 2003 7:48 AM
> > To: [EMAIL PROTECTED]
> > Subject: AW: xsp-element equivalent to xsl:param?
> >
> >
> > Hello Andrew,
> >
> > with:
> > 
> > try{
> > String timeOfDay = (new
> > 
> SimpleDateFormat("MM/dd/")).format(parameters.getParameter
> ("date");
> > }catch(Exception e){}
> > 
> >
> > I get:
> >
> > type fatal
> >
> > message Language Exception
> >
> > description org.apache.cocoon.ProcessingException: Language
> > Exception:
> > org.apache.cocoon.components.language.LanguageException: Error
> > compiling IDC2_info_int_xsp: Line 251, column 0: illegal start of
> > type Line 105, column 11: class
> > org.apache.cocoon.www.logic.IDC2_info_int_xsp should be declared
> > abstract; it does not define method generate() in class
> > org.apache.cocoon.generation.AbstractGenerator Line 0, 
> column 0: 2 errors
> >
> > sender org.apache.cocoon.servlet.CocoonServlet
> >
> > source Cocoon servlet
> >
> > stack-trace
> >
> > org.apache.cocoon.ProcessingException: Language Exception:
> > org.apache.cocoon.components.language.LanguageException: Error
> > compiling IDC2_info_int_xsp:
> > Line 251, column 0:  illegal start of type
> > Line 105, column 11:  class
> > org.apache.cocoon.www.logic.IDC2_info_int_xsp should be declared
> > abstract; it does not define method generate() in class
> > org.apache.cocoon.generation.AbstractGenerator
> > Line 0, column 0:
> > 2 errors
> >
> > at
> > org.apache.cocoon.components.language.generator.ProgramGeneratorIm
> > pl.createResource(ProgramGeneratorImpl.java:340)
> > at
> > org.apache.cocoon.components.language.generator.ProgramGeneratorIm
> > pl.load(ProgramGeneratorImpl.java:292)
> > at
> > org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPage
> > sGenerator.java:198)
> > at
> > org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupP
> > ipeline(AbstractEventPipeline.java:202)
> > at
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(C
> achingEventPipeline.java:278)
> > at
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.generat
> > eKey(CachingEventPipeline.java:141)
> > at
> > org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
> > s(CachingStreamPipeline.java:317)
> > at
> > org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.i
> > nvoke(SerializeNode.java:153)
> > at
> > org.apache.cocoon.components.treeprocessor.AbstractParentProcessin
> > gNode.invokeNodes(AbstractParentProcessingNode.java:85)
> > at
> > org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatch
> > Node.invoke(PreparableMatchNode.java:156)
> > at
> > org.apache.cocoon.components.treeprocessor.AbstractParentProcessin
> > gNode.invokeNodes(AbstractParentProcessingNode.java:109)
> > at
> > org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.in
> > voke(PipelineNode.java:140)
> > at
> > org.apache.cocoon.components.treeprocessor.AbstractParentProcessin
> > gNode.invokeNodes(AbstractParentProcessingNode.java:109)
> > at
> > org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.i
> > nvoke(PipelinesNode.java:144)
> > at
> > org.apache.cocoon.components.treeprocessor.TreeProcessor.process(T
> > reeProcessor.java:328)
> > at
> > org.apache.cocoon.components.treeprocessor.TreeProcessor.process(T
> > reeProcessor.java:293)
> > at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
> > at
> > 
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
> java:999)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> > org.apache.ca

AW: xsp-element equivalent to xsl:param?

2003-01-31 Thread Jan Harms
  
>   
>src="logic/IDC2_info_int.xsp"/>
>   
>   
>   
>   
>src="cocoon:/IDC2/info_int.xml"/>
>   
>src="stylesheets/pdf/IDC2/bericht_int.xsl"/>
>   
>   
> 
>   
> 
> 
> logic/IDC2_info_int.xsp:
> http://apache.org/xsp"; 
> xmlns:esql="http://apache.org/cocoon/SQL/v2"; 
> xmlns:xsp-request="http://apache.org/xsp/request/2.0";>
>   
>   
>   IDC2_int
>   
>   
>  select * from info_bericht  where country 
> ='' AND  
> Info_datum = ##
>  
>   
>   
>   
>   
>   
>   
>   
>   
> 
>   
>   
>   
>   
> 
>   
>   
>   
>   
> 
>   
> 
>   
>   
>   
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
>   
>   
>   
> 
>   
> 
>   
>   
>   
> 
>   
>   
>   
> 
>   
>   
>   
> 
>       
>   
>   
>   
>   
> 
>   
>   
>   
> 
>   
> 
>   
>   
>   
> 
>   
> 
>   
>   
>   
> 
>   
>           
>   
>   
>   
>   
>   
>   
>   
> 
> 
> -Ursprüngliche Nachricht-
> Von: Jan Harms [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 31. Januar 2003 13:49
> An: [EMAIL PROTECTED]
> Betreff: AW: xsp-element equivalent to xsl:param?
> 
> 
> 
> Andrew Timberlake wrote:
> > try{
> > String timeOfDay = (new
> > SimpleDateFormat("MM/dd/")).format(parameters.getParameter
> > ("date");
> > }catch(Exception e){}
> > 
> > 
> > You will need to wrap the code in a try/catch block or 
> > alternatively use
> > the syntax: parameters.getParameter("date", "default value of 
> > choice");
> > 
> 
> Thorsten, do you need a sitemap-parameter or a 
> request-parameter? From your previous posts I assume that you 
> want a request Parameter. In that case you should use 
> 
> request.getParamter("date") 
> 
> instead of 
> 
> parameters.getParameter("date")
> 
> 
> The variables "request" and "parameters" are predefined 
> variables in every XSP. Have a look at 
http://wiki.cocoondev.org/Wiki.jsp?page=XSPEnvironment

Hope this helps

-Jan Harms

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




AW: xsp-element equivalent to xsl:param?

2003-01-31 Thread Jan Harms

Andrew Timberlake wrote:
> try{
> String timeOfDay = (new
> SimpleDateFormat("MM/dd/")).format(parameters.getParameter
> ("date");
> }catch(Exception e){}
> 
> 
> You will need to wrap the code in a try/catch block or 
> alternatively use
> the syntax: parameters.getParameter("date", "default value of 
> choice");
> 

Thorsten, do you need a sitemap-parameter or a request-parameter? From your previous 
posts I assume that you want a request Parameter. In that case you should use 

request.getParamter("date") 

instead of 

parameters.getParameter("date")


The variables "request" and "parameters" are predefined variables in every XSP. Have a 
look at http://wiki.cocoondev.org/Wiki.jsp?page=XSPEnvironment

Hope this helps

-Jan Harms

-
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: Apache Tomcat/4.0.6 - HTTP Status 404

2003-01-30 Thread Jan Harms



Richard, 
 
it 
seems that your request reaches the Tomcat-Server, but not the Cocoon-Servlet 
(If Coccon can´t find a certain page it displays something like "Cocoon 2 - 
Resource not found").
 
Make 
sure that your /soundpool URIs are send to the Cocoon-Servlet: 
Check 
 
TOMCAT_HOME/conf/server.xml    (assert 
that URI is send to Cocoon-Web-App)
 
and 
the  element 
in
 
your_cocoon_app/WEB_INF/web.xml   (assert 
that URI is send to Cocoon-Servlet)
 
bye
 
-Jan

  -Ursprüngliche Nachricht-Von: Richard Cunliffe 
  [mailto:[EMAIL PROTECTED]]Gesendet: Donnerstag, 30. Januar 2003 
  14:34An: [EMAIL PROTECTED]Betreff: Apache 
  Tomcat/4.0.6 - HTTP Status 404 
  
  Hi,
   
  I can see there is an argument 
  going on at the moment, but if anyone has time….
   
   
  I now have installed the 
  following:
   
      
  JDK 1.3
      
  Cocoon 2.0.4
      
  Tomcat 4.0.6
      
  Apache 2.0.42
   
  And they are all working! 
  J
   
  I had previously had installed 
  Cocoon 1.3 and tomcat 3.3a, and I put a simple soundpool example in the 
  webapps directory. This displayed only the source code of the xml file, hence 
  the upgrade.
   
  I have got all the new versions 
  installed and I have put the same example in the webapps directory in tomcat 
  again, and tried viewing it through Internet Explorer 6. It is coming up with 
  the following error:
   
   
    Apache Tomcat/4.0.6 - HTTP 
  Status 404 - /soundpool/soundpool.xml
    
  type Status report
    
  message 
  /soundpool/soundpool.xml
    
  description The requested resource 
  (/soundpool/soundpool.xml) is not available.
   
   
  I have put the following code in 
  my sitemap under pipelines:
   
    
    
    
  
        
  
      
  
    
    
    
    
  
        
  
    
  
   
   
  I’m sure this is a really 
  simple problem to fix.
   
   
  Thanks,
   
  Richard.


AW: AW: How to run 2 tomcat-coocon web server

2003-01-29 Thread Jan Harms
Hi,

not quite sure, but it seems you want to use Tomcat standalone *without* a WebServer. 
In that case you can disable all the Non-HTTP-Connectors in Tomcats server.xml. The 
port 8009 is typically the Ajp13Connector used to communicate with Apache. 

-Jan

> -Ursprüngliche Nachricht-
> Von: CARLETTA ANGELO [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 29. Januar 2003 10:10
> An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Betreff: Re: AW: How to run 2 tomcat-coocon web server
> 
> 
> --- Reçu de   INFETUDE.G145193 02/250.96.71  
> 29-01-03 10.10
> 
> Hy,
> 
> I have tomcat 4.1.12, cocoon 2.04, JDK 1.3.1, MySQL 3.21 and 
> VisualAge for
> genarate the JSP
> 
> I have the first Tomcat in c:\tomcat and the second in c:\tomcatProd
> 
> In startup.bat i have add the environement var setting for CLASSPATH
> -- (cut and paste from dos screen) --
> SET CLASSPATH=c:\tomcat\Webapps\VagenWebModule\WEB-
> INF\lib;c:\tomcat\Webapps\VagenWebModule\WEB-
> INF\classes\my\pkg;C:\IBMVAGEN\VGWGS45\;C:\IBMVAGEN\VGWGS45\hp
> tGateway.jar;C
> :\IBMVAGEN\VGWGS45\vgjwgs.jar;C:\IBMVAGEN\VGCSO45\;C:\IBMVAGEN
> \VGCSO45\hpt.j
> ar
> SET COBPATH=c:\tomcat\Webapps\VagenWebModule\WEB-INF\dll_eti;
> SET LIBPATH=c:\tomcat\Webapps\VagenWebModule\WEB-INF\dll_eti;
> SET
> Path=%PATH%;C:\IBMVAGEN\VGWGS45\;C:\IBMVAGEN\VGWGS45\MSVC;C:\I
> BMVAGEN\VGCSO4
> 5\;C:\IBMVAGEN\VGCSO45\MSVC;C:\IBMVAGEN\VGCSO45\exe;c:\jdk\bin
> ;c:\tomcat\Web
> apps\VagenWebModule\WEB-
> INF\dll_eti;c:\ibmvagen\dll_pli;c:\ibmvagen\dll_cobol
> --
> And the startup of tomcat give
> [INFO] Registry - -Loading registry information
> [INFO] Registry - -Creating new Registry instance
> [INFO] Registry - -Creating MBeanServer
> [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.12
> server.properties not found, using command line or default properties
> Opening database: C:\Tomcat\webapps\cocoon\WEB-INF\db\cocoondb
> HSQLDB server 1.7.1 is running
> Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly
> Wed Jan 29 09:46:04 CET 2003 Listening for connections ...
> --> GatewaySessionData.readObject
> GatewaySessionData.readObject - initialize transients
> CSOServerCommunications(GatewaySessionData)
> VGJ0612I - Une session passerelle est connectTe au 
> SessionIDManager pour
> l'utili
> sateur g145193.
> <-- GatewaySessionData.readObject
> [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
> [INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8009
> [INFO] JkMain - -Jk running ID=0 time=32/140
> config=C:\Tomcat\bin\..\conf\jk2.p
> roperties
> 
> For the tomcatProd, i have replace port 8080 with 80 in server.xml
> In startup.bat i have add the environement var setting for CLASSPATH
> -- (cut and paste from dos screen) --
> SET CLASSPATH=c:\tomcatProd\Webapps\VagenWebModule\WEB-
> INF\lib;c:\tomcatProd\Webapps\VagenWebModule\WEB-
> INF\classes\my\pkg;C:\IBMVAGEN\VGWGS45\;C:\IBMVAGEN\VGWGS45\hp
> tGateway.jar;C
> :\IBMVAGEN\VGWGS45\vgjwgs.jar;C:\IBMVAGEN\VGCSO45\;C:\IBMVAGEN
> \VGCSO45\hpt.j
> ar
> SET
> LIB=C:\IBMVAGEN\VGWGS45\LIB;C:\IBMVAGEN\VGWGS45\MSVC\LIB;C:\IB
> MVAGEN\VGCSO45
> \LIB;C:\IBMVAGEN\VGCSO45\MSVC\LIB;
> SET COBPATH=c:\tomcatProd\Webapps\VagenWebModule\WEB-INF\dll_eti;
> SET LIBPATH=c:\tomcatProd\Webapps\VagenWebModule\WEB-INF\dll_eti;
> SET
> Path=%PATH%;C:\IBMVAGEN\VGWGS45\;C:\IBMVAGEN\VGWGS45\MSVC;C:\I
> BMVAGEN\VGCSO4
> 5\;C:\IBMVAGEN\VGCSO45\MSVC;C:\IBMVAGEN\VGCSO45\exe;c:\jdk\bin
> ;c:\tomcatProd
> \Webapps\VagenWebModule\WEB-
> INF\dll_eti;c:\ibmvagen\dll_pli;c:\ibmvagen\dll_cobol
> --
> And the startup of tomcat give
> [INFO] Registry - -Loading registry information
> [INFO] Registry - -Creating new Registry instance
> [INFO] Registry - -Creating MBeanServer
> [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 80
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.12
> server.properties not found, using command line or default properties
> Opening database: C:\TomcatProd\webapps\cocoon\WEB-INF\db\cocoondb
> HSQLDB server 1.7.1 is running
> Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly
> Server.run/init: java.net.BindException: Address in use: JVM_Bind
> java.net.BindException: Address in use: JVM_Bind
> at java.net.PlainSocketImpl.socketBind(Native Method)
> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:452)
> at java.net.ServerSocket.(ServerSocket.java:170)
> at java.net.ServerSocket.(ServerSocket.java:82)
> at org.hsqldb.Server.run(Unknown Source)
> at org.hsqldb.Server.main(Unknown Source)
> at
> org.apache.cocoon.components.hsqldb.ServerImpl.run(ServerImpl.java:19
> 4)
> at java.lang.Thread.run(Thread.java:484)
> [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 80
> [INFO] ChannelSocket - -Port busy 8009 
> java.net.BindException: Address in
> use: J
> VM_Bind
> [INFO] ChannelSocket - -JK2: ajp13 

AW: simple question

2003-01-28 Thread Jan Harms
Jordi,
the processing time is written to 

WEB-INF/logs/core.log

Of course it depends on your logging configuration, but with the default it should be 
there. Otherwise have a look at you logkit.xconf file.

The log entries in our core.log typically look like this:

INFO(2003-01-28) 17:53.13:459   [access] (/medizinische-berufe/view/JobIndex.htm) 
HttpProcessor[8080][3]/CocoonServlet: 'view/JobIndex.htm' Processed by Apache Cocoon 
2.0.4 in 79 milliseconds.


-Jan


Dipl. Inf. Jan Harms
Software Developer

VIVAI Software AG
Königswall 1
44137 Dortmund
Germany

phone   +49-231-914488-50
email   jan.harms_at_vivai.de
url http://www.vivai.de
 

> -Ursprüngliche Nachricht-
> Von: Jordi Valldaura [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 28. Januar 2003 21:31
> An: [EMAIL PROTECTED]
> Betreff: Re: simple question
> 
> 
> Thank you very much, but I  don't want the acces times I want the time
> cocoon takes to generate a page. I am comparing cocoon and 
> the jstl from
> jakarta that what I need the time it takes to generate a 
> page. If someone
> can point me to some comparative I would apreciate it.
> 
> Thanks in advande
> 
> -Jordi
> - Original Message -
> From: "SAXESS - Hussayn Dabbous" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 28, 2003 9:08 PM
> Subject: Re: simple question
> 
> 
> > you can find the access times in the logfile
> >
> > WEB-INF/logs/access.log
> >
> > hussayn
> >
> > Jordi Valldaura wrote:
> > > I used cocoon 1.8.* in the past, now I'm using 2.0.4. In 
> the first one
> each
> > > generated page had a line with the time cocoon taked to 
> generate it. I
> dont
> > > see this line in cocoon 2 generated pages is there any 
> easy way to know
> how
> > > much time takes cocoon to generate a page???
> > >
> > >
> > > 
> -
> > > 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]>
> > >
> >
> > --
> > Dr. Hussayn Dabbous
> > SAXESS Software Design GmbH
> > Neuenhöfer Allee 125
> > 50935 Köln
> > Telefon: +49-221-56011-0
> > Fax: +49-221-56011-20
> > 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]>