urgent encoding problem...

2001-12-10 Thread Arun.N



Hi all,
    I have 
some problems with the xsp pages and encoding. When i try to display Shift_JIS 
encoded characters it is not displaying properly.
when i hard code the japnese 
characters it is working properly. for example in this xsp page
 




  
language="java"  encoding="Shift_JIS"  xmlns:xsp="http://www.apache.org/1999/XSP/Core"  
xmlns:request="http://www.apache.org/1999/XSP/Request"  
xmlns:util="http://www.apache.org/1999/XSP/Util" 
 >
   melpo View 
Mail
  
        
‚ ‚È‚½‚ÌPC‚Ì’†‚̃[ƒ‹ƒNƒ‰ƒCƒAƒ“ƒg‚ªÄŠJ‚³‚ê‚Ü‚µ‚½B 

    


 
the display html is working fine and 
the characters are working properly .. but the source of the html shows 


    

    あなたのPCの中のメールクライアントが再開されました。 

    



 
but why is the characters converted 
into numbers. the problem i have here is this consumes more bytes .. so if the 
device has some size limitations of the source of the page then it is a 
problem. if the characters are left same way then it would consume less bytes 
for the source page.
 
 
The second problem is, when i 
dynamically include xml in my xsp it is not working. But the same 
string when hardcode in the xsp page it is working fine.





  
language="java"  encoding="Shift_JIS"  xmlns:xsp="http://www.apache.org/1999/XSP/Core"  
xmlns:request="http://www.apache.org/1999/XSP/Request"  
xmlns:util="http://www.apache.org/1999/XSP/Util" 
 >
   melpo View 
Mail
  
        

 String 
xml = (String) request.getAttribute(xml);
        
   
    
xml  
// this will append an xml string like 
‚ ‚È‚½‚ÌPC‚Ì’†‚̃[J‚³‚ê‚Ü‚µ‚½B 
  
            

        
    


 
i am getting an error 
 
org.xml.sax.SAXException: An invalid XML character (Unicode: 0x13) was 
found in the element content of the document. [FATAL ERROR] [File: "null" Line: 
1 Column: 109] (nested exception: org.xml.sax.SAXParseException: An invalid XML 
character (Unicode: 0x13) was found in the element content of the 
document.)
But the string i am getting if hardcoded 
itzworking fine. because whrn i hardcode it, the xsp page when getting compiled, 
it is converting all the characters to those numbers. and whenever the string is 
dynamically included the it is not 
working..
 
and the third problem is ,
    when i load a 
string to a dom andthen get back the string the encoding information is gone.The 
characers displayed are ???
        
String fullXml = "Mail Client in your PC 
has been ƒƒOƒAƒEƒg Restarted ƒGƒLƒTƒCƒg : –|–󁄗˜—p‹K–ñ xxx 
";
 
  DOMParser parser = new 
DOMParser();  InputStream is = new 
ByteArrayInputStream(fullXml.getBytes());  InputSource 
isource=new 
InputSource(is);  parser.parse(isource);  Document 
xmlDoc= parser.getDocument();   //created 
an dom
  doing some 
manipulation --
  
OutputFormat    format  = new OutputFormat( xmlDoc 
);   //Serialize DOM
  
StringWriter  stringOut = new 
StringWriter();   
//Writer will be a String  
XMLSerializer    serial = new XMLSerializer( stringOut, format 
);  
serial.asDOMSerializer();   
// As a DOM Serializer  serial.serialize( 
xmlDoc.getDocumentElement() );  String 
returnXML = stringOut.toString();  // got back the xml as 
String.
 
now if i display the string " 
returnXML " all the japanese characters are gone. the output is only 
"???"
 
Can any of you please give a solution 
for these problems, as it is very urgent for me. I have been trying to solve 
theses isuues from past 2 days and have searched mail archives i was not able to 
find a solution.
 
Thankx in Advance
 
regards,
Arun.N,


no such method error!

2001-12-10 Thread Phillip Gibb

Hi,

I have just installed Cocoon and I get this message when I try to 
view a xml page with a stylesheet

The sitemap handler's sitemap is not available. Please check logs for 
the exact error

the error in cocoon.log is : java.lang.NoSuchMethodError

xml :



Hello, world!

stylesheet :

 
http://www.w3.org/1999/XSL/Transform>" 
version="1.0">


 




I get the same error for other xml & xsl pages

any suggestions will be greatly appreciated

tks

Phill






**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


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

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




JspGenerator and Encoding

2001-12-10 Thread Peter Schwenke


I omitted a detail...I'm on Cocoon 2.0rc2.

Thanks
...Peter

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

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




Cocoon 2.0 Tested and Ready

2001-12-10 Thread Brian Beaulieu

Hi,

Can the hosting web page be updated to reflect that Capital Internet has
tested Cocoon 2.0 and it is available to customers.  Pre-2.0 support
will still be available.

Thanks,

Brian
-- 
Capital Internet, LLC
High Availability Web Hosting and Internet Access
http://www.capital-internet.net
414-291-3500

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




JspGenerator and Encoding

2001-12-10 Thread Peter Schwenke


If I save the following in a file as iso-8859-1





T-t testing 1-2-3!
Günther
check 1-2



and run it through xerces using a sample test program where the guts
contains 


 SAXParserFactory factory = SAXParserFactory.newInstance();
 SAXParser parser = factory.newSAXParser();
 DefaultHandler handler = new DefaultHandler()/* custom handler class */;
 parser.parse(xmlFile, handler);

I don't have any problems.  If I remove the encoding I get 

An invalid XML character (Unicode: 0xfc) was found in the element content of the 
document.
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfc) was found in 
the element content of the document.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1016)
at 
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:643)
at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1355)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:908)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:374)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:264)
at DoParse.main(DoParse.java:18)

as expected


I have the following entry in my sitemap

   




  
  

   

where

   
true
iso-8859-1
   

I tried with and without this.

In the stylesheet I do



JSP pages work fine with this until the data has a character with an
umlaut or something.  The error is

Original exception : org.xml.sax.SAXParseException: An invalid XML character (Unicode: 
0xfc) was found in the element content of the document.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)
at 
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:588)
at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1304)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at org.apache.cocoon.components.parser.JaxpParser.parse(JaxpParser.java:100)
at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:80)
at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:210)
at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:359)
at 
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN4003E0(sitemap_xmap.java:5325)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2779)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2420)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:592)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


Very similar to that generated by removing the encoding in the xerces
example.  It is as if the encoding in the xml statement is not getting
through.  I have tried many different things like the encoding tag I
saw in one message, putting in the appropriate META tag etc etc

Does anyone have any ideas on how I can resolve this?

I have searched and searched through the archives and can't resolve
this issue.


Thanks
...Peter

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

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




Re: How best to incorporate xml from a string into XSP

2001-12-10 Thread David Rosenstrauch

Someone else had this same problem recently.

Use .  It will parse the text that you pass in to it, and generate 
SAX calls from it (as opposed to writing the text straight to the output - after 
escaping all the control chars - like it's doing now).

1) Include the namespace xmlns:util="http://apache.org/xsp/util/2.0"; in your XSP or 
the  won't get called properly.

2) the call you need to make this work:
myString

myString takes the value of String  myString, which is then 
passed in to .


DR


At 11:01 PM 12/10/01 +, you wrote:
>Could someone help
>
>I have a method on an object that produces XML as a string.
>I wish to incorporate it into an XSP page.
>
>myString 
>doesn't work, since it kindly changes < into < etc.
>
>I have tried various approaches, each with various unwanted side effects.
>
>Could someone tell me what is the BEST way to achieve this?
>
>i.e.
>
>Parse it? 
>DOM vs SAX? 
>use this.contentHandler?
>use myStringAsANode?
>
>some other Cocoon technique/ generator/transformer etc
>
>Christopher
>
>
>
>-
>Please check that your question has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail: <[EMAIL PROTECTED]> 


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

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




[URGENT-HELP NEEDED] Stupidity stifles deployment attempt

2001-12-10 Thread Phil Blake

Hi all,

Another attempt to deploy has failed and I have to chalk it up to 
stupidity - although I've seen (perhaps 20) different methods and 
configurations to get cocoon+tomcat+apache working together, I have 
proved too stupid to make ANY of them work.

I REALLY need someone who has successfully deployed a cocoon webapp to 
give me a hand getting the last step (mod_jk) configuration working. 
I've tried (perhaps 10) of the different configurations I've found and 
although I don't get any errors from apache, I have not once got a 
single connection from apache to tomcat.

The end result needs to be:

http://www.place.com/

returns what I now get with:

http://www.place.com:8080/cocoon/mount/testsite

PLEASE, PLEASE, PLEASE - If there is someone who has SUCCESSFULLY 
achieved this, would you please spare me some time so I can solve 
whatever stupid misunderstanding I have about mod_jk.

Again, I've read many, many pages that make an attempt to tell me how to 
do this - please don't send me any more - I need real help.

If you've heard that someone did this by reading something on a url that 
you've never been to, please do not respond. I've had many responses 
from people (thanks for them all the same) who have never deployed 
anything, but had heaps of good advice that doesn't work. I can't afford 
any more of this kind of advice. :)

I have 1 day to get this site on-line and it was yesterday - I really 
need some help please.

Thanks in advance,

Phil


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




Using document() in a stylesheet

2001-12-10 Thread Lock, Fred

Hi,

I want to do this in a stylesheet:

http://some-server/some-doc.xml')"/>

The first time the stylesheet is run, the URL in the document() function is
accessed. After that, it appears to be cached, and any changes to
"some-doc.xml" are not reflected in the output of the document function.

Is there any way to turn off this caching so that everytime the stylesheet
is run, the URL is accessed, and changes to "some-doc.xml" are seen?

Thanks,
Fred

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

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




Re: XSLT transformations with Cocoon

2001-12-10 Thread Mauricio Souza Lima

sitemap is the configuration file located in:
$TOMCAT_HOME/webapps/cocoon/sitemap.xmap

It defines the pipelines and the components of it.

Have you try to rigth-click the xml that IE shows and click in
view-source to see the xml file the cocoon returns?


Regards...

-- 
Mauricio Souza Lima
Rational Consulting
[EMAIL PROTECTED]
Rua Helena, 140 / cj. 82
São Paulo - SP - Brazil
Fone / Direct: +55 11 3842-7138


Matthias Fischer wrote:
> 
> Jörn,
> 
> what do mean by "sitemap"? (Please tell me the German term, maybe I'll
> understand it better...)
> 
> Matthias
> 
> -Original Message-
> From: Jörn Heid [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 10, 2001 5:08 PM
> To: [EMAIL PROTECTED]
> Subject: AW: XSLT transformations with Cocoon (added clearer
> formulation)
> 
> The browser shows the xml file becuase of its content type text/xml.
> If you change that (you can do so in the sitemap) to application/x-whatever
> your browser should ask you to save or view it. But that's not Cocoon
> specific.
> 
> [...]
> 
> JOERN
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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




How best to incorporate xml from a string into XSP

2001-12-10 Thread Christopher Watson

Could someone help

I have a method on an object that produces XML as a string.
I wish to incorporate it into an XSP page.

myString 
doesn't work, since it kindly changes < into < etc.

I have tried various approaches, each with various unwanted side effects.

Could someone tell me what is the BEST way to achieve this?

i.e.

Parse it? 
DOM vs SAX? 
use this.contentHandler?
use myStringAsANode?

some other Cocoon technique/ generator/transformer etc

Christopher



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

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




Cocoon Installation

2001-12-10 Thread Darren P Martin

Hi, I hope there's a little bit of help out here - I am just starting this
really but I seem to be getting just a little stuck.

System: Windows 2000, build 2195, Service Pack 1; 392 meg of RAM.

Previously had installed JDK 1.2.2 to C:\jdk1.2.2.
Downloaded Tomcat 3.2.1 and installed to C:\jakarta-tomcat-3.2.1.
Downloaded Cocoon 2.0 and installed to C:\cocoon-2.0.

JAVA_HOME environment variable set to: C:\jdk1.2.2.
TOMCAT_HOME environment variable set to: C:\jakarta-tomcat-3.2.1.
Started the Tomcat server from C:\jakarta-tomcat-3.2.1 with
bin\startup.bat.
Tested with http://127.0.0.1:8080/, successfully get the Tomcat index page
and can run the JSP and Servlet tests.
Stopped the Tomcat server from C:\jakarta-tomcat-3.2.1 with
bin\shutdown.bat.

Went to C:\cocoon-2.0, did: .\build.bat -Dinclude.webapp.libs=yes
-Dinstall.war=%TOMCAT_HOME%\webapps install.
Got warnings about optional packages: PHP and JNDI but overall received:
BUILD SUCCESSFUL.
Replaced C:\jarkata-tomcat-3.2.1\lib\jaxp.jar and parser.jar with
xerces,jar renamed parser.jar.
Restarted Tomcat; the C:\jarkarta-tomcat-3.2.1\webapps\cocoon tree was
created.
Entered the URL: http://127.0.0.1:8080/cocoon/ and got the following
Windows error:

java.exe - Application Error: The instruction at "0x504aceed" referenced
memory at "0x". The memory could not be "read".

This is the same as what happens if I don't put in the Xerces parser.
This is also the same as what happens when I used Tomcat 3.3.
The next time that I run bin\startup.bat I get:

Server.run/init: java.sql.SQLException: File input/output error: C:
\jakarta-tomcat-3.2.1\webapps\cocoon\WEB-INF\db\cocoondb.backup
java.sql.SQLException: File input/output error: C:
\jakarta-tomcat-3.2.1\webapps\cocoon\WEB-INF\db\cocoondb.backup
at org.hsqldb.Trace.getError(Trace.java:180)
at org.hsqldb.Trace.getError(Trace.java:144)
at org.hsqldb.Trace.error(Trace.java:205)
at org.hsqldb.Log.restoreBackup(Log.java, Compiled Code)
at org.hsqldb.Log.open(Log.java:212)
at org.hsqldb.Database.(Database.java:96)
at org.hsqldb.Server.run(Server.java, Compiled Code)
at
org.apache.cocoon.components.hsqldb.ServerImpl.run(ServerImpl.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)

And I noticed that the cocoondb.data file in
jarkarta-tomcat\webapps\cocoon\WEB-INF\db directory is now 0 bytes -
whereas after the first termination and before this run it was 22 bytes.
But I don't think this is an issue as I just set it to non-modified next
time around. Any ideas as to what I am, quite obviously, missing here?

I've now also tried Cocoon2 with Tomcat 3.2.1, Tomcat 3.3 and Tomcat 4 -
doing all the shenanigans required for 3 with the parsers. And now I've
just downloaded the bin version of Cocoon to try that WAR file with Tomcat.
Still getting the same old error: "java.exe - Application Error: The
instruction at "0x504aceed" referenced memory at "0x". The memory
could not be "read"." when I go to URL: http://127.0.0.1:8080/cocoon/ and
this is bugging me now what have I missed, what is going on?

Cheers, DpM


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

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




Re: Can I access to the requets parameters from tag-lib?

2001-12-10 Thread Mauricio Souza Lima

Hi Sergio,

  I had the same problem, XSP forces us to take a different look at
common tasks of a server page. Using taglibs is'nt so trivial and
powerful as i had thinked.

  In this case, why don't you try to solve the problem by taking the
arguments of the request direct in your taglib? If these parameters
always comes from the request, get them in your tag-lib.

  See the actions, they work with the parameters in real-time.

Hope to help ;)


-- 
Mauricio Souza Lima
Rational Consulting
[EMAIL PROTECTED]
Rua Helena, 140 / cj. 82
São Paulo - SP - Brazil
Fone / Direct: +55 11 3842-7138



Sergio Navarro wrote:
> 
> Can I access to the requets parameters from  a tag-lib?
> 
> I've created a tag-lib: "pccom-util" and inside I need an xsl-variable with
> request parameter, to know what xsp code to generate.
> 
> I've tried to declare xslt transformer with this line:
> true
> 
> but it isn't taken effect with the tag-libs. It seems to be because file
> generator isn't use this specification for the xslt-transformer that it
> employs to apply the tag-lib.
> 
> Another solution tha I've tried is:
> 
>xmlns:xsp="http://apache.org/xsp";
>   xmlns:pccom-util="http://www.pccom.es/pccom-util";
>   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
>   language="java">
> 
> 
> 
>
> 
>
> 
>
>
> 
> 
> But it fails because I would need to execute 2 times the xsp code.
> One to put the request parameter into the attribute of my tag. And another
> to execute my tag with these parameters.
> 
> Any idea???
> 
> THANKS and please be patient with my english
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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




Re: Stylesheet directed termination??

2001-12-10 Thread Mauricio Souza Lima

Hello Michael, try this xsp:


http://apache.org/xsp";>

"TESTING".toLowerCase()



Send a reply if it works...

The stylesheet processed there, is the stylesheet of the xsp that
transform tags such xsp:logic into java code. The error is there. Try to
look at the cocoon.log too, there may be some more good info to you.


See ya...


-- 
Mauricio Souza Lima
Rational Consulting
[EMAIL PROTECTED]
Rua Helena, 140 / cj. 82
São Paulo - SP - Brazil
Fone / Direct: +55 11 3842-7138


Michael Engelhart wrote:
> 
> hi,
> 
> I'm getting java.lang.RuntimeException's in my root.log on Cocoon 2 when
> trying to run a basic XSP Here's my simple pipeline:
> 
> 
> 
> 
> src="sites/xsp/{1}.xsp" />
> 
> 
> 
> 
> 
> Here's test.xsp:
> 
> 
> http://apache.org/xsp";>
> 
> 
> 
> "TESTING".toLowerCase()
> 
> 
> 
> 
> 
> When I access something with the URL /sites/test.xml, I get this in
> my root.log
> 
> WARN(2001-12-07) 11:16.16:168   [root]
> (/earthtrip/sites/tradeonemktg.com/test.xml)
> HttpProcessor[8080][4]/CocoonServlet: The resource was not found
> org.apache.cocoon.ResourceNotFoundException: Stylesheet directed
> termination: java.lang.RuntimeException: Stylesheet directed termination
>  at
> org.apache.cocoon.generation.ServerPagesGenerator.setup
> (ServerPagesGenerator.java:175)
> 
> java.lang.RuntimeException: Stylesheet directed termination
>  at
> org.apache.xerces.framework.XMLParser.parse(XMLParser.java:)
>  at
> org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
>  at
> org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
>  at
> org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generateCode(
> LogicsheetCodeGenerator.java:130)
>   
> 
> This only occurs with XSP pages.  When I have xml->xsl->html, it works
> fine...
> 
> Any help?
> 
> Thanks
> 
> Mike
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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




RE: Reading a JSP file

2001-12-10 Thread Matt Ho

Rockin!  I'll give this a try.

--
Matt Ho
Principal
Indigo Egg, Inc.
Providing VoiceXML Professional Services



> -Original Message-
> From: Piroumian, Konstantin [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 10, 2001 12:51 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Reading a JSP file
> 
> 
> Hi!
> 
> JSPReader were added only to the C2.1-dev branch, cause it 
> seemed to me that nobobdy is interested in it and I didn't 
> post a patch for C2.0. The attached is the src of JSPReader 
> that I used with Cocoon 2.0 (a few weeks old version), hope 
> it will work with the release too.
> 
> P.S. If anybody else is interested in JSPReader I'll improve 
> it and send a patch to C2.0 with samples and docs.
> 
> Regards,
> Konstantin Piroumian
> 
> - Original Message -
> From: "Matt Ho" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "Rachel McConnell" <[EMAIL PROTECTED]>
> Sent: Monday, December 10, 2001 12:12 AM
> Subject: Reading a JSP file
> 
> 
> > Ugh.  I've read through all the documentation I can find, 
> but I can't 
> > figure out how to get my submap to serve up JSP pages 
> natively (i.e. 
> > they don't output XML).
> >
> > I have the following configuration:
> >
> > * Redhat 7.2
> > * Tomcat 4.0.1
> > * Sun JDK 1.3.1
> >
> > When I place JSP files in the webapps/cocoon directory, 
> they work just 
> > fine.  When I create a submap
> >
> >   
> >
> >  > check-reload="yes"/>
> >
> >   
> >
> > The submap works and does every other mapping that it 
> should, but it 
> > will not display a plain JSP page.  The error that I get 
> back is 'The 
> > request resource is not available'.  The log files are not 
> providing 
> > me a clue either.
> >
> > I've tried a workaround without success.  I downloaded the 
> top of tree 
> > version which I noted had JSPReader.  I then JSPReader with the 
> > cocoon2 binary release and tried configuring it by hand via:
> >
> > src="org.apache.cocoon.reading.JSPReader"/>
> >
> > No joy.
> >
> > Any help would be appreciated.
> >
> > Thanks!
> >
> > --
> > Matt Ho
> > Principal
> > Indigo Egg, Inc.
> > Providing VoiceXML Professional Services
> >
> >
> >
> > 
> -
> > Please check that your question has not already been 
> answered in the 
> > FAQ before posting. 
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
> 
> 


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

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




Re: Java code being dumped to browser. (newbie question)

2001-12-10 Thread Matthew Crocker

Jeremy Crosbie wrote:

>My guess is you need to specify you are using the LDAP transformer like so
> . This requires that
>you have defined this transformer in the first place, which is not done in
>the default sitemap in the distribution. Add:
>
>src="org.apache.cocoon.transformation.LDAPTransformer" />
>
>to the  element in the sitemap.
>

I already put in the map:transformer entry and when I add 'type="ldap"' 
to my transformer line in the pipe line I get :

ldap://localhost uid=matthew dc=crocker,dc=com base true 0 * 0 false 
error objectClass

as output to the browser.  This looks like the ldap transformer is 
parsing the eldapbasicsample.xml file and dumping it the screen without 
actually doing any LDAP look.   I have slapd running in another window 
and I do not see any connection attempts made to the ldap server.

The above output happens when I have the following pipeline

  





  

And I have the following in my transformer map

   





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

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




RE: Java code being dumped to browser. (newbie question)

2001-12-10 Thread Jeremy Crosbie

My guess is you need to specify you are using the LDAP transformer like so
 . This requires that
you have defined this transformer in the first place, which is not done in
the default sitemap in the distribution. Add:



to the  element in the sitemap.

> -Original Message-
> From: Matthew Crocker [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 10, 2001 10:27 AM
> To: [EMAIL PROTECTED]
> Subject: Java code being dumped to browser. (newbie question)
> 
> 
> Hello all,
> 
>   I'm setting up cocoon2 with tomcat, both are latest versions from the
> website. The examples from tomcat and cocoon2 work fine.  I'm also
> trying to setup ELDAP and I'm having some trouble.   I created a
> pipeline in sitemap.xmap and when I bring up the URL in the browser I
> see that the eldapbasiccample.xml is being transformed by the eldap.xsl
> logicsheet but then the resulting java code is dumped to the browser.  I
> need to know how to get cocooon2 to execute the code and the process the
> resulting XML -> HTML for display on the browser.
> 
> Here is my pipeline info,  I'm sure it is something I'm missing but I
> just can't figure it out with the docs in the distrbution.
> 
>   
> 
> 
> 
> 
> 
>   
> 
> 
> I'm assuming I just need another transform entry to process the java but
> I don't know which one to put it.
> 
> Thanks for any help
> 
> -Matt
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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




Java code being dumped to browser. (newbie question)

2001-12-10 Thread Matthew Crocker


Hello all,
 
  I'm setting up cocoon2 with tomcat, both are latest versions from the 
website. The examples from tomcat and cocoon2 work fine.  I'm also 
trying to setup ELDAP and I'm having some trouble.   I created a 
pipeline in sitemap.xmap and when I bring up the URL in the browser I 
see that the eldapbasiccample.xml is being transformed by the eldap.xsl 
logicsheet but then the resulting java code is dumped to the browser.  I 
need to know how to get cocooon2 to execute the code and the process the 
resulting XML -> HTML for display on the browser.

Here is my pipeline info,  I'm sure it is something I'm missing but I 
just can't figure it out with the docs in the distrbution.

  





  


I'm assuming I just need another transform entry to process the java but 
I don't know which one to put it.

Thanks for any help

-Matt


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

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




RE: AW: XSLT transformations with Cocoon

2001-12-10 Thread David Rosenstrauch

At 05:51 PM 12/10/01 +0100, you wrote:
>Are you sure IE doesn't put its hands on text files? We'll try it out
>tomorrow, I'll tell you the outcome.


Actually, no I'm not sure.  It was just an "off-the-top-of-my-head" suggestion.

The download suggestion, however does work.  I'm using it in my own site.

Glad to help.  I'm interested to hear how it goes (and learn something new).


DR



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

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




RE: AW: XSLT transformations with Cocoon

2001-12-10 Thread Matthias Fischer

Are you sure IE doesn't put its hands on text files? We'll try it out
tomorrow, I'll tell you the outcome.

For today (CET), thanx a lot for your quick and detailled answers.

Matthias


-Original Message-
From: David Rosenstrauch [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 5:26 PM
To: [EMAIL PROTECTED]
Subject: Re: AW: XSLT transformations with Cocoon (added clearer
formulation)


[...]


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

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




RE: XSLT transformations with Cocoon

2001-12-10 Thread Matthias Fischer

Jörn,

what do mean by "sitemap"? (Please tell me the German term, maybe I'll
understand it better...)

Matthias


-Original Message-
From: Jörn Heid [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 5:08 PM
To: [EMAIL PROTECTED]
Subject: AW: XSLT transformations with Cocoon (added clearer
formulation)


The browser shows the xml file becuase of its content type text/xml.
If you change that (you can do so in the sitemap) to application/x-whatever
your browser should ask you to save or view it. But that's not Cocoon
specific.

[...]

JOERN


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

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




Re: AW: XSLT transformations with Cocoon (added clearer formulation)

2001-12-10 Thread David Rosenstrauch

What Joern said is correct.  I'll elaborate some more, though.

Since you've set , you're sending XML to the browser (mime 
type: text/xml).

Most browsers don't know how to natively display XML, so it looks wacky.

IE, however, does know how to do it, so it does - as you've seen.  However it 
re-formats it (doesn't display it as straight text; display tree expansion + and - 
symbols, etc.)

So how to accomplish what you want?  A couple of possibilities:

* "Trick" cocoon into sending XML data as text:
 * The default XML serializer looks like this:  .
 * I think that if you change the mime type you can still generate XML, but 
make your browser think it's text:  .
 * Then use this serializer instead of the standard XML serializer:  



* Generate XML as usual, but trigger a download:
 * In my Cocoon app, I have a need to trigger a file download.  You can do 
that using:  response.addHeader("Content-Disposition", "attachment; filename=" + QUOTE 
+ filename + QUOTE);
 * Then the user will be prompted to download the XML file, after which they 
can open it either using the default .xml file handler or using any other app they 
want.


Hope this helps.

DR



At 05:07 PM 12/10/01 +0100, you wrote:
>The browser shows the xml file becuase of its content type text/xml.
>If you change that (you can do so in the sitemap) to application/x-whatever
>your browser should ask you to save or view it. But that's not Cocoon
>specific.
>
>If you want to show the source code I think you have to write a xslt which
>produces < und >.
>
>Copy and Paste is not a task of a browser or Cocoon. There's no way to do
>this except the user.
>
>I can't understand your problem with FOP. What do you mean with XML2XML? FOP
>means xml->pdf (via xsl:fo). The question is if you want to have a pdf. If
>so, you can look for other approaches like xml->tex->ps->pdf (there were
>some topics about that before I think).
>
>JOERN
>
>-Ursprüngliche Nachricht-
>Von: Matthias Fischer [mailto:[EMAIL PROTECTED]]
>Gesendet: Montag, 10. Dezember 2001 16:52
>An: [EMAIL PROTECTED]
>Betreff: RE: XSLT transformations with Cocoon (added clearer
>formulation)
>
>
>That was real quick, David. Thanks.
>
>I'll clarify:
>
>1. In Tomcat [4] we have set the destination type to type="xml"/>, as you have suggested.
>The following problems have arisen:
>- Internet Explorer gets into Cocoon's way and wants to open the xml file
>when I click onto it to start the transformation. We haven't found a way to
>stop IE doing that.
>- Alternatively, we have set Tomcat to ,
>producing an html output with the option of (a) viewing the source code, (b)
>copy it to the clipboard, (c) paste it into an empty xml file using some XML
>editor, (d) saving the xml file in the xml editor. This (a)..(d) does not
>seem satisfactory at all.
>
>We need the xml output as an xml file, to further process it.
>
>Therefore, we'd prefer to
>- set the destination type to 
>- click on the xml file or any other destination file from inside the
>browser TO START THE TRANSFORMATION
>- have our xml editor open the xml file produced by the transformation or,
>alternatively, view the xml sourcecode directly in the browser or,
>alternatively, have an xml file dropped unviewed somewhere in a specified
>destination folder.
>
>Is this possible, and if it is, how?
>
>2. The other question I tried to get over before was this: When we embarked
>in FOP transformation we didn't expect so many problems linked to the
>processor. However, we got lots of problems with non-existing or even wrong
>documentation, non-working functions or functions working under some very
>specific conditions. Is the state of realization of XML2XML with Cocoon [2]
>satisfactory under this aspect? Or would anybody advise me to use rather a
>different processor?
>
>Thanks for your answer(s) in advance,
>
>Matthias
>
>
>-Original Message-
>From: David Rosenstrauch [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 10, 2001 4:00 PM
>To: [EMAIL PROTECTED]
>Subject: Re: XSLT transformations with Cocoon
>
>
>I'm not sure I understand your question, so I'll try to answer as best I
>can:
>
>* Is it possible to use cocoon to do an XSLT transformation with the output
>being XML?
>Yes.
>
>[...]
>
>DR


-
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: XSLT transformations with Cocoon (added clearer formulation)

2001-12-10 Thread Jörn Heid

The browser shows the xml file becuase of its content type text/xml.
If you change that (you can do so in the sitemap) to application/x-whatever
your browser should ask you to save or view it. But that's not Cocoon
specific.

If you want to show the source code I think you have to write a xslt which
produces < und >.

Copy and Paste is not a task of a browser or Cocoon. There's no way to do
this except the user.

I can't understand your problem with FOP. What do you mean with XML2XML? FOP
means xml->pdf (via xsl:fo). The question is if you want to have a pdf. If
so, you can look for other approaches like xml->tex->ps->pdf (there were
some topics about that before I think).

JOERN

-Ursprüngliche Nachricht-
Von: Matthias Fischer [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 10. Dezember 2001 16:52
An: [EMAIL PROTECTED]
Betreff: RE: XSLT transformations with Cocoon (added clearer
formulation)


That was real quick, David. Thanks.

I'll clarify:

1. In Tomcat [4] we have set the destination type to , as you have suggested.
The following problems have arisen:
- Internet Explorer gets into Cocoon's way and wants to open the xml file
when I click onto it to start the transformation. We haven't found a way to
stop IE doing that.
- Alternatively, we have set Tomcat to ,
producing an html output with the option of (a) viewing the source code, (b)
copy it to the clipboard, (c) paste it into an empty xml file using some XML
editor, (d) saving the xml file in the xml editor. This (a)..(d) does not
seem satisfactory at all.

We need the xml output as an xml file, to further process it.

Therefore, we'd prefer to
- set the destination type to 
- click on the xml file or any other destination file from inside the
browser TO START THE TRANSFORMATION
- have our xml editor open the xml file produced by the transformation or,
alternatively, view the xml sourcecode directly in the browser or,
alternatively, have an xml file dropped unviewed somewhere in a specified
destination folder.

Is this possible, and if it is, how?

2. The other question I tried to get over before was this: When we embarked
in FOP transformation we didn't expect so many problems linked to the
processor. However, we got lots of problems with non-existing or even wrong
documentation, non-working functions or functions working under some very
specific conditions. Is the state of realization of XML2XML with Cocoon [2]
satisfactory under this aspect? Or would anybody advise me to use rather a
different processor?

Thanks for your answer(s) in advance,

Matthias


-Original Message-
From: David Rosenstrauch [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: Re: XSLT transformations with Cocoon


I'm not sure I understand your question, so I'll try to answer as best I
can:

* Is it possible to use cocoon to do an XSLT transformation with the output
being XML?
Yes.

[...]

DR


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

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


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

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


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

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




RE: XSLT transformations with Cocoon (added clearer formulation)

2001-12-10 Thread Matthias Fischer

That was real quick, David. Thanks.

I'll clarify:

1. In Tomcat [4] we have set the destination type to , as you have suggested.
The following problems have arisen:
- Internet Explorer gets into Cocoon's way and wants to open the xml file
when I click onto it to start the transformation. We haven't found a way to
stop IE doing that.
- Alternatively, we have set Tomcat to ,
producing an html output with the option of (a) viewing the source code, (b)
copy it to the clipboard, (c) paste it into an empty xml file using some XML
editor, (d) saving the xml file in the xml editor. This (a)..(d) does not
seem satisfactory at all.

We need the xml output as an xml file, to further process it.

Therefore, we'd prefer to
- set the destination type to 
- click on the xml file or any other destination file from inside the
browser TO START THE TRANSFORMATION
- have our xml editor open the xml file produced by the transformation or,
alternatively, view the xml sourcecode directly in the browser or,
alternatively, have an xml file dropped unviewed somewhere in a specified
destination folder.

Is this possible, and if it is, how?

2. The other question I tried to get over before was this: When we embarked
in FOP transformation we didn't expect so many problems linked to the
processor. However, we got lots of problems with non-existing or even wrong
documentation, non-working functions or functions working under some very
specific conditions. Is the state of realization of XML2XML with Cocoon [2]
satisfactory under this aspect? Or would anybody advise me to use rather a
different processor?

Thanks for your answer(s) in advance,

Matthias


-Original Message-
From: David Rosenstrauch [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: Re: XSLT transformations with Cocoon


I'm not sure I understand your question, so I'll try to answer as best I
can:

* Is it possible to use cocoon to do an XSLT transformation with the output
being XML?
Yes.

[...]

DR


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

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


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

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




RE: XSLT transformations with Cocoon

2001-12-10 Thread Matthias Fischer

That was real quick, David. Thanks.

I'll clarify:

1. In Tomcat [4] we have set the destination type to , as you have suggested.
The following problems have arisen:
- Internet Explorer gets into Cocoon's way and wants to open the xml file
when I click onto it to start the transformation. We haven't found a way to
stop IE doing that.
- Alternatively, we have set Tomcat to ,
producing an html output with the option of (a) viewing the source code, (b)
copy it to the clipboard, (c) paste it into an empty xml file using some XML
editor, (d) saving the xml file in the xml editor. This (a)..(d) does not
seem satisfactory at all.

We need the xml output as an xml file, to further process it.

Therefore, we'd prefer to
- set the destination type to 
- click on the xml file or any other destination file from inside the
browser
- have our xml editor open the xml file produced by the transformation or,
alternatively, view the xml sourcecode directly in the browser or,
alternatively, have an xml file dropped unviewed somewhere in a specified
destination folder.

Is this possible, and if it is, how?

2. The other question I tried to get over before was this: When we embarked
in FOP transformation we didn't expect so many problems linked to the
processor. However, we got lots of problems with non-existing or even wrong
documentation, non-working functions or functions working under some very
specific conditions. Is the state of realization of XML2XML with Cocoon [2]
satisfactory under this aspect? Or would anybody advise me to use rather a
different processor?

Thanks for your answer(s) in advance,

Matthias


-Original Message-
From: David Rosenstrauch [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: Re: XSLT transformations with Cocoon


I'm not sure I understand your question, so I'll try to answer as best I
can:

* Is it possible to use cocoon to do an XSLT transformation with the output
being XML?
Yes.

[...]

DR


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

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




RE: Cocoon Position Available - Brisbane, Australia

2001-12-10 Thread Andrew C. Oliver

Wow I wish I could applybut I think the commute would be
unbearable.  (from NC, US)  ;-)
-- 
www.sourceforge.net/projects/poi - port of Excel format to java
http://developer.java.sun.com/developer/bugParade/bugs/4487555.html 
- fix java generics!


The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh


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




Passing POST parameters to a request.

2001-12-10 Thread lucas


I must send a parameter to an external cgi. This cgi only implements doGet()
method, and couldn't be changed.
¿How can i pass parameters to this external server using POST method?.
I have a pipeline like that:



  
  http://www.external.es/cgi-bin/TheCGI";>

  
  
  
  

and I have a a servlet which create the parameter(XML) and links to this
direction

res.sendRedirect("http://myserv:8080/myproject/exec/external?XML="; +
XML_VAR);

I know the parameter is well-formed (probed), and the cgi also works. But a
get a message from the external server warning me that i have not sended any
parameter ..
¿what can i do?

thanks in advance.


Lucas Pons Bayarri
Etra I+D
Valencia, Spain
+34 96 330 40 82


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

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




Re: performance

2001-12-10 Thread Berin Loritsch

arjen stolk wrote:

> - Original Message -
> From: "arjen stolk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 10, 2001 3:22 PM
> Subject: Re: performance
> 
> 
> 
>>, but performance is still the same.
>>
>>
>>
> 
> oke finally connected to other dbserver instead of server running on my
> local machine.
> that made a huge difference in performance...


Aha!

This is probably due to the resource contention for the CPU.  Your database
server and Cocoon are not playing nicely (and Cocoon is waiting impatiently
for the DBserver).

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
 - Benjamin Franklin


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

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




Re: XSLT transformations with Cocoon

2001-12-10 Thread David Rosenstrauch

I'm not sure I understand your question, so I'll try to answer as best I can:

* Is it possible to use cocoon to do an XSLT transformation with the output being XML?

Yes.


* Is it possible to use cocoon to do an XSLT transformation with the output being HTML?

Yes.


* Is it possible to use cocoon to do an XSLT transformation with the output being HTML 
tags, but in an XML format (i.e., in an XHTML format)?

Yes.


HTH.  If I didn't answer your question, then please write back and clarify.


DR



At 03:57 PM 12/10/01 +0100, you wrote:
>Hallo,
>
>I find myself in front of the task to process xml data through an xsl(t)
>stylesheet to a different xml.
>It is possible to do that using Cocoon [2] as if it where supposed to
>produce an html output.
>
>Before I embark in using Cocoon (instead of, for instance, SAXON) I'D like
>to ask professional Cocoon users whether you practice this way of
>transformation, whether you practice it with success and whether there are
>limitations to this kind of (ab-) use of Cocoon.
>
>Regards,
>
>Matthias
>
>
>Dott. Matthias Fischer
>abc.Mediaservice GmbH
>
>Nebelhornstraße 8
>86807 Buchloe
>Tel. (08241) 9686-38
>Fax  (08241) 9686-26
>http://www.abc-media.de
>e-mail: [EMAIL PROTECTED]
>
>ein Unternehmen der abc.Mediengruppe
>
>
>
>
>-
>Please check that your question has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail: <[EMAIL PROTECTED]> 


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

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




Re: performance

2001-12-10 Thread arjen stolk


- Original Message -
From: "arjen stolk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 10, 2001 3:22 PM
Subject: Re: performance


>
> , but performance is still the same.
>
>

oke finally connected to other dbserver instead of server running on my
local machine.
that made a huge difference in performance...

>
> The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this message
by anyone else is unauthorized. If you are not the intended recipient, any
disclosure, copying, or distribution of the message, or any action or
omission taken by you in reliance on it, is prohibited and may be unlawful.
Please immediately contact the sender if you have received this message in
error.
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


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

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




XSLT transformations with Cocoon

2001-12-10 Thread Matthias Fischer

Hallo,

I find myself in front of the task to process xml data through an xsl(t)
stylesheet to a different xml.
It is possible to do that using Cocoon [2] as if it where supposed to
produce an html output.

Before I embark in using Cocoon (instead of, for instance, SAXON) I'D like
to ask professional Cocoon users whether you practice this way of
transformation, whether you practice it with success and whether there are
limitations to this kind of (ab-) use of Cocoon.

Regards,

Matthias


Dott. Matthias Fischer
abc.Mediaservice GmbH

Nebelhornstraße 8
86807 Buchloe
Tel. (08241) 9686-38
Fax  (08241) 9686-26
http://www.abc-media.de
e-mail: [EMAIL PROTECTED]

ein Unternehmen der abc.Mediengruppe




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

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




Re: AW: SVG Resizing

2001-12-10 Thread David Rosenstrauch

At 12:44 AM 12/10/01 +0100, you wrote:
>2. Write your own action which puts the parameter to the sitemap params.


FYI - 

I just happened to discover the other day, that there's a pre-written action that will 
do this for you.






 



DR


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

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




Re: XSP page getting called TWICE! (was: Pipeline dependencies)

2001-12-10 Thread David Rosenstrauch

Anyone have any thoughts on this?

What could cause an XSP page to get called twice in the same request?

Tnx!

DR


At 12:07 PM 12/7/01 -0500, you wrote:
>Actually, regarding the setup below (which I mentioned in another message), I'm 
>having a problem with it and would appreciate some help.
>
>Take a look at the sitemap segment below.  And let me clarify it a bit too:
>
>The XSL stylesheet that I'm using in the transform on "pd/mergedoc.html" is generated 
>*dynamically*, from an xsp page ("pages/gen_merge_xsl.xsp").
>
>This is working just fine, except for one small problem:
>
>For some reason, on each request, this XSP page is getting executed TWICE!  Although 
>this doesn't technically cause any errors, it's pretty inefficient since it hits the 
>database twice, generates the xsl twice, etc.
>
>Any ideas why?
>
>Some possible thoughts I had:
>
>* perhaps the internal-only="true" is causing this?
>
>* perhaps an additional aspect of this setup is causing this:  the 
>"cocoon:/rtf_parse" generation step (not listed) is setting an "attachment" response 
>header ("Content-Disposition: attachment; filename=myfile.rtf") so that the file will 
>be downloaded instead of displayed directly in the browser.  Could that be causing 
>this?
>
>Any help appreciated!
>
>TIA!
>
>
>DR
>
>
>At 11:17 AM 12/7/01 -0500, you wrote:
> >It is possible.  I'm using that in my site:
> >
> >
> >  
> >  
> >  
> >  
> >  
> >
> >
> >
> >
> >  
> >  
> >  
> >  
> >
> >
> >
> >DR
>
>
>-
>Please check that your question has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail: <[EMAIL PROTECTED]> 


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

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




Re: performance

2001-12-10 Thread arjen stolk


- Original Message -
From: "Berin Loritsch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 5:36 PM
Subject: Re: performance



hello berin,

i have some answers to your questions and some questions 'bout your
answers...

> Also, you didn't answer my first question:
>
> Is this 45 second access only for the first time you access the page, or
_every_
> time you access the page.  Remember that the sitemap and the XSP pages
must be compiled.etc

all subsequent requests are slow.




i have taken a closer look at what is happening:


 i've found out that the initial processing of the sql query takes only
about one third of the total time (about 10 secs) . getting the data after
receiving the first couple of bytes takes another 20 secs (perceived
'download' speed is about 20Kb/s on average, both dbserver and webserver are
localhost ).

looking at the mssql profiler gives the impression that a lot is done to get
the data.
after :
declare @P1 int
declare @P5 int
declare @P6 int
set @P1=NULL
set @P5=4104
set @P6=8193
exec sp_cursorprepare @P1 output, NULL, N'

 select * from tnode
 ', 1, @P5 output, @P6 output
select @P1, @P5, @P6

and

declare @P2 int
declare @P3 int
declare @P4 int
declare @P5 int
set @P2=0
set @P3=8
set @P4=8193
set @P5=0
exec sp_cursorexecute 2, @P2 output, @P3 output, @P4 output, @P5 output
select @P2, @P3, @P4, @P5

 a _lot_ of times this is executed:
sp_cursorfetch 536363100, 16, 1, 1
it seems this sp_cursorfetch is reponsible for the duration of the
dataretrieval part.

so maybe something is wrong with the way the dbserver is queried.
is this a JDBC driver thing?


> Also, do a search for the word Exception in the contents of the files in
the log
> directory (I think you said you were on windows).  If you see any
concerning
> your database connection, that can hurt performance.
>

Nothing like 'Exception' or 'Could not create' or 'Error' was found in the
logs.


> Is your JVM set with the following params:
>
> java -Xms64M -Mmx128M?
>
> This keeps the JVM from using more than your physical memory.  Remember,
it is
> cheaper for your JVM to manage your memory than for your OS to cache to
disk.
>
you mean like setting CATALINA_OPTS to -Xms64M -Xmx128M

i upgraded memory to 392M, changed CATALINA_OPS to -Xms64M -Xmx356
and the janitor settings to




, but performance is still the same.


oke, hope to hear more








The information in this message is confidential and may be legally privileged. It is 
intended solely for the addressee. Access to this message by anyone else is 
unauthorized. If you are not the intended recipient, any disclosure, copying, or 
distribution of the message, or any action or omission taken by you in reliance on it, 
is prohibited and may be unlawful. Please immediately contact the sender if you have 
received this message in error.

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

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




Re: optimization time: cacheing

2001-12-10 Thread Torsten Curdt

> Thanks for answering, Torsten !
>
> > Take a look into the caching docs.
>
> Yes but hey ! I don't know where they are ! Didn't find them on the web
> site anyway. Looks like the 1.8 docs do mention cacheing, but is that
> up-to-date ?

Ups... sorry, assumed you were talking about 2.0

True - it was "hasChanged" in 1.8
--
Torsten


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

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




Re: optimization time: cacheing

2001-12-10 Thread Aurelien

Thanks for answering, Torsten !

> Take a look into the caching docs.

Yes but hey ! I don't know where they are ! Didn't find them on the web 
site anyway. Looks like the 1.8 docs do mention cacheing, but is that 
up-to-date ?

Candide



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

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




Re: Multiple Namespace Decls.

2001-12-10 Thread Sylvain Wallez

Luke Studley wrote :

> Hi
>
> Wonder if anyone else has seen this
>
> I'm trying to use cinclude, but the same seems to happen for all ns
> declarations - whether from xsp or read from xml - in the down
> pipeline processing there are multiple (dual) declarations of each
> namespace - my editor complains about this and my styleshets screw
> up.
>
> Sticking in  a log statement I see the following - which seems to
> correctly fire a startPrefixMapping event - but also an attribute
> event for the xmlns:ci attribute as well - is this correct? If it
> is then something downstream is responding to both events and thus
> duplicating xmlns dec.s

First of all, would you mind avoiding HTML mail on the list ? Thanks.

I guess you're using Saxon.

This is because cocoon was mainly tested with Xalan whose serializer has
a bug associated with namespace declaration (startPrefixMapping isn't
enough, Xalan also wants xmlns: attributes).

To circumvent this problem, the XML parser in Cocoon always had the
"namespace-prefixes" property set (see
org.xml.sax.ContentHandler.startElement() javadoc to see what this
means) but this isn't in fact the real good solution and hurts Saxon.

As I also faced this problem recently and I'm currently working on a
more robust solution, that handles transparently both Saxon and Xalan,
which I will commit in the CVS I hope this week.

I'll notify you when the commit is done, and it will of course be
included in the next Cocoon minor release. In the meanwhile, I suggest
you temporarily switch to Xalan.

Sylvain.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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

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




Re: optimization time: cacheing

2001-12-10 Thread Torsten Curdt

> Hi,
>
> I've almost finished a rather big project using cocoon2. Now that
> cocoon2 is final and I'm using tomcat 4, performance is already great.
> But, since the web site will probably serve a 1000+ users, it oughta be
> even faster. Actually, the site is currently manually updated, and we
> had the mission of making it database generated. So it already has a
> steady user base, and we can't affort to deceive them.
>
> I'm using J2EE in a huge logicsheet. A setup() method is used defined in
> the logicsheet that gets into every _xsp.java generated source file.
> That method looks up a façade j2ee service that provides a bulk of
> methods to get the data we need in the form of java objects.
>
> Now, I've read somewhere that a hasChanged() method existed for xsp.
> This is what I need, but I'd like to know more about this. Now could
> someone tell me where to find the docs about this method ?
>
> I've also read about the notion of "change points", i.e. the different
> factors that intervene in the evaluation of wether or not a page needs
> re-generation: parameters, browser, database update,... Somebody know
> where this is documented ?
>
> Thanks in advance,

You can define a function for fine-tuning you XSP caching




  public boolean hasContentChanged( Request request ) {
return(false);
  }




The above will cache your XSP forever - not very useful
but you'll get the point ;)

As well you might want to add a

  public long generateKey() {
  }


function to improve you caching experience.


Take a look into the caching docs.
--
Torsten


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




Handling Code 500 errors

2001-12-10 Thread Jonathan Downey



Hi,
    I'm trying to handle Page Not 
Found errors in Cocoon. My sitemap.xsl reads:
 
          
      
        
  
      
    
        
  
      
 
        
    

 
        
    

 
        
    

 
        
    

 
  
So if somebody requested view_badpage.html, the 
banner.xml is called followed by badpage.view, which maps to view/badpage.xsp, 
which doesn't exist. This throws an illegalStateException. The Stack trace 
reads:
 
java.lang.IllegalStateException: Response has already been committed
	at org.apache.tomcat.facade.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:204)
	at org.apache.tomcat.facade.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:196)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:672)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
	at org.apache.tomcat.core.Handler.service(Handler.java:286)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
	at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
	at java.lang.Thread.run(Thread.java:484)I know that its actually Tomcat that throws the exception, because the Reponse has been commited. Is there a way to prevent this happening? Jonathan Downey.



optimization time: cacheing

2001-12-10 Thread Aurelien

Hi,

I've almost finished a rather big project using cocoon2. Now that 
cocoon2 is final and I'm using tomcat 4, performance is already great. 
But, since the web site will probably serve a 1000+ users, it oughta be 
even faster. Actually, the site is currently manually updated, and we 
had the mission of making it database generated. So it already has a 
steady user base, and we can't affort to deceive them.

I'm using J2EE in a huge logicsheet. A setup() method is used defined in 
the logicsheet that gets into every _xsp.java generated source file. 
That method looks up a façade j2ee service that provides a bulk of 
methods to get the data we need in the form of java objects.

Now, I've read somewhere that a hasChanged() method existed for xsp. 
This is what I need, but I'd like to know more about this. Now could 
someone tell me where to find the docs about this method ?

I've also read about the notion of "change points", i.e. the different 
factors that intervene in the evaluation of wether or not a page needs 
re-generation: parameters, browser, database update,... Somebody know 
where this is documented ?

Thanks in advance,

Aurélien


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




SOLVED?: Connection refused after installing Cocoon + X11 comment s

2001-12-10 Thread david . greaves

Hi

I ma have solved this problem - certainly I had the same issue:
 # tomcat4 run
started tomcat fine; I waited a while (minutes!) the made a req to
http://tc/
Worked fine, tomcat4 demos fine
Then a connection to /cocoon/
Instant death!
All the tomcat4 processes died - no errors no (useful) logs - just X11
connection closed...

This was a virgin RH7.2 install on an SMP i386 machine.
I had downloaded suns jdk1.3.1_01 to /usr/java/jdk1.3.1_01
installed the tomcat4 noarch rpm to /var/tomcat4 (nb someone fix the
/etc/passwd entry for the tc4 user - the homedir is /var/tomcat not
/var/tomcat4 - also need a chown -R tomcat4.tomcat4 /var/tomcat4)

The cocoon binary failed (haven't retried) so I did a build.sh from the
source.

Then I had the problem described above: (search fodder :)
cocoon2 died after one request
no tomcat4 instances running
no error messages

I had X working (xhost+ over SSH etc) - but it took a while to realise that
this fails after a su to tomcat4 :(

After much log reading we tried the 'headless' install using jpa - nb there
were few clues that this was it and the fact that X was working kinda
red-herring'ed us)
This (http://xml.apache.org/cocoon/installing/index.html) suggested jpa from
www.eteks.com 
I installed the .jars to /usr/java/jdk1.3.1_01/fre/lib/ext as Sun suggest -
this failed to work with class loading problems.
We then explicitly unjarred the pja.jar to a new classes directory that we
had to create in /usr/java/jdk1.3.1_01/jre 
(ie mkdir /usr/java/jdk1.3.1_01/jre/classes)
Cocoon then worked :)


I hope this helps...

Looking forward to some serious work now :)

David Greaves




Included the old thread for searching:

Hi Marcus,

thank you for your answer.

On Monday 03 December 2001 06:22 pm, you wrote:
> Hi Tilman,
>
> On Mon, Dec 03, 2001 at 06:22:24PM +0100, Tilman Rassy 
wrote:
> > Catalina.stop: java.net.ConnectException: Connection
> > refused java.net.ConnectException: Connection refused
> > ..
>
>   hmm. looks like your Tomcat crashed just after startup
> for some reason.

Yes, I think you are right. I tried again and checked 
whether Tomcat was still running after the attempt to 
access Cocoon. It was not.

>
> > The Cocoon version is 2.0, my servlet container is
> > Tomcat 4.0.1, my java is sun's SDK 1.3.1, and I work on
> > a Linux machine (kernel 2.4.4-4GB).
> >
> > Obviously, the cocoon.war file was extracted (I found a
> > cocoon subdirectory in webapps, and a lot of
> > Cocoon-related messages in the Tomcat log files).
> > Without Cocoon, Tomcat works well.
>
>   I think those messages in the tomcat logs are probably
> useful for diagnosing what's going on. Without them it's
> a bit difficult. Can you send them in ?

See attachments. (The log files comprise two subsequent 
Tomcat sessions)

Thanks again,

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

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




RE: Cocoon War and Command line

2001-12-10 Thread Karl Øie



use 
jar to unpack your war file, inside you will find the 
cocoon.jar.
 
mvh 
karl øie
 
 

  -Original Message-From: vendo 
  [mailto:[EMAIL PROTECTED]]Sent: 8. desember 2001 
  14:52To: cocoonSubject: Cocoon War and Command 
  line
  Hi,
  I got the latest release of cocoon, for windows, 
  but how to access the command line if there isn't any cocoon.jar?
   
  Vendo


Re: Reading a JSP file

2001-12-10 Thread Piroumian, Konstantin

Hi!

JSPReader were added only to the C2.1-dev branch, cause it seemed to me that
nobobdy is interested in it and I didn't post a patch for C2.0. The attached
is the src of JSPReader that I used with Cocoon 2.0 (a few weeks old
version), hope it will work with the release too.

P.S. If anybody else is interested in JSPReader I'll improve it and send a
patch to C2.0 with samples and docs.

Regards,
Konstantin Piroumian

- Original Message -
From: "Matt Ho" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Rachel McConnell" <[EMAIL PROTECTED]>
Sent: Monday, December 10, 2001 12:12 AM
Subject: Reading a JSP file


> Ugh.  I've read through all the documentation I can find, but
> I can't figure out how to get my submap to serve up JSP pages
> natively (i.e. they don't output XML).
>
> I have the following configuration:
>
> * Redhat 7.2
> * Tomcat 4.0.1
> * Sun JDK 1.3.1
>
> When I place JSP files in the webapps/cocoon directory, they
> work just fine.  When I create a submap
>
>   
>
>  check-reload="yes"/>
>
>   
>
> The submap works and does every other mapping that it should,
> but it will not display a plain JSP page.  The error that I
> get back is 'The request resource is not available'.  The log
> files are not providing me a clue either.
>
> I've tried a workaround without success.  I downloaded the
> top of tree version which I noted had JSPReader.  I then
> JSPReader with the cocoon2 binary release and tried configuring
> it by hand via:
>
> src="org.apache.cocoon.reading.JSPReader"/>
>
> No joy.
>
> Any help would be appreciated.
>
> Thanks!
>
> --
> Matt Ho
> Principal
> Indigo Egg, Inc.
> Providing VoiceXML Professional Services
>
>
>
> -
> 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]>
>




JSPReader.java
Description: Binary data

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