You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Angelo Immediata <an...@libero.it> on 2005/09/25 10:31:00 UTC

Some question about cocoon portal

Hi all; i'm using Cocoon 2.1.7 JDK 1.4.2_07 & 1.4.2_08, JBoss 3.2.6 and tomcat 5.
I'm using cocoon portal block.
I need to use a search engine in the portal i'm building; for what i know about search engine like Lucene they must indicize all pages; now since in cocoon portal it's used an event technology and since at a certain URL (like portal?cocoon-portal-event=23) not always there is the same page, this meansthat i can'tuse this search engine... now if i want to avoid this fact, how can i do?

Moreover i have seen that under the event technology the cocoon cform continuation doesn't work very well since sometimes the continuation.previous doesn't go to the previous page, but if i use the application in a cocoon environment without cocoon portal all works very good. How can i avoid this?

Another thing.... when i use the htmlarea for conserving data in DB when i take these data in the page i have the html tag like <p> or <br>, well in rder to solve this i used before this function:

function stringToSAX( str, consumer, ignoreRootElement, propertyName ) {
 	var is = new Packages.org.xml.sax.InputSource( new java.io.StringReader( str ) );
 	var ignore = ( ignoreRootElement == "true" );
 	var parser = null;
 	var includeConsumer = new org.apache.cocoon.xml.IncludeXMLConsumer( consumer, consumer );
 	includeConsumer.setIgnoreRootElement( true );
 	try {
 		parser = cocoon.getComponent( Packages.org.apache.excalibur.xml.sax.SAXParser.ROLE );
 		parser.parse( is, includeConsumer );
 	} catch (x) {
		var errorString = "<div id=\"messageDIV\"><p id=\"error\">ERRORE!! dato non conforme "+
			"alle specifiche <a title=\"collegamento al sito xhtml1.0\" href=\"http://www.w3.org\" target=\"_blank\"><img src=\"xhtml.gif\"/></a></p></div>";
		var isError = new Packages.org.xml.sax.InputSource( new java.io.StringReader( errorString ) );
		log.error("stringToSAX... property <"+propertyName+"> was malformed!");
		saxerInfo = "false";
 		parser.parse( isError, includeConsumer );
 	} 
 	finally {
 		if ( parser != null ) cocoon.releaseComponent( parser );
 	}
}


Well if i use it under cocoon-portal block it doesn't work; there is a NullPointerException since there is a component that under the portal is null(i don't remeber what it is since i debug it a lot of time ago). Is there anybody that solved this fact?

Thanks to all and sorry for all these question.
Regards,
   Angelo


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


Re: Some question about cocoon portal

Posted by Florian Leinberger <le...@seitenbau.com>.
Hi,

> I'm using cocoon portal block.
> I need to use a search engine in the portal i'm building; for what i know
about search engine like Lucene they
> must indicize all pages; now since in cocoon portal it's used an event
technology and since at a certain URL
> (like portal?cocoon-portal-event=23) not always there is the same page, this
meansthat i can'tuse this
> search engine... now if i want to avoid this fact, how can i do?
 
We are using the Portal Block together with Lucene and it works fine. What you
can do is not to use the normale Portal-View for the Crawler but another special
View/Pipeline that gives the crawler access to the content in an optimal form to
be indicized. In regard to the URIs, you don't need to present the Search
Results with the same Links as they were crawled
(portal?cocoon-portal-event=23). Just make sure that the real URI under which
each page is reachable in the Portal is in the indicised XML. Then use this real
URI to present the Links of your search results (i.e. portal?pageid=375).

Gruss, Florian


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