Modified: cocoon/site/site/2.1/faq/faq-configure-c2.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/faq/faq-configure-c2.html?view=diff&r1=159368&r2=159369 ============================================================================== --- cocoon/site/site/2.1/faq/faq-configure-c2.html (original) +++ cocoon/site/site/2.1/faq/faq-configure-c2.html Tue Mar 29 05:47:29 2005 @@ -2,14 +2,18 @@ <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>Cocoon Configuration FAQs</title> +<meta content="Apache Forrest" name="Generator"> +<meta name="Forrest-version" content="0.6"> +<meta name="Forrest-skin-name" content="forrest-site"> +<title></title> <link type="text/css" href="../skin/page.css" rel="stylesheet"> +<link rel="shortcut icon" href="../"> </head> <body text="#000000" bgcolor="#FFFFFF"> <!--================= start Navigation Path ==================--> <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> -<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> +<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><a href="http://www.apache.org/">apache</a> > <a href="http://cocoon.apache.org/">cocoon</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> </tr> <tr> <td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" src="../skin/images/spacer.gif" class="spacer"></td> @@ -20,9 +24,9 @@ <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <!--================= start Group Logo ==================--> -<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> +<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> <!--================= end Group Logo ==================--> -<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif"></a></td> +<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif" title="Apache Cocoon"></a></td> <!--================= end Project Logo ==================--> <!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563"> <form target="_blank" action="http://www.google.com/search" method="get"> @@ -31,13 +35,13 @@ <td colspan="3"><img height="10" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> -<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="sitesearch" type="hidden"><input size="15" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> +<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="as_sitesearch" type="hidden"><input size="15" name="as_q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> <br> <font face="Arial, Helvetica, Sans-serif" size="2" color="white"> - the Apache Cocoon site - - - </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> + the Apache Cocoon site + + + </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td><img alt="" border="0" height="10" width="9" src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" height="10" width="9" src="../skin/images/search-right.gif"></td> @@ -45,7 +49,7 @@ </table> </form> </td> -<!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<!--================= end Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td valign="bottom" bgcolor="#294563" colspan="2"> @@ -64,10 +68,10 @@ </table> </div> <!--================= end Tabs ==================--> -</td><td bgcolor="#294563"><img alt="" width="1" height="1" src="../skin/images/spacer.gif" class="spacer"></td> +</td><td bgcolor="#294563"></td> </tr> <tr> -<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td height="10" bgcolor="#4C6C8F" colspan="4"></td> </tr> </table> <!--================= end Banner ==================--> @@ -230,168 +234,7 @@ <!--================= end middle NavBar ==================--> <!--================= start Content==================--> <tr> -<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"> -<div class="content"> -<table class="title" summary=""> -<tr> -<td valign="middle"> -<h1>Cocoon Configuration FAQs</h1> -</td><script language="Javascript" type="text/javascript"> -function printit() { -if (window.print) { - window.print() ; -} else { - var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; -document.body.insertAdjacentHTML('beforeEnd', WebBrowser); - WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = ""; -} -} -</script><script language="Javascript" type="text/javascript"> -var NS = (navigator.appName == "Netscape"); -var VERSION = parseInt(navigator.appVersion); -if (VERSION > 3) { - document.write('<td nowrap="nowrap" width="40" align="center">'); - document.write(' <a class="dida" href="javascript:printit()">'); - document.write(' <img alt="Print this Page" src="../skin/images/printer.gif" class="skin"><br>'); - document.write(' print</a>'); - document.write('</td>'); -} -</script><td nowrap="nowrap" width="40" align="center"><a class="dida" href="faq-configure-c2.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br> - PDF</a></td> -</tr> -</table> -<a name="N10007"></a><a name="Questions"></a> -<h3>Questions</h3> -<div style="margin-left: 0 ; border: 2px"> -<ol> -<li> -<a name="faq-N10006-menu"></a><a href="#faq-N10006"> - How do I setup my own .roles file? - </a> -</li> -<li> -<a name="faq-N10020-menu"></a><a href="#faq-N10020"> - Where do I setup LogKit in Cocoon? - </a> -</li> -<li> -<a name="faq-N10062-menu"></a><a href="#faq-N10062"> -How can I change the physical location of my upload directory? -</a> -</li> -<li> -<a name="faq-N10075-menu"></a><a href="#faq-N10075"> -How can I solve 'Too many open files' errors when I try to create a search index for my site? -</a> -</li> -</ol> -</div> -<a name="N10020"></a><a name="Answers"></a> -<h3>Answers</h3> -<div style="margin-left: 0 ; border: 2px"> -<a name="N10024"></a><a name="faq-N10006"></a> -<h4>1. - How do I setup my own .roles file? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - In cocoon.xconf you can specify your my.roles file as follows: - </p> -<pre class="code"> - ... - <cocoon version="2.0" user-roles="/WEB-INF/my.roles"> - ... -</pre> -<p> - if you are using Tomcat 4. For other versions, skip the leading - slash of the URI. - </p> -<p> - And create a new file my.roles in WEB-INF directory with - </p> -<pre class="code"> -<?xml version="1.0"?> -<role-list> - <role name="org.apache.cocoon.components.jsp.JSPEngine" - shorthand="jsp-engine" - default-class="org.apache.cocoon.components.jsp.JSPEngineImplWLS"/> -</role-list> -</pre> -</div> -<a name="N1003C"></a><a name="faq-N10020"></a> -<h4>2. - Where do I setup LogKit in Cocoon? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p>1. <span class="codefrag">{cocoon}/WEB-INF/logkit.xconf</span>:</p> -<p>Please refer to the - <a href="http://avalon.apache.org/logkit/index.html">Avalon LogKit Documentation</a> -</p> -<p>2. <span class="codefrag">{cocoon}/WEB-INF/web.xml</span>:</p> -<p>Here you can change following paramters:</p> -<ul> - -<li> -<span class="codefrag">logkit-config</span>: This parameter indicates the configuration - file of the LogKit management</li> - -<li> -<span class="codefrag">servlet-logger</span>: This parameter indicates the category id - of the logger from the LogKit configuration used by the CocoonServlet.</li> - -<li> -<span class="codefrag">cocoon-logger</span>: This parameter indicates the category id of the - logger from the LogKit management configuration for the Cocoon engine. - This logger is used for all components described in the cocoon.xconf - and sitemap.xmap file not having specified a logger with the - logger="..." attribute in the component configuration file.</li> - -<li> -<span class="codefrag">log-level</span>: This parameter indicates the log level to use - throughout startup of the system. As soon as the logkit.xconf the setting - of the logkit.xconf configuration is used instead! Only for startup and if - the logkit.xconf is not readable/available this log level is of - importance.</li> - -</ul> -<div class="frame note"> -<div class="label">Note</div> -<div class="content">See inline comments in these files for further information!</div> -</div> -<p> -Learn more about LogKit configuration by downloading the free chapter, <a href="http://www.newriders.com/books/product.asp?product_id={C3C05052-BE3B-4E06-A60A-13FB40AF58F6}">A User's Look at the Cocoon architecture,</a> from Langham and Ziegeler's <em>Cocoon: Building XML Applications</em> available at the New Riders web site. - </p> -</div> -<a name="N1007A"></a><a name="faq-N10062"></a> -<h4>3. -How can I change the physical location of my upload directory? -</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>Look in web.xml file located in <your-webapp>/WEB-INF. There you will find the following snippet:</p> -<pre class="code"> - <init-param> - <param-name>upload-directory</param-name> - <param-value>/WEB-INF/work/upload-dir</param-value> - </init-param> -</pre> -<p> -The above snippet shows the default path to the upload directory, specified within <param-value>. Replace it with a different path to your upload directory, relative to the context path of the servlet. - </p> -</div> -<a name="N1008A"></a><a name="faq-N10075"></a> -<h4>4. -How can I solve 'Too many open files' errors when I try to create a search index for my site? -</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>Either reduce the number of tags in your documant, by filtering it with xslt in your search view.</p> -<p>Or, increase the limit on the number of files your opperating system allows you to have open simultaneously, in the shell you launch the servlet engine in.</p> -<p>example (Linux, bash shell): ulimit 2048</p> -<p>example (MacOSX, tcsh shell): limit descriptors 2048</p> -</div> -</div> -<div class="attribution"></div> -</div> -</td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"></td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <!--================= end Content==================--> </table> @@ -402,11 +245,14 @@ <!--================= start Footer ==================--> <table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> -<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td> +<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a></td> </tr> <tr> -<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright © - 1999-2004 The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!-- +<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif"><a href="http://www.apache.org/licenses/"> + Copyright © 1999-2005 + The Apache Software Foundation.</a> + All rights reserved. + <script type="text/javascript" language="JavaScript"><!-- document.write(" - "+"Last Published: " + document.lastModified); // --></script></font></td> </tr>
Modified: cocoon/site/site/2.1/faq/faq-configure-environment.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/faq/faq-configure-environment.html?view=diff&r1=159368&r2=159369 ============================================================================== --- cocoon/site/site/2.1/faq/faq-configure-environment.html (original) +++ cocoon/site/site/2.1/faq/faq-configure-environment.html Tue Mar 29 05:47:29 2005 @@ -2,14 +2,18 @@ <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>Environment Configuration FAQs</title> +<meta content="Apache Forrest" name="Generator"> +<meta name="Forrest-version" content="0.6"> +<meta name="Forrest-skin-name" content="forrest-site"> +<title></title> <link type="text/css" href="../skin/page.css" rel="stylesheet"> +<link rel="shortcut icon" href="../"> </head> <body text="#000000" bgcolor="#FFFFFF"> <!--================= start Navigation Path ==================--> <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> -<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> +<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><a href="http://www.apache.org/">apache</a> > <a href="http://cocoon.apache.org/">cocoon</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> </tr> <tr> <td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" src="../skin/images/spacer.gif" class="spacer"></td> @@ -20,9 +24,9 @@ <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <!--================= start Group Logo ==================--> -<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> +<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> <!--================= end Group Logo ==================--> -<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif"></a></td> +<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif" title="Apache Cocoon"></a></td> <!--================= end Project Logo ==================--> <!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563"> <form target="_blank" action="http://www.google.com/search" method="get"> @@ -31,13 +35,13 @@ <td colspan="3"><img height="10" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> -<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="sitesearch" type="hidden"><input size="15" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> +<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="as_sitesearch" type="hidden"><input size="15" name="as_q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> <br> <font face="Arial, Helvetica, Sans-serif" size="2" color="white"> - the Apache Cocoon site - - - </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> + the Apache Cocoon site + + + </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td><img alt="" border="0" height="10" width="9" src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" height="10" width="9" src="../skin/images/search-right.gif"></td> @@ -45,7 +49,7 @@ </table> </form> </td> -<!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<!--================= end Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td valign="bottom" bgcolor="#294563" colspan="2"> @@ -64,10 +68,10 @@ </table> </div> <!--================= end Tabs ==================--> -</td><td bgcolor="#294563"><img alt="" width="1" height="1" src="../skin/images/spacer.gif" class="spacer"></td> +</td><td bgcolor="#294563"></td> </tr> <tr> -<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td height="10" bgcolor="#4C6C8F" colspan="4"></td> </tr> </table> <!--================= end Banner ==================--> @@ -230,402 +234,7 @@ <!--================= end middle NavBar ==================--> <!--================= start Content==================--> <tr> -<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"> -<div class="content"> -<table class="title" summary=""> -<tr> -<td valign="middle"> -<h1>Environment Configuration FAQs</h1> -</td><script language="Javascript" type="text/javascript"> -function printit() { -if (window.print) { - window.print() ; -} else { - var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; -document.body.insertAdjacentHTML('beforeEnd', WebBrowser); - WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = ""; -} -} -</script><script language="Javascript" type="text/javascript"> -var NS = (navigator.appName == "Netscape"); -var VERSION = parseInt(navigator.appVersion); -if (VERSION > 3) { - document.write('<td nowrap="nowrap" width="40" align="center">'); - document.write(' <a class="dida" href="javascript:printit()">'); - document.write(' <img alt="Print this Page" src="../skin/images/printer.gif" class="skin"><br>'); - document.write(' print</a>'); - document.write('</td>'); -} -</script><td nowrap="nowrap" width="40" align="center"><a class="dida" href="faq-configure-environment.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br> - PDF</a></td> -</tr> -</table> -<a name="N10007"></a><a name="Questions"></a> -<h3>Questions</h3> -<div style="margin-left: 0 ; border: 2px"> -<ol> -<li> -<a name="faq-N10006-menu"></a><a href="#faq-N10006">How can I reach my Cocoon app from an URI other than - <your-server>/cocoon/<my-app>? - </a> -</li> -<li> -<a name="faq-N10086-menu"></a><a href="#faq-N10086">How could I have my Cocoon app located in a directory other than - $TOMCAT_HOME/webapps/cocoon/<my-app>? - </a> -</li> -<li> -<a name="faq-N100B2-menu"></a><a href="#faq-N100B2"> - How do I integrate Apache Server and Cocoon? - </a> -</li> -<li> -<a name="faq-N100CF-menu"></a><a href="#faq-N100CF"> - How can I improve performance by making the web-server deliver the static contents ? - </a> -</li> -<li> -<a name="faq-N100EA-menu"></a><a href="#faq-N100EA"> - Why won't my Batik .JPG and .PNG samples work? How can I run Cocoon without X11? - Why is a Display needed? - </a> -</li> -<li> -<a name="faq-N1010A-menu"></a><a href="#faq-N1010A"> - How can I access Cocoon's status page in a mixed servlet environment - where "/" is not mapped to Cocoon (only *.xml, *.xsp)? - </a> -</li> -</ol> -</div> -<a name="N1002A"></a><a name="Answers"></a> -<h3>Answers</h3> -<div style="margin-left: 0 ; border: 2px"> -<a name="N1002E"></a><a name="faq-N10006"></a> -<h4>1. How can I reach my Cocoon app from an URI other than - <your-server>/cocoon/<my-app>? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - Suppose the following. - </p> -<ol> - -<li>You have a Cocoon application named "bar" which works fine when - called with this URI: http://www.foo.com/cocoon/bar/index.html - </li> - -<li>You want the "bar" app to be called from - http://www.foo.com/bar/index.html instead (getting rid of "cocoon"). - </li> - -</ol> -<p> - There are, basically, two methods to achieve this. - </p> -<ol> - -<li> - Set Cocoon as the root servlet in your servlet-container - </li> - -<li>Rewrite the URI in the web-server. (When a user asks for - http://www.foo.com/bar/index.html, the web-server redirects him/her to - http://www.foo.com/cocoon/bar/index.html - </li> - -</ol> -<p> - Let us explore the first method (Cocoon as the root servlet). - </p> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> - This entry was tested under: Windows 2000 - Professional + IIS 5.0 + Tomcat 4.0.1 + Cocoon 2.0.2. - </div> -</div> -<ol> - -<li> - Edit the server.xml file which is located under $TOMCAT_HOME/conf - </li> - -<li> - Go to the line containing "Tomcat Root Context". (This should be a comment). - </li> - -<li> - Add following line after that comment: - <span class="codefrag"> - <context path="" docBase="/cocoon" debug="0"/> - </span> - -</li> - -<li> - Re-start Tomcat. - </li> - -<li> - Try: http://www.foo.com:8080/ and the Cocoon welcome page should appear - </li> - -</ol> -<p> - Now, http://www.foo.com/bar/index.html should also work. - </p> -<p> - Let us explore the second method (URI rewriting). - </p> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> This entry was tested under: Windows NT 4.0 + Apache 1.3.14 + Tomcat 3.2 + - Cocoon 2.0b1. It is Apache-specific. - </div> -</div> -<p> - The idea is just to redirect a portion of the desired URI (bar) to the one within - the cocoon context (cocoon/bar). - </p> -<p> - Apache has an handy feature called mod_rewrite that does just this: URI - rewriting. (See the "URL Rewriting Guide" in the Apache user's guide for - details). - </p> -<p> - First of all, you should instruct Apache to load the mod_rewrite. - Add (on a Windows system) to httpd.conf the following line: - </p> -<pre class="code"> - LoadModule rewrite_module modules/ApacheModuleRewrite.dll - </pre> -<p> - (By the way it's quite likely that this line is already on the httpd.conf. You - just have to uncomment it). - </p> -<p> - Add this line to httpd.conf in order to activate mod_rewrite: - </p> -<pre class="code"> - RewriteEngine On - </pre> -<p> - It is highly recommended to use the logging option of mod_rewrite, in - order to check the correctness of the URI rewriting. Just add these lines - to the httpd.conf: - </p> -<pre class="code"> - RewriteLog "C:/logs/rewrite.log" - RewriteLogLevel 9 - </pre> -<p> - The first line tells Apache to put the URI rewriting log in the - c:\logs\rewrite.log file (which happens to be on a Windows system, of - course). The second one tells Apache to record everything mod_rewrite - does. If you don't want to log anything, just set RewriteLogLevel to - 0. - </p> -<p> - Now, it's time to do the URI rewriting trick. - </p> -<pre class="code"> - RewriteRule bar/(.*) /cocoon/bar/$1 [PT] - </pre> -<p> - This line instructs Apache to redirect everything under "bar" to - "cocoon/bar" and to pass it on for other processing ("[PT]" option), - like mod_alias. - </p> -<p> - Just restart Apache and point your browser to: - </p> -<pre class="code"> - <your-server>:8080/bar/<something> - </pre> -<p> - It should work just fine. - </p> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> - The RewriteRule may not work in all cases (notably under Slackware Linux with Apache 1.3), - if so, try replacing it with: - RewriteRule ^/Foo /cocoon/Foo/ [R] - RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R] - </div> -</div> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> -Another user adds: In my experience, session support is lost when you use mod_rewrite because the cookie path for the Cocoon session is "/cocoon". Because the browser sees the path differently, the session cookie is not granted access, and sessions don't work. I got around this by renaming Cocoon to ROOT, I imagine setting the default docBase would have the same effect. - </div> -</div> -</div> -<a name="N100AF"></a><a name="faq-N10086"></a> -<h4>2. How could I have my Cocoon app located in a directory other than - $TOMCAT_HOME/webapps/cocoon/<my-app>? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> - This entry was tested under Windows NT 4.0 + Apache 1.3.14 + Tomcat 3.2 + Cocoon - 2.0b1. - </div> -</div> -<p>Let's suppose the following.</p> -<ol> - -<li> - You have an application called "foo" which works perfectly when - located under the %TOMCAT_HOME%\webapps\cocoon\foo directory. - </li> - -<li> - You want it to be located under the "c:\foo" directory instead - </li> - -</ol> -<p> - This could be accomplished quite easily by twisting the sitemap a little bit. The - idea is to mount the sub-sitemap of the "foo" application in a specific - location of the file system instead of under the default cocoon context. - </p> -<p> - Here's the sitemap.xmap fragment used to do this. - </p> -<pre class="code"> - -<map:pipeline> - <map:match pattern="foo/**"> - <map:mount uri-prefix="foo" src="file:///c:/foo/"/> - </map:match> -</map:pipeline> - - </pre> -<p> - The "file:" type of source instructs Cocoon to search the sub-sitemap - under the specified directory (which happens to be "c:\foo", since this - is a Windows system). See explanation of - <a href="../userdocs/concepts/sitemap.html#file-url">file: URLs</a> - -</p> -<p> - Now, you just need to copy everything which was under the - %TOMCAT_HOME%\webapps\cocoon\foo directory to the c:\foo directory, and it should work - graciously. - </p> -</div> -<a name="N100D8"></a><a name="faq-N100B2"></a> -<h4>3. - How do I integrate Apache Server and Cocoon? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - See the Wiki page - <a href="http://wiki.apache.org/cocoon/ApacheModProxy">ApacheModProxy</a> - for a thorough discussion of this topic. - </p> -<p> - Another method is to use mod_jk. Add the following line to - <span class="codefrag">%APACHE_HOME%\conf\httpd.conf</span> - -</p> -<pre class="code"> - JkMount /cocoon/* ajp12 - </pre> -<p> - along with other directives that are already listed in mod_jk.conf-auto - in the tomcat/conf directory. The above directives can be added at the - end of httpd.conf. - </p> -</div> -<a name="N100F2"></a><a name="faq-N100CF"></a> -<h4>4. - How can I improve performance by making the web-server deliver the static contents ? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - Fairly easy to do. - </p> -<ol> - -<li> - Put the static contents in a physical directory. (Let's call it "c:\foo\static-stuff". - On UNIX it may be "/foo/static-stuff".) - </li> - -<li> - Make a virtual directory out of "c:\foo\static-stuff" (or, under UNIX "/foo/static-stuff") - in you favorite web-server, and name it "static-foo". - </li> - -<li> - Reference the static contents in your Cocoon app by URIs starting with "/static-foo", as in: - "/static-foo/images/foo.gif" or "/static-foo/scripts/bar.js" - </li> - -</ol> -<p> - The web-server will now handle the static contents, leaving Cocoon to take care of the - dynamic stuff only, delivering optimal performance. - </p> -</div> -<a name="N10109"></a><a name="faq-N100EA"></a> -<h4>5. - Why won't my Batik .JPG and .PNG samples work? How can I run Cocoon without X11? - Why is a Display needed? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p>If your Batik .JPG and .PNG samples don't work it is probably because you have not - installed and configured a graphics display. You have a couple of options depending on - your environment. - </p> -<p>If you are using the Sun JDK 1.4 then you can use the 'headless' environment. - For more information about this see - <a href="../installing/index.html#Headless+UNIX+and+PJA">Headless UNIX and PJA</a>. - </p> -<p> - Otherwise, an XServer is needed because of the Batik library that FOP uses. - Batik uses Java's graphics code, which in turn requires the XServer. - If you don't have an XServer on your system and can't set the DISPLAY - variable to one, then try out XVFB. XVFB gives you an 'in-memory' - XServer, which doesn't require any display hardware to run. - </p> -<pre class="code"> -$> Xvfb :1 -screen 0 800x600x8 & -$> export DISPLAY=:1 -$> $TOMCAT_HOME/bin/startup.sh -f server.xml - - </pre> -<p>See also <a href="../installing/index.html#UNIX+with+X+server">UNIX with X server</a> -</p> -</div> -<a name="N10126"></a><a name="faq-N1010A"></a> -<h4>6. - How can I access Cocoon's status page in a mixed servlet environment - where "/" is not mapped to Cocoon (only *.xml, *.xsp)? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> -Just change the status pipeline so it matches a request with a ".xml" extension: - </p> -<pre class="code"> - <map:match pattern="status.xml"> - <map:generate src="status" type="status"/> - <map:transform src="welcome/status2html.xsl"/> - <map:serialize/> - </map:match> -</pre> -<p> -Then you can access the status page with "status.xml". - </p> -</div> -</div> -<div class="attribution"></div> -</div> -</td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"></td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <!--================= end Content==================--> </table> @@ -636,11 +245,14 @@ <!--================= start Footer ==================--> <table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> -<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td> +<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a></td> </tr> <tr> -<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright © - 1999-2004 The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!-- +<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif"><a href="http://www.apache.org/licenses/"> + Copyright © 1999-2005 + The Apache Software Foundation.</a> + All rights reserved. + <script type="text/javascript" language="JavaScript"><!-- document.write(" - "+"Last Published: " + document.lastModified); // --></script></font></td> </tr> Modified: cocoon/site/site/2.1/faq/faq-cvs.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/faq/faq-cvs.html?view=diff&r1=159368&r2=159369 ============================================================================== --- cocoon/site/site/2.1/faq/faq-cvs.html (original) +++ cocoon/site/site/2.1/faq/faq-cvs.html Tue Mar 29 05:47:29 2005 @@ -2,14 +2,18 @@ <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>CVS FAQs</title> +<meta content="Apache Forrest" name="Generator"> +<meta name="Forrest-version" content="0.6"> +<meta name="Forrest-skin-name" content="forrest-site"> +<title></title> <link type="text/css" href="../skin/page.css" rel="stylesheet"> +<link rel="shortcut icon" href="../"> </head> <body text="#000000" bgcolor="#FFFFFF"> <!--================= start Navigation Path ==================--> <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> -<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> +<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><a href="http://www.apache.org/">apache</a> > <a href="http://cocoon.apache.org/">cocoon</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> </tr> <tr> <td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" src="../skin/images/spacer.gif" class="spacer"></td> @@ -20,9 +24,9 @@ <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <!--================= start Group Logo ==================--> -<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> +<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> <!--================= end Group Logo ==================--> -<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif"></a></td> +<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif" title="Apache Cocoon"></a></td> <!--================= end Project Logo ==================--> <!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563"> <form target="_blank" action="http://www.google.com/search" method="get"> @@ -31,13 +35,13 @@ <td colspan="3"><img height="10" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> -<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="sitesearch" type="hidden"><input size="15" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> +<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="as_sitesearch" type="hidden"><input size="15" name="as_q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> <br> <font face="Arial, Helvetica, Sans-serif" size="2" color="white"> - the Apache Cocoon site - - - </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> + the Apache Cocoon site + + + </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td><img alt="" border="0" height="10" width="9" src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" height="10" width="9" src="../skin/images/search-right.gif"></td> @@ -45,7 +49,7 @@ </table> </form> </td> -<!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<!--================= end Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td valign="bottom" bgcolor="#294563" colspan="2"> @@ -64,10 +68,10 @@ </table> </div> <!--================= end Tabs ==================--> -</td><td bgcolor="#294563"><img alt="" width="1" height="1" src="../skin/images/spacer.gif" class="spacer"></td> +</td><td bgcolor="#294563"></td> </tr> <tr> -<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td height="10" bgcolor="#4C6C8F" colspan="4"></td> </tr> </table> <!--================= end Banner ==================--> @@ -230,66 +234,7 @@ <!--================= end middle NavBar ==================--> <!--================= start Content==================--> <tr> -<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"> -<div class="content"> -<table class="title" summary=""> -<tr> -<td valign="middle"> -<h1>CVS FAQs</h1> -</td><script language="Javascript" type="text/javascript"> -function printit() { -if (window.print) { - window.print() ; -} else { - var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; -document.body.insertAdjacentHTML('beforeEnd', WebBrowser); - WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = ""; -} -} -</script><script language="Javascript" type="text/javascript"> -var NS = (navigator.appName == "Netscape"); -var VERSION = parseInt(navigator.appVersion); -if (VERSION > 3) { - document.write('<td nowrap="nowrap" width="40" align="center">'); - document.write(' <a class="dida" href="javascript:printit()">'); - document.write(' <img alt="Print this Page" src="../skin/images/printer.gif" class="skin"><br>'); - document.write(' print</a>'); - document.write('</td>'); -} -</script><td nowrap="nowrap" width="40" align="center"><a class="dida" href="faq-cvs.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br> - PDF</a></td> -</tr> -</table> -<a name="N10007"></a><a name="Questions"></a> -<h3>Questions</h3> -<div style="margin-left: 0 ; border: 2px"> -<ol> -<li> -<a name="faq-N10006-menu"></a><a href="#faq-N10006"> - How do I use the most recent CVS copy of the Cocoon code on my local system? - </a> -</li> -</ol> -</div> -<a name="N10011"></a><a name="Answers"></a> -<h3>Answers</h3> -<div style="margin-left: 0 ; border: 2px"> -<a name="N10015"></a><a name="faq-N10006"></a> -<h4>1. - How do I use the most recent CVS copy of the Cocoon code on my local system? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - This is described as a - <a href="http://cocoon.apache.org/community/contrib.html#cvshowto">CVS Usage Precis</a> on the - Contribution page. It also explains how to get branches other than the - current HEAD branch. - </p> -</div> -</div> -<div class="attribution"></div> -</div> -</td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"></td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <!--================= end Content==================--> </table> @@ -300,11 +245,14 @@ <!--================= start Footer ==================--> <table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> -<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td> +<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a></td> </tr> <tr> -<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright © - 1999-2004 The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!-- +<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif"><a href="http://www.apache.org/licenses/"> + Copyright © 1999-2005 + The Apache Software Foundation.</a> + All rights reserved. + <script type="text/javascript" language="JavaScript"><!-- document.write(" - "+"Last Published: " + document.lastModified); // --></script></font></td> </tr> Modified: cocoon/site/site/2.1/faq/faq-databases.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/faq/faq-databases.html?view=diff&r1=159368&r2=159369 ============================================================================== --- cocoon/site/site/2.1/faq/faq-databases.html (original) +++ cocoon/site/site/2.1/faq/faq-databases.html Tue Mar 29 05:47:29 2005 @@ -2,14 +2,18 @@ <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>Database FAQs</title> +<meta content="Apache Forrest" name="Generator"> +<meta name="Forrest-version" content="0.6"> +<meta name="Forrest-skin-name" content="forrest-site"> +<title></title> <link type="text/css" href="../skin/page.css" rel="stylesheet"> +<link rel="shortcut icon" href="../"> </head> <body text="#000000" bgcolor="#FFFFFF"> <!--================= start Navigation Path ==================--> <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> -<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> +<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><a href="http://www.apache.org/">apache</a> > <a href="http://cocoon.apache.org/">cocoon</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> </tr> <tr> <td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" src="../skin/images/spacer.gif" class="spacer"></td> @@ -20,9 +24,9 @@ <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <!--================= start Group Logo ==================--> -<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> +<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> <!--================= end Group Logo ==================--> -<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif"></a></td> +<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif" title="Apache Cocoon"></a></td> <!--================= end Project Logo ==================--> <!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563"> <form target="_blank" action="http://www.google.com/search" method="get"> @@ -31,13 +35,13 @@ <td colspan="3"><img height="10" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> -<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="sitesearch" type="hidden"><input size="15" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> +<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="as_sitesearch" type="hidden"><input size="15" name="as_q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> <br> <font face="Arial, Helvetica, Sans-serif" size="2" color="white"> - the Apache Cocoon site - - - </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> + the Apache Cocoon site + + + </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td><img alt="" border="0" height="10" width="9" src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" height="10" width="9" src="../skin/images/search-right.gif"></td> @@ -45,7 +49,7 @@ </table> </form> </td> -<!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<!--================= end Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td valign="bottom" bgcolor="#294563" colspan="2"> @@ -64,10 +68,10 @@ </table> </div> <!--================= end Tabs ==================--> -</td><td bgcolor="#294563"><img alt="" width="1" height="1" src="../skin/images/spacer.gif" class="spacer"></td> +</td><td bgcolor="#294563"></td> </tr> <tr> -<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td height="10" bgcolor="#4C6C8F" colspan="4"></td> </tr> </table> <!--================= end Banner ==================--> @@ -230,186 +234,7 @@ <!--================= end middle NavBar ==================--> <!--================= start Content==================--> <tr> -<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"> -<div class="content"> -<table class="title" summary=""> -<tr> -<td valign="middle"> -<h1>Database FAQs</h1> -</td><script language="Javascript" type="text/javascript"> -function printit() { -if (window.print) { - window.print() ; -} else { - var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; -document.body.insertAdjacentHTML('beforeEnd', WebBrowser); - WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = ""; -} -} -</script><script language="Javascript" type="text/javascript"> -var NS = (navigator.appName == "Netscape"); -var VERSION = parseInt(navigator.appVersion); -if (VERSION > 3) { - document.write('<td nowrap="nowrap" width="40" align="center">'); - document.write(' <a class="dida" href="javascript:printit()">'); - document.write(' <img alt="Print this Page" src="../skin/images/printer.gif" class="skin"><br>'); - document.write(' print</a>'); - document.write('</td>'); -} -</script><td nowrap="nowrap" width="40" align="center"><a class="dida" href="faq-databases.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br> - PDF</a></td> -</tr> -</table> -<a name="N10007"></a><a name="Questions"></a> -<h3>Questions</h3> -<div style="margin-left: 0 ; border: 2px"> -<ol> -<li> -<a name="faq-N10006-menu"></a><a href="#faq-N10006"> - When I try to use the Connection pooling code, I get the following exception: - "Could not get the datasource java.sql.SQLException: You cannot - get a Poolable before the pool is initialized". What's going on? - </a> -</li> -<li> -<a name="faq-N10019-menu"></a><a href="#faq-N10019"> - The sql samples don't run. - </a> -</li> -<li> -<a name="faq-N1002C-menu"></a><a href="#faq-N1002C"> - I've been able to run the database samples, but they don't run anymore. - </a> -</li> -<li> -<a name="faq-N10041-menu"></a><a href="#faq-N10041"> - I get an AbstractMethodError when Cocoon tries to query my database. - </a> -</li> -<li> -<a name="faq-N10057-menu"></a><a href="#faq-N10057"> - Where can I find more information about connecting to databases using Cocoon? - </a> -</li> -</ol> -</div> -<a name="N10025"></a><a name="Answers"></a> -<h3>Answers</h3> -<div style="margin-left: 0 ; border: 2px"> -<a name="N10029"></a><a name="faq-N10006"></a> -<h4>1. - When I try to use the Connection pooling code, I get the following exception: - "Could not get the datasource java.sql.SQLException: You cannot - get a Poolable before the pool is initialized". What's going on? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - The most common reason for this exception is that the driver was not loaded. - Cocoon uses an initial parameter in the "web.xml" file to automatically load - classes on startup. This way, the class is loaded only once and the server's - time is spent doing more productive things. Make sure the following entry - is in your "web.xml" file. - </p> -<pre class="code"> -<init-param> - <param-name>load-class</param-name> - <param-value> - <!-- comma or whitespace separated list of fully - qualified class names to load on startup. - --> - oracle.jdbc.driver.OracleDriver - </param-value> -</init-param> -</pre> -<p> - If the class is loaded correctly, and you are still getting this error, then there - is probably an error in your connection information. The SQLException - above is thrown when there are no open connections to the database. - </p> -</div> -<a name="N10039"></a><a name="faq-N10019"></a> -<h4>2. - The sql samples don't run. - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - The sql samples are working when deploing the war file using the build - system:</p> -<pre class="code"> -./build.sh \ - -Dinstall.war=path/to/tomcat/webapps install -</pre> -<p> - This command will take care of the path inside the configuration file to the database resources. - </p> -</div> -<a name="N10049"></a><a name="faq-N1002C"></a> -<h4>3. - I've been able to run the database samples, but they don't run anymore. - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - This happens when the servlet engine has been stopped abruptly (e.g. with ctrl-C). - </p> -<p> - Hsqldb - the database used by C2 samples - is a single-process engine that - locks the database by setting the "modified" entry in - "WEB-INF/db/cocoondb.properties" to the value "yes" while some JDBC - connections exist. - </p> -<p> - With connection pooling, there's always some connections opened, and they're - not closed properly when you stop abruptly the servlet engine, so the database - stays in locked state and connections are refused at the next server startup. - </p> -<p> - To unlock the database, change manually "modified" to "no" in the "cocoondb.properties" - before restarting the server. - </p> -</div> -<a name="N1005A"></a><a name="faq-N10041"></a> -<h4>4. - I get an AbstractMethodError when Cocoon tries to query my database. - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - In this case Cocoon returns a "500 internal error" result, and the - AbstractMethodError is visible in the tomcat logs after a call to - Connection.prepareStatement(...). - </p> -<p> - This happens when the JDBC driver being used does not implement the - JDBC 1.2 interfaces: using its default configuration, the SQLTransformer - calls a version of the JDBC Connection.prepareStatement(...) method that is not - available in pre-1.2 drivers. - </p> -<p> - To avoid this problem, configure the SQLTransformer with "old-driver=true" in the - sitemap, as shown in this example: - </p> -<pre class="code"> - <map:transformer - logger="sitemap.transformer.sql" - name="sql" - src="org.apache.cocoon.transformation.SQLTransformer" - > - <old-driver>true</old-driver> - </map:transformer> - </pre> -</div> -<a name="N1006D"></a><a name="faq-N10057"></a> -<h4>5. - Where can I find more information about connecting to databases using Cocoon? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> -Learn more about connecting to databases by downloading the free chapter, <a href="http://www.newriders.com/books/product.asp?product_id={C3C05052-BE3B-4E06-A60A-13FB40AF58F6}">A User's Look at the Cocoon architecture,</a> from Langham and Ziegeler's <em>Cocoon: Building XML Applications</em> available at the New Riders web site. - </p> -</div> -</div> -<div class="attribution"></div> -</div> -</td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"></td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <!--================= end Content==================--> </table> @@ -420,11 +245,14 @@ <!--================= start Footer ==================--> <table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> -<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td> +<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a></td> </tr> <tr> -<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright © - 1999-2004 The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!-- +<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif"><a href="http://www.apache.org/licenses/"> + Copyright © 1999-2005 + The Apache Software Foundation.</a> + All rights reserved. + <script type="text/javascript" language="JavaScript"><!-- document.write(" - "+"Last Published: " + document.lastModified); // --></script></font></td> </tr> Modified: cocoon/site/site/2.1/faq/faq-debugging.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/faq/faq-debugging.html?view=diff&r1=159368&r2=159369 ============================================================================== --- cocoon/site/site/2.1/faq/faq-debugging.html (original) +++ cocoon/site/site/2.1/faq/faq-debugging.html Tue Mar 29 05:47:29 2005 @@ -2,14 +2,18 @@ <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>Debugging FAQs</title> +<meta content="Apache Forrest" name="Generator"> +<meta name="Forrest-version" content="0.6"> +<meta name="Forrest-skin-name" content="forrest-site"> +<title></title> <link type="text/css" href="../skin/page.css" rel="stylesheet"> +<link rel="shortcut icon" href="../"> </head> <body text="#000000" bgcolor="#FFFFFF"> <!--================= start Navigation Path ==================--> <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> -<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> +<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><a href="http://www.apache.org/">apache</a> > <a href="http://cocoon.apache.org/">cocoon</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> </tr> <tr> <td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" src="../skin/images/spacer.gif" class="spacer"></td> @@ -20,9 +24,9 @@ <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <!--================= start Group Logo ==================--> -<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> +<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> <!--================= end Group Logo ==================--> -<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif"></a></td> +<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif" title="Apache Cocoon"></a></td> <!--================= end Project Logo ==================--> <!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563"> <form target="_blank" action="http://www.google.com/search" method="get"> @@ -31,13 +35,13 @@ <td colspan="3"><img height="10" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> -<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="sitesearch" type="hidden"><input size="15" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> +<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="as_sitesearch" type="hidden"><input size="15" name="as_q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> <br> <font face="Arial, Helvetica, Sans-serif" size="2" color="white"> - the Apache Cocoon site - - - </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> + the Apache Cocoon site + + + </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td><img alt="" border="0" height="10" width="9" src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" height="10" width="9" src="../skin/images/search-right.gif"></td> @@ -45,7 +49,7 @@ </table> </form> </td> -<!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<!--================= end Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td valign="bottom" bgcolor="#294563" colspan="2"> @@ -64,10 +68,10 @@ </table> </div> <!--================= end Tabs ==================--> -</td><td bgcolor="#294563"><img alt="" width="1" height="1" src="../skin/images/spacer.gif" class="spacer"></td> +</td><td bgcolor="#294563"></td> </tr> <tr> -<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td height="10" bgcolor="#4C6C8F" colspan="4"></td> </tr> </table> <!--================= end Banner ==================--> @@ -230,170 +234,7 @@ <!--================= end middle NavBar ==================--> <!--================= start Content==================--> <tr> -<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"> -<div class="content"> -<table class="title" summary=""> -<tr> -<td valign="middle"> -<h1>Debugging FAQs</h1> -</td><script language="Javascript" type="text/javascript"> -function printit() { -if (window.print) { - window.print() ; -} else { - var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; -document.body.insertAdjacentHTML('beforeEnd', WebBrowser); - WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = ""; -} -} -</script><script language="Javascript" type="text/javascript"> -var NS = (navigator.appName == "Netscape"); -var VERSION = parseInt(navigator.appVersion); -if (VERSION > 3) { - document.write('<td nowrap="nowrap" width="40" align="center">'); - document.write(' <a class="dida" href="javascript:printit()">'); - document.write(' <img alt="Print this Page" src="../skin/images/printer.gif" class="skin"><br>'); - document.write(' print</a>'); - document.write('</td>'); -} -</script><td nowrap="nowrap" width="40" align="center"><a class="dida" href="faq-debugging.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br> - PDF</a></td> -</tr> -</table> -<a name="N10007"></a><a name="Questions"></a> -<h3>Questions</h3> -<div style="margin-left: 0 ; border: 2px"> -<ol> -<li> -<a name="faq-N10006-menu"></a><a href="#faq-N10006">How do I debug Cocoon using JDK1.3+?</a> -</li> -<li> -<a name="faq-N1008C-menu"></a><a href="#faq-N1008C"> - Now that I have prepared Tomcat and my IDE for debugging: How do I debug? - </a> -</li> -</ol> -</div> -<a name="N10016"></a><a name="Answers"></a> -<h3>Answers</h3> -<div style="margin-left: 0 ; border: 2px"> -<a name="N1001A"></a><a name="faq-N10006"></a> -<h4>1. How do I debug Cocoon using JDK1.3+?</h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - With JDK1.3 or above, first set the <span class="codefrag">CATALINA_OPTS</span> (for - Tomcat 4.x as shown below (on Win2K). - </p> -<pre class="code"> -set CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE - -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -</pre> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> - For Tomcat 3.x the param is TOMCAT_OPTS and the first value is - <span class="codefrag">-classic</span> instead of <span class="codefrag">-server</span>. - </div> -</div> -<p> - Add it to the <span class="codefrag">catalina.bat</span>, that can be found in - <span class="codefrag">%TOMCAT_HOME%\bin\</span>, right after the first <span class="codefrag">rem</span> - section. - <br> - The same information in more detail can be found at - <a href="http://jakarta.apache.org/site/idedev-rdtomcat.html">Setting - up Tomcat for Remote Debugging</a>. - </p> -<p> - The problem of this approach is the blocking of using Tomcat in another - mode. You always have to touch <span class="codefrag">catalina.bat</span> again when - changing the mode and this file is really a batch beast, isn't it? - Furthermore <span class="codefrag">catalina.bat</span> is only a starting mode library - and should not be touched by hand IMO.<br> - Let me propose my approach: Go to the last line of - <span class="codefrag">startup.bat</span> where <span class="codefrag">catalina.bat</span> is called. - Replace - </p> -<pre class="code">call "%EXECUTABLE%" start %CMD_LINE_ARGS%</pre> -<p>with</p> -<pre class="code"> -set JPDA_TRANSPORT=dt_socket -set JPDA_ADDRESS=8000 -call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS% - </pre> -<p> - A switch can now be done by adding and removing <span class="codefrag">jpda</span>. You - can also place the old line in comments and switch between them. Or you - copy <span class="codefrag">startup.bat</span> to <span class="codefrag">debug.bat</span> and do the - changes there. - </p> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> - Note that Tomcat must be started using <span class="codefrag">startup.bat</span> in order - to set these values; if you are using - "<span class="codefrag">java.exe -jar ...bootstrap.jar start</span>" or anything similar to - start Tomcat, you have to set the <span class="codefrag">CATALINA_OPTS</span> on the - commandline or for Windows in general. - </div> -</div> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> - If you use Jetty included with Cocoon 2.1 it's much easier. Instead of - doing "<span class="codefrag">cocoon.bat servlet</span>" you simply call - "<span class="codefrag">cocoon.bat servlet-debug</span>". - </div> -</div> -<p> - After having started Tomcat or the servlet container of your choice in - remote debugging mode, attach the debugger to localhost:8000 using - "<span class="codefrag">jdb -attach myhost:8000</span>". If you get an error - "<span class="codefrag">Error accessing shared memory, rc = -1</span>", try - "<span class="codefrag">jdb -connect com.sun.jdi.SocketAttach:port=8000</span>" instead. - <br> - More information on this can be found in the - <a href="http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html"> - JPDA documentation</a>. - </p> -<div class="frame note"> -<div class="label">Note</div> -<div class="content"> - The attaching of the debugger to that port can be done very easily in - almost all modern IDEs as Eclipse, IDEA, NetBeans or JBuilder. Mostly - port <span class="codefrag">8000</span> and <span class="codefrag">dt_socket</span> are preselected. - </div> -</div> -</div> -<a name="N1009F"></a><a name="faq-N1008C"></a> -<h4>2. - Now that I have prepared Tomcat and my IDE for debugging: How do I debug? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p> - Of course we can not give to many details here as it might be different - for all the possible IDEs out there, but the general proceeding should - be the same. The following steps are for jdb, it should be much easier - for the IDEs.<br> - 1. Set a breakpoint in a class via - "<span class="codefrag">stop in org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.checkPipeline</span>". - <br> - 2. Enter a URL in your browser to get Cocoon to do the stuff that needs - debugging. When your breakpoint is hit, you'll get the message in jdb: - <br> - -<span class="codefrag">Breakpoint hit: "thread=Thread-11", - org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.checkPipeline(), - line=363 bci=0</span>. - <br> - 3. Use the debugger commands "print", "next", and "cont" to examine the - data and step through the code. - </p> -</div> -</div> -<div class="attribution"></div> -</div> -</td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"></td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <!--================= end Content==================--> </table> @@ -404,11 +245,14 @@ <!--================= start Footer ==================--> <table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> -<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td> +<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a></td> </tr> <tr> -<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright © - 1999-2004 The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!-- +<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif"><a href="http://www.apache.org/licenses/"> + Copyright © 1999-2005 + The Apache Software Foundation.</a> + All rights reserved. + <script type="text/javascript" language="JavaScript"><!-- document.write(" - "+"Last Published: " + document.lastModified); // --></script></font></td> </tr> Modified: cocoon/site/site/2.1/faq/faq-generators.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/faq/faq-generators.html?view=diff&r1=159368&r2=159369 ============================================================================== --- cocoon/site/site/2.1/faq/faq-generators.html (original) +++ cocoon/site/site/2.1/faq/faq-generators.html Tue Mar 29 05:47:29 2005 @@ -2,14 +2,18 @@ <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>Cocoon Sitemap Generator FAQs</title> +<meta content="Apache Forrest" name="Generator"> +<meta name="Forrest-version" content="0.6"> +<meta name="Forrest-skin-name" content="forrest-site"> +<title></title> <link type="text/css" href="../skin/page.css" rel="stylesheet"> +<link rel="shortcut icon" href="../"> </head> <body text="#000000" bgcolor="#FFFFFF"> <!--================= start Navigation Path ==================--> <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> -<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> +<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><a href="http://www.apache.org/">apache</a> > <a href="http://cocoon.apache.org/">cocoon</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td> </tr> <tr> <td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" src="../skin/images/spacer.gif" class="spacer"></td> @@ -20,9 +24,9 @@ <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <!--================= start Group Logo ==================--> -<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> +<td bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/cocoon-project-logo.png"></a></td> <!--================= end Group Logo ==================--> -<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img border="0" class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif"></a></td> +<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://cocoon.apache.org/"><img class="logoImage" alt="Apache Cocoon" src="../images/project-logo.gif" title="Apache Cocoon"></a></td> <!--================= end Project Logo ==================--> <!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563"> <form target="_blank" action="http://www.google.com/search" method="get"> @@ -31,13 +35,13 @@ <td colspan="3"><img height="10" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> -<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="sitesearch" type="hidden"><input size="15" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> +<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="cocoon.apache.org" name="as_sitesearch" type="hidden"><input size="15" name="as_q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit"> <br> <font face="Arial, Helvetica, Sans-serif" size="2" color="white"> - the Apache Cocoon site - - - </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> + the Apache Cocoon site + + + </font></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td><img alt="" border="0" height="10" width="9" src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" height="10" width="9" src="../skin/images/search-right.gif"></td> @@ -45,7 +49,7 @@ </table> </form> </td> -<!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<!--================= end Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td valign="bottom" bgcolor="#294563" colspan="2"> @@ -64,10 +68,10 @@ </table> </div> <!--================= end Tabs ==================--> -</td><td bgcolor="#294563"><img alt="" width="1" height="1" src="../skin/images/spacer.gif" class="spacer"></td> +</td><td bgcolor="#294563"></td> </tr> <tr> -<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td height="10" bgcolor="#4C6C8F" colspan="4"></td> </tr> </table> <!--================= end Banner ==================--> @@ -230,132 +234,7 @@ <!--================= end middle NavBar ==================--> <!--================= start Content==================--> <tr> -<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"> -<div class="content"> -<table class="title" summary=""> -<tr> -<td valign="middle"> -<h1>Cocoon Sitemap Generator FAQs</h1> -</td><script language="Javascript" type="text/javascript"> -function printit() { -if (window.print) { - window.print() ; -} else { - var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; -document.body.insertAdjacentHTML('beforeEnd', WebBrowser); - WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = ""; -} -} -</script><script language="Javascript" type="text/javascript"> -var NS = (navigator.appName == "Netscape"); -var VERSION = parseInt(navigator.appVersion); -if (VERSION > 3) { - document.write('<td nowrap="nowrap" width="40" align="center">'); - document.write(' <a class="dida" href="javascript:printit()">'); - document.write(' <img alt="Print this Page" src="../skin/images/printer.gif" class="skin"><br>'); - document.write(' print</a>'); - document.write('</td>'); -} -</script><td nowrap="nowrap" width="40" align="center"><a class="dida" href="faq-generators.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br> - PDF</a></td> -</tr> -</table> -<a name="N10007"></a><a name="Questions"></a> -<h3>Questions</h3> -<div style="margin-left: 0 ; border: 2px"> -<ol> -<li> -<a name="faq-N10006-menu"></a><a href="#faq-N10006"> - What is a generator? - </a> -</li> -<li> -<a name="faq-N10020-menu"></a><a href="#faq-N10020"> - How can I write my own generator? - </a> -</li> -<li> -<a name="faq-N10030-menu"></a><a href="#faq-N10030"> - How can I dynamically specify the source for my generator? - </a> -</li> -</ol> -</div> -<a name="N1001B"></a><a name="Answers"></a> -<h3>Answers</h3> -<div style="margin-left: 0 ; border: 2px"> -<a name="N1001F"></a><a name="faq-N10006"></a> -<h4>1. - What is a generator? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p>A generator is the starting point of an xml pipeline. It generates XML content as SAX events and initializes pipeline processing. Every pipeline match containing a generator must be terminated by a serializer. - </p> -<p> -In the sitemap file, each generator has a unique name which is mapped to a java class. One generator name must be declared as the default generator. Each generator may have additional configuration information specified in child elements. - </p> -<p> -For conceptual information on generators see the user's guide document <a href="../userdocs/concepts/sitemap.html">The Sitemap</a>. For detailed descriptions about all of the available Cocoon generators, see the user's guide document <a href="../userdocs/concepts/sitemap.html">Generators in Cocoon</a>. You may also wish to consult the Cocoon API documentation. - </p> -</div> -<a name="N10035"></a><a name="faq-N10020"></a> -<h4>2. - How can I write my own generator? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p>See the tutorial <a href="../tutorial/tutorial-rmi-generator.html">Writing a Cocoon 2 generator</a>. - </p> -</div> -<a name="N10041"></a><a name="faq-N10030"></a> -<h4>3. - How can I dynamically specify the source for my generator? - </h4> -<div style="margin-left: 0 ; border: 2px"> -<p>For example, I want the <generate>'s src attribute to be defined based on a request. - </p> -<p> -Here are two solutions (depending on your version of Cocoon): - </p> -<p> -(1) RequestParamAction (2.0.x + 2.1) - </p> -<pre class="code"> - <map:match pattern="tba/*"> - <map:act type="request"> - <map:parameter name="parameters" value="true"/> - <map:generate src="{page}"/> - <map:transform src="docs/samples/tba/redirect.xsl"/> - <map:serialize type="html"/> - </map:act> - <!-- else ? --> - </map:match> -</pre> -<p> -Adding <map:act type="request"> and -<map:parameter name="parameters" value="true"/> makes it -possible to get the page request attribute. -Then, you can define the src attribute by using the value of the page attribute -like this: <map:generate src="{page}"/>. - </p> -<p> -(2) InputModules (2.1) - </p> -<pre class="code"> - <map:match pattern="tba/*"> - <map:generate src="{request:page}"/> - <map:transform src="docs/samples/tba/redirect.xsl"/> - <map:serialize type="html"/> - </map:match> -</pre> -<p> -In addition, you may want to use ResourceExistsAction to check whether -the provided page exists. - </p> -</div> -</div> -<div class="attribution"></div> -</div> -</td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> +<td align="left" width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%"></td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <!--================= end Content==================--> </table> @@ -366,11 +245,14 @@ <!--================= start Footer ==================--> <table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> -<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td> +<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"><a href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a href="../skin/images/chapter.gif"></a><a href="../skin/images/chapter_open.gif"></a><a href="../skin/images/current.gif"></a></td> </tr> <tr> -<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright © - 1999-2004 The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!-- +<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif"><a href="http://www.apache.org/licenses/"> + Copyright © 1999-2005 + The Apache Software Foundation.</a> + All rights reserved. + <script type="text/javascript" language="JavaScript"><!-- document.write(" - "+"Last Published: " + document.lastModified); // --></script></font></td> </tr>