cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] Scherler FAQs WindowsTomcatCocoonInstallation ScherlerHtmlParsing ScherlerRest People HowTos Thu Feb 12 21:00:11 2004
Date Thu, 12 Feb 2004 20:00:11 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=Scherler , version: 49 on Thu Feb 12 20:09:44
2004 by Scherler

- !Parsing, converting, snippets:\\
+ !Parsing, generator, converting, database, transformation:\\


Page: http://wiki.cocoondev.org/Wiki.jsp?page=FAQs , version: 89 on Thu Feb 12 20:05:33 2004
by 80.138.73.120

+ 
+ !Problems following install instructions using cocoon 2.0.4
+ 
+  Q: Hi, today I tried to install cocoon 2.0.4 using the Tomcat version 5.0.16 and 5.0.18.
I copied the cocoon.war into the webapps directory of Tomcat, as explained, but it(Tomcat)
was not able to start the application(same after several restarts and reboots). There was
a message pointing this out on the application-management-page of Tomcat and in the console
monitor. In the console monitor there were several fatal errors (SCHWERWIEGENDER FEHLER in
german) listed. The first suspicious message is a
+ "__WARNING: exception while expanding web application archive cocoon.war__", followed by
a 
+ fatal error: "__Error in dependencyCheck__" which is followed by a strange regular message:
+ "__java.util.zip.ZipException: invalid entry size(expected 2472738816 but got 48 bytes)__"
???
+ I'm using XP pro and tried java versions 1.4.1, 1.4.2 and 1.5_beta using the appropriate
Win_VM_1.4-binaries but nothing helped.
+ Does anyone have an explanation for this? If so, or if you know another way to get cocoon
running please drop me a line, thank you.
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WindowsTomcatCocoonInstallation , version: 2
on Thu Feb 12 20:14:37 2004 by HelmaVanDerLinden

+ 
+ ''(courtesy of Jim Bloggs)''
+ Installing Tomcat and Cocoon is easy if you know how, but can be complicated if you don't.
- Installing Tomcat and Cocoon is easy if you know how, but can be complicated if you don't.
As I went through it, I promised myself I would make notes once I'd finished. Outlined below
are the steps I took to install Cocoon 2.1.3 on Tomcat 5.0.18 on Windows 2000 with j2sdk1.4.2_01.
I hope they help.
? -------------------------------------------------------------------------------------------

+ As I went through it, I promised myself I would make notes once I'd finished. Outlined below
are the steps I took to install Cocoon 2.1.3 on Tomcat 5.0.18 on Windows 2000 with j2sdk1.4.2_01.
I hope they help.
+ 
-    6. Do this: Stop the server by running the batch file provided.
-       c:\jakarta-tomcat\bin\shutdown.bat
+ # Do this: Stop the server by running the batch file provided.
+       {{c:\jakarta-tomcat\bin\shutdown.bat}}
-       Consider this: Because the batch file appears to hang, you will need to run this batch
file from another DOS window.
-    7. Do this: Install Tomcat as a Windows service by running the batch file provided.
-       c:\jakarta-tomcat\bin\service.bat
+       {{{Consider this: Because the batch file appears to hang, you will need to run this
batch file from another DOS window.}}}
+ # Do this: Install Tomcat as a Windows service by running the batch file provided.
-       Consider this: Windows services can be controlled independently throught the Services
control panel.
-    8. Do this: Change the service status to automatic for automatic start on reboot. The
service should be named Apache Tomcat in:
-       Control Panel > Administrative Tools > Services
+       {{c:\jakarta-tomcat\bin\service.bat}}
+       {{{Consider this: Windows services can be controlled independently throught the Services
control panel.}}}
-       Consider this: You can start, stop and restart any service using the corresponding
button in the top panel
-    9. Do this: Download the file called cocoon-latest-src.zip from:
-       http://cocoon.apache.org/mirror.cgi
+ # Do this: Change the service status to automatic for automatic start on reboot. The service
should be named Apache Tomcat in:
+       {{Control Panel > Administrative Tools > Services}}
-       Consider this: It is necessary to download the entire source which can take a long
time.
-   10. Do this: Extract the source to c:\ using Winzip, which should place everything in
a directory called:
-       c:\cocoon-2.1.3
+       {{{Consider this: You can start, stop and restart any service using the corresponding
button in the top panel.}}}
+ # Do this: Download the file called cocoon-latest-src.zip from:
-       Consider this: You can find more details on installing Cocoon in c:\cocoon-2.1.3\INSTALL.txt
-   11. Do this: Build the binary. It may run for quite a while, in my case 30 mins.
-       build
+       {{http://cocoon.apache.org/mirror.cgi}}
+       {{{Consider this: It is necessary to download the entire source which can take a long
time.}}}
-       Consider this: During this time there will be many disturbing warning messages. You
can see other build options by doing build -projecthelp
-   12. Do this: Test Cocoon in the Jetty Servlet container.
-       cocoon servlet
+ # Do this: Extract the source to c:\ using Winzip, which should place everything in a directory
called:
+       {{c:\cocoon-2.1.3}}
-       Consider this: Jetty is provided with Cocoon so that it can be tested independently
of a separately installed servlet container such as Tomcat.
-   13. Do this: View the Cocoon default installation screen here:
-       http://localhost:8888/
+       {{{Consider this: You can find more details on installing Cocoon in c:\cocoon-2.1.3\INSTALL.txt}}}
+ # Do this: Build the binary. It may run for quite a while, in my case 30 mins.
-       Consider this: Jetty listens on port 8888, but in a moment, we will configure Cocoon
to run with Tomcat on port 8080.
-   14. Do this: Stop the Jetty server.
-       ^C
+       {{build}}
+       {{{Consider this: During this time there will be many disturbing warning messages.
You can see other build options by doing build -projecthelp}}}
-       Consider this: Although inelegant, I couldn't find any other way of stopping Jetty.
-   15. Do this: Copy over the Xalan parser to Tomcat. Bit vague about this step, but seemed
to work for me.
-       copy c:\cocoon-2.1.3\lib\endorsed\xalan.2.5.2.jar c:\jakart-tomcat-5.0.18\common\endorsed\
+ # Do this: Test Cocoon in the Jetty Servlet container.
+       {{cocoon servlet}}
-       Consider this: The docs suggested copying over xercesXXX.jar and xml-apis.jar, but
I omitted to because the versions that came with Tomcat were dated after those shipping with
Cocoon.
-   16. Do this: Copy over the webapp directory hierarchy as a subdirectory of the Tomcat
webapps directory named cocoon
-       xcopy c:\cocoon-2.1.3\build\webapp c:\jakarta-tomcat-5.0.18\webapps\cocoon /D /S /V
/I /F
+       {{{Consider this: Jetty is provided with Cocoon so that it can be tested independently
of a separately installed servlet container such as Tomcat.}}}
+ # Do this: View the Cocoon default installation screen here:
-       Consider this: Alternatively, using Windows explorer, drag and drop the webapp folder
into the webapps folder whilst holding down the <ctrl> key. Then select the webapp folder,
hit F2, and rename it cocoon.
-   17. Do this: Restart Tomcat from the services window:
-       Control Panel > Administrative Tools > Services
+       {{http://localhost:8888/}}
+       {{{Consider this: Jetty listens on port 8888, but in a moment, we will configure Cocoon
to run with Tomcat on port 8080.}}}
-       Consider this: Tomcat should find Cocoon when it restarts.
-   18. Do this: View the Cocoon startup screen which should be avaliable here:
-       http://localhost:8080/cocoon/
+ # Do this: Stop the Jetty server.
+       {{^C}}
-       Consider this: The first time you run Cocoon, it will take some time to compile. You
can create a more lean and mean Cocoon by creating and editing the files local.build.properties
and local.blocks.properties.
-   19. Do this: Delete the source if you desire to save space and keep things tidy.
-       rd /S c:\cocoon-2.1.3
+       {{{Consider this: Although inelegant, I couldn't find any other way of stopping Jetty.}}}
+ # Do this: Copy over the Xalan parser to Tomcat. Bit vague about this step, but seemed to
work for me.
+ 
+       {{copy c:\cocoon-2.1.3\lib\endorsed\xalan.2.5.2.jar c:\jakarta-tomcat-5.0.18\common\endorsed\}}
+ 
+       {{{Consider this: The docs suggested copying over xercesXXX.jar and xml-apis.jar,
but I omitted to because the versions that came with Tomcat were dated after those shipping
with Cocoon.}}}
+ 
+ # Do this: Copy over the webapp directory hierarchy as a subdirectory of the Tomcat webapps
directory named cocoon
+ 
+       {{xcopy c:\cocoon-2.1.3\build\webapp c:\jakarta-tomcat-5.0.18\webapps\cocoon /D /S
/V /I /F}}
+ 
+       {{{Consider this: Alternatively, using Windows explorer, drag and drop the webapp
folder into the webapps folder whilst holding down the <ctrl> key. Then select the webapp
folder, hit F2, and rename it cocoon.}}}
+ 
+ # Do this: Restart Tomcat from the services window:
+ 
+       {{Control Panel > Administrative Tools > Services}}
+ 
+       {{{Consider this: Tomcat should find Cocoon when it restarts.}}}
+ 
+ # Do this: View the Cocoon startup screen which should be avaliable here:
+ 
+       {{http://localhost:8080/cocoon/}}
+ 
+       {{{Consider this: The first time you run Cocoon, it will take some time to compile.
You can create a more lean and mean Cocoon by creating and editing the files local.build.properties
and local.blocks.properties.}}}
+ 
+ # Do this: Delete the source if you desire to save space and keep things tidy.
+ 
+       {{rd /S c:\cocoon-2.1.3}}
+ 
-       Consider this: If you choose to keep the source and rebuild Cocoon later, you will
have to clear out the build directory by doing build clean
+       {{{Consider this: If you choose to keep the source and rebuild Cocoon later, you will
have to clear out the build directory by doing build clean}}}
?       +++                                                                              
                                                              +++



Page: http://wiki.cocoondev.org/Wiki.jsp?page=ScherlerHtmlParsing , version: 1 on Thu Feb
12 19:54:42 2004 by Scherler

New page created:
+ ''convert string to xml''
+ {{{Aparently your <xsp:expr>result</xsp:expr> returns a string and not and XML
stream.
+ You can use JTidy to convert your String to an XML stream.  It's classes are available in
Cocoon!
+ Here's a code snip out of an XSP page that converts a POST from a brower based html editor
to an XML stream.
+ 
+   <xsp:structure>
+     <xsp:include>org.w3c.tidy.Tidy</xsp:include>
+     <xsp:include>java.io.ByteArrayInputStream</xsp:include>
+   </xsp:structure>
+   <page>
+     <xsp:logic>
+       String strContent = request.getParameter("content");
+       ByteArrayInputStream in = new ByteArrayInputStream( strContent.getBytes() );
+       org.w3c.dom.Document doc = null;
+       org.w3c.tidy.Configuration conf = new org.w3c.tidy.Configuration();
+ 
+       try {
+         Tidy tidy = new Tidy();
+         //Do not show "parsing" messages
+         tidy.setQuiet(true);
+         //Do not show warnings in the Servlet Engine console
+         tidy.setShowWarnings(false);
+         //set the output type
+         tidy.setXmlOut(true);
+         //Set the encoding
+         tidy.setCharEncoding( conf.LATIN1 );
+         //Set output options
+         tidy.setBreakBeforeBR(false);
+         tidy.setQuoteNbsp(true);
+         tidy.setQuoteAmpersand(true);
+         tidy.setLiteralAttribs(true);
+         //Omit the document type in the tidy output
+         tidy.setXmlPi(false);
+         //parse the document tot a DOM tree
+         doc =  tidy.parseDOM(in, null);
+       } catch (Exception e) {
+            //Do some error handling here
+       }
+     </xsp:logic>
+     <content>
+       <xsp:expr>doc.getDocumentElement()</xsp:expr>
+     </content>
+ 
+ 
+ You will need to tweak the Tidy parameters, but you get the idea, I guess.
+ The DOM stream from JTidy is automatically converted to SAX by Cocoon 
+ (correct me if I'm wrong) so you can do regular transformations in the pipeline afterwards.
+ 
+ HTH,
+ Bert }}}
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=ScherlerRest , version: 1 on Thu Feb 12 19:54:54
2004 by Scherler

New page created:
+ ----
+ !Scratchpad\\
+ ----
+ ''cinclude''\\
+ [cocoon docs about cinlude|http://xml.apache.org/cocoon/userdocs/transformers/cinclude-transformer.html]\\
+ \\
+ ''File upload - allowing users to upload pdf files in a webdav directory''
+ {{{If that doesn't work as I suspect, you'll need to write an action to get the
+ FilePart out of the request, call getInputStream and send that input stream
+ over http to the webdav location.}}}
+ * [FileUploadWithAction]
+ * [FileUploadsWithCocoon]
+ \\
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=People , version: 255 on Thu Feb 12 19:49:28
2004 by HelmaVanDerLinden

+ * [Helma van der Linden|HelmaVanDerLinden] -- beginning to learn Cocoon


Page: http://wiki.cocoondev.org/Wiki.jsp?page=HowTos , version: 160 on Thu Feb 12 19:56:58
2004 by HelmaVanDerLinden

- * __[Windows/Tomcat/Cocoon Installation|WindowsTomcatCocoonInstallation]__ -- how to setup
  
+ * __[Windows/Tomcat/Cocoon Installation|WindowsTomcatCocoonInstallation]__ -- how to setup
 Cocoon 2.1.X under Tomcat 4+ in Windows.
?                                                                                        
    ++++++ +++++++++++++++++++++++++++++++++

- Cocoon 2.1.X under Tomcat 4+ in Windows.



Mime
View raw message