cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject RE: C2 Newbie: XSP Logicsheet in sitemap ?
Date Mon, 04 Feb 2002 14:48:40 GMT
Vadim

I have tried this:

	<!-- Derek Test Logicsheet -->
	<builtin-logicsheet>
		<parameter name="prefix" value="greeting"/>
		<parameter name="uri"
value="http://duke.edu/tutorial/greeting"/>
		<parameter name="href"
value="resource://derek/logicsheet.greeting.xsl"/>
		<!-- resource is: WEB-INF/classes/ -->
	</builtin-logicsheet>

inserted in the cocoon.xconf and the XSL file placed in the relevant
subdirectory of WEB-INF . Shutdown and restarted.

I still get the:
java.lang.IllegalAccessError: try to access method 
org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.addLogicsheetToList
(Lorg/apache/cocoon/components/language/markup/AbstractMarkupLanguage
$LanguageDescriptor;Ljava/lang/String;Lorg/apache/cocoon/environment/SourceResolver;)V
from class 
org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage
$XSPTransformerChainBuilderFilter

Do I need to change anything else in the sitemap or the calling
files??

Eg. if I delete the :
<xsp:logicsheet location="derek1/logic/logicsheet.greeting.xsl"/>
from the calling file, then I get "The requested resource (Not Found)
is not available." error.

Thanks
Derek

>>> vadim.gritsenko@verizon.net 04/02/2002 03:29:53 >>>
To get rif of IllegalAccessError: You will need CVS version of Cocoon,
*or* you can register logicsheet in the cocoon.xconf instead of
pointing
to it from the XSP file (I don't imply, it is one of the
possibilities).

Releveant piece of cocoon.xconf looks like:

<builtin-logicsheet>
 <parameter name="prefix" value="action"/>
 <parameter name="uri" value="http://apache.org/cocoon/action/1.0"/>
 <parameter name="href"
value="resource://org/apache/cocoon/components/language/markup/xsp/java/
action.xsl"/>
</builtin-logicsheet>

Your entry could look like:

<builtin-logicsheet>
 <parameter name="prefix" value="hello"/>
 <parameter name="uri" value="........."/>
 <parameter name="href" value="resource://my/logichseet.xsl"/>
 </builtin-logicsheet>

Then logichseet.xsl should go into WEB-INF/classes/my/logichseet.xsl


Regards,
Vadim

> From: Derek Hohls [mailto:DHohls@csir.co.za] 
> 
> Vadim
> 
> Still no luck with your samples....
> 
> First:  which URL to use to call the XSP page? When I try
> http://localhost:8080/cocoon/xsp/logicsheet-test 
> 
> it simply gives me an error, with root cause:
> 
> java.lang.IllegalAccessError: try to access method
>
org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.addL
ogicsh
>
eetToList(Lorg/apache/cocoon/components/language/markup/AbstractMarkupLa
nguage
>
$LanguageDescriptor;Ljava/lang/String;Lorg/apache/cocoon/environment/Sou
rceRes
> olver;)V
> from class
>
org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage$XSPTr
ansfor
> merChainBuilderFilter
> 
> 
> Second - you seem to imply that some additional change is
> needed to the xconf file - where and what changes are these??
> 
> 
> Thanks
> Derek
> 
> 
> 
> >>> vadim.gritsenko@verizon.net 03/02/2002 11:53:16 >>>
> > From: Derek Hohls [mailto:dhohls@csir.co.za] 
> >
> > Vadim
> > Thanks for clarifications.
> 
> Welcome!
> 
> > Sample code I was referring to is in the XSP Logicsheet section of
> the
> > online manual:
> > http://xml.apache.org/cocoon/userdocs/xsp/logicsheet.html 
> > and especially the section "Using Logicsheets (Taglibs)"
> > (as in the various 'greeting' samples that, as I said, do not work
> under
> > C2- maybe a hangover from C1)
> 
> I see... Yes, this is leftovers from C1. Especially this:
> 
>   <?cocoon-process type="xsp"?>
> 
> and this:
> 
> processor.xsp.logicsheet.greeting.java
>   = file:///cocoon/logicsheets/logicsheet.greeting.xsl
> 
> First is replaced by sitemap entry, <map:generate type="serverpages"
> src="..."/>, and second is configured via cocoon.xconf, find XSP
> logicsheets section in there.
> 
> Otherwise, these samples should work in C2 also.
> 
> Regards,
> Vadim
> 
> > Derek
> >
> >
> > D Hohls
> > CSIR Environmentek
> > PO Box 17001
> > Kwa-Zulu Natal
> > South Africa
> > 4013
> >
> >
> > >>> vadim.gritsenko@verizon.net 02/03/02 19:51 PM >>>
> > Derek,
> >
> > > From: Derek Hohls [mailto:dhohls@csir.co.za] 
> > >
> > > Vadim
> > >
> > > Thanks for the sample code - both of these look quite a bit more
> > > complicated than the samples in the XSP Logicsheet, but I will
> work
> > > through them to try and understand both the grammar and logic.
> >
> > Ahem... I have not seen the sample code - so no comments on this
> one...
> > Where it is, btw?
> >
> >
> > > Please excuse my ignorance, but I am still unclear as to how
these
> are
> > > actually *used*.  Is there also a simple.xml file that has has
> tags
> > that
> > > 'call' these sheets?
> >
> > logicsheet-test.xsp *is* the XSP page which uses hello logicsheet
> > (logicsheet.xsl).
> >
> >
> > >  Can I use the original example?
> >
> > Which one? What file you are talking about?
> >
> >
> > > Also, what does
> > > the sitemap pipeline be that will enable these files to actually
> be
> > > processed by Cocoon?
> >
> > Sitemap pipeline provided in the sample Cocoon webapp will work
for
> this
> > example, if you place files in the docs/samples/xsp directory.
> Pipeline
> > is:
> >
> >    <map:match pattern="xsp/*">
> >     <map:generate type="serverpages"
> src="docs/samples/xsp/{1}.xsp"/>
> >     <map:transform src="stylesheets/dynamic-page2html.xsl">
> >         <map:parameter name="view-source"
> > value="docs/samples/xsp/{1}.xsp"/>
> >     <!--
> >        Run-time configuration is done through these
> >        <map:parameter/> elements. Again, let's have a look at the
> >        javadocs:
> >
> >        "[...] All <map:parameter> declarations will be made
> >        available in the XSLT stylesheet as xsl:variables. [...]"
> >     -->
> >     </map:transform>
> >     <map:serialize/>
> >    </map:match>
> >
> >
> > Vadim


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message