You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by aps olute <ap...@yahoo.com> on 2002/10/03 08:57:41 UTC
Usage of cocoo://
Couple of snippet code i'd like to get clarification
<map:match pattern="**/*.html">
<map:generate src="cocoon:/{1}/index.xml"/> this
means
to look for another matcher with pattern of
**/index.xml on this sitemap.xmap correct?
<map:transform src="cocoon:/xsl-source"/>
similarly for this, it searches the xsl-source
pattern?
but these following with two "/" what are they
matching for? since there are no
pattern="/samples/sub/xsl-source" in the sitemap.
<map:transform src="cocoon://samples/sub/xsl-source"/>
<map:part src="cocoon://samples/sub/get/simple.xsp"/>
<map:part
src="cocoon://samples/sub1z/get/simple.xsp"/>
More sample codes with variation is sorely needed for
us newbies.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Usage of cocoo://
Posted by Joerg Heinicke <jo...@gmx.de>.
The match is searched in the root sitemap.
http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html (in the
middle of the page in "Aggregating" all pseudo protocols are described)
Regards,
Joerg
aps olute wrote:
> Couple of snippet code i'd like to get clarification
>
> <map:match pattern="**/*.html">
> <map:generate src="cocoon:/{1}/index.xml"/> this
> means
> to look for another matcher with pattern of
> **/index.xml on this sitemap.xmap correct?
>
> <map:transform src="cocoon:/xsl-source"/>
> similarly for this, it searches the xsl-source
> pattern?
>
>
> but these following with two "/" what are they
> matching for? since there are no
> pattern="/samples/sub/xsl-source" in the sitemap.
>
> <map:transform src="cocoon://samples/sub/xsl-source"/>
>
> <map:part src="cocoon://samples/sub/get/simple.xsp"/>
> <map:part
> src="cocoon://samples/sub1z/get/simple.xsp"/>
>
> More sample codes with variation is sorely needed for
> us newbies.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: multiple webapps sharing XSPs
Posted by Vadim Gritsenko <va...@verizon.net>.
Ryan Agler wrote:
>Can a guru out there give me a hand?
>
The problem with loggin comes from the fact that in your setup
org.apache.log classes are loaded once and shared among contexts, and
from the fact that logging uses some static methods/variables. Example
(from CocoonServlet):
final Logger logger =
Hierarchy.getDefaultHierarchy().getLoggerFor("");
Thus, all instances will share same instance of the log -> all instances
will write to same log file.
Cannot comment on XSP problem right now. But try latest 2.0.4-dev
version: it has one patch for XSP reloading problem.
Vadim
>I recently installed Tomcat 4.1.12 with the latest Cocoon CVS. I have 4
>Cocoon webapps which share the cocoon jars, are all in
>$TOMCAT_HOME/shared/lib. When I fire up Tomcat, the webapps get
>initialized and the normal log files appear under each one's
>WEB-INF/logs.
>
>It starts getting crazy here -- All 4 webapps seem to write their logs
>to ONE of the webpps' WEB-INF/logs when I start accessing pages. On top
>of that, say webapp1 has a page called "test.xsp". I access "test.xsp",
>it compiles just fine and the .class file appears in $TOMCAT_HOME/work,
>etc. However, if the sitemap for webapp2 matches "test.xsp", the page
>from webapp1 gets pulled from webapp1's cache and used!? No .class file
>gets compiled for webapp2, unless I explicitly go in and "touch"
>webapp2's test.xsp so cocoon thinks it has been modified.
>
>I found that this only happens if the cocoon jars are shared (i.e. in
>$TOMCAT_HOME/shared/lib), as opposed to each webapp having copies of the
>jars in WEB-INF/lib. I have made the usual precautions of deleting the
>work directory before starting Tomcat each time.
>
>I suspect this has something to do with contexts? I say that because
>the log files for all 4 webapps are all being written to a single
>${context-root} (from logkit.xconf). Here is a snippet from my
>server.xml if you can see anything wrong:
>
><Host name="www.domain1.com" debug="0" appBase="webapps"
>unpackWARs="true">
> <Context path="" docBase="webapp1" debug="0"/>
> <Realm className="org.apache.catalina.realm.MemoryRealm"
>pathname="webapps/webapp1/users.xml" />
></Host>
>
><Host name="www.domain2.com" debug="0" appBase="webapps"
>unpackWARs="true">
> <Context path="" docBase="webapp2" debug="0"/>
> <Realm className="org.apache.catalina.realm.MemoryRealm"
>pathname="webapps/webapp2/users.xml" />
></Host>
>
>Thanks much,
>Ryan Agler
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
multiple webapps sharing XSPs
Posted by Ryan Agler <ry...@hotmail.com>.
Can a guru out there give me a hand?
I recently installed Tomcat 4.1.12 with the latest Cocoon CVS. I have 4
Cocoon webapps which share the cocoon jars, are all in
$TOMCAT_HOME/shared/lib. When I fire up Tomcat, the webapps get
initialized and the normal log files appear under each one's
WEB-INF/logs.
It starts getting crazy here -- All 4 webapps seem to write their logs
to ONE of the webpps' WEB-INF/logs when I start accessing pages. On top
of that, say webapp1 has a page called "test.xsp". I access "test.xsp",
it compiles just fine and the .class file appears in $TOMCAT_HOME/work,
etc. However, if the sitemap for webapp2 matches "test.xsp", the page
from webapp1 gets pulled from webapp1's cache and used!? No .class file
gets compiled for webapp2, unless I explicitly go in and "touch"
webapp2's test.xsp so cocoon thinks it has been modified.
I found that this only happens if the cocoon jars are shared (i.e. in
$TOMCAT_HOME/shared/lib), as opposed to each webapp having copies of the
jars in WEB-INF/lib. I have made the usual precautions of deleting the
work directory before starting Tomcat each time.
I suspect this has something to do with contexts? I say that because
the log files for all 4 webapps are all being written to a single
${context-root} (from logkit.xconf). Here is a snippet from my
server.xml if you can see anything wrong:
<Host name="www.domain1.com" debug="0" appBase="webapps"
unpackWARs="true">
<Context path="" docBase="webapp1" debug="0"/>
<Realm className="org.apache.catalina.realm.MemoryRealm"
pathname="webapps/webapp1/users.xml" />
</Host>
<Host name="www.domain2.com" debug="0" appBase="webapps"
unpackWARs="true">
<Context path="" docBase="webapp2" debug="0"/>
<Realm className="org.apache.catalina.realm.MemoryRealm"
pathname="webapps/webapp2/users.xml" />
</Host>
Thanks much,
Ryan Agler
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>