You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Russell Castagnaro <ru...@castagnaro.com> on 2001/09/29 10:17:15 UTC

Using Cocoon2 in an EJB

Hello cocoon-users,

  Hi I'm trying to use Cocoon2 inside an ejb (The esql taglib) in
  cocoon1 I used the SQLProcessor.  Any hints on how I might do this?

  I've got a string (or reader) that has the XML but I'm not sure how
  to procede with Cocoon2.

  No HTTPRequests or anything like that..

  Thanks

-- 
Best regards,
 Russell                          mailto:russell@castagnaro.com


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


html out of a db (Cocoon 1.8.1, Tomcat, Postgresql)

Posted by Schroeter Christian <Ch...@nbg.sbs.de>.
Hi,

i want to read out of my database the content of my html-pages.

unfortunatly every < and > are replaced by &lt; anf &gt;

So the browser is printing the html code and not interpreting it.

Can anybody help me?
What must i change?

cu,
christian schroeter 


My sourcecode:

XML-File
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet type="text/xsl" href="OK.xsl"?>
<xsp:page
   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
   xmlns:esql="http://apache.org/cocoon/SQL/v2"
   xmlns:request="http://www.apache.org/1999/XSP/Request">
<page>
....
<esql:connection>
               <esql:pool>drm</esql:pool>
                  <esql:execute-query>
                     <esql:query>
                        select * from html
                     </esql:query>
                     <esql:results>
                        <esql:row-results>
                              <html><esql:get-string column="html"/></html>
                              <xhtml><esql:get-xml column="html"/></xhtml>
                        </esql:row-results>
                     </esql:results>
                     <esql:error-results>
                        <error>
                           <ort>selectHTML</ort>
                           <message>
                              <esql:get-message/>
                           </message>
                        </error>
                     </esql:error-results>
                  </esql:execute-query>
            </esql:connection>	
...
</page>
</xsp:page>

XSL-File:

<?xml version="1.0"?>
<xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:util="http:://www.apache.org/1999/XSP/Util"
   xmlns:xsp="http://www.apache.org/1999/XSP/Core" version="1.0">
   <xsl:template match="/page">
	<html>
	<body>
		<xsl:value-of select="html"/>
		<xsl:value-of select="xhtml"/>
	</body>
	</html>
   </xsl:template>

<

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Using Cocoon2 in an EJB

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
Hi!

> Hello cocoon-users,
>
>   Hi I'm trying to use Cocoon2 inside an ejb (The esql taglib) in
>   cocoon1 I used the SQLProcessor.  Any hints on how I might do this?
>
>   I've got a string (or reader) that has the XML but I'm not sure how
>   to procede with Cocoon2.
>
>   No HTTPRequests or anything like that..

You should implement an EJBEnvironment to be able to run C2 inside an ejb.
See org.apache.cocoon.environment.* classes and packages as a start point.
In command-line interface you also has no HTTPRequests, but there are
wrappers for them, so, I hope, something like that is possible with EJB too.

Regards,
    Konstantin Piroumian

>
>   Thanks
>
> --
> Best regards,
>  Russell                          mailto:russell@castagnaro.com
>



---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>