Hi again,

i am having trouble getting a test portlet (velocity) to work. The portlet doesn't show up in the "Add Portlet" menu.

I don't see anything problematic in the logs:


gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$ grep -i helloWorld log/*
log/jetspeedservices.log:2004-02-09 18:27:29,557 [http8080-Processor21] DEBUG CastorRegistryService - RegistryService: Adding entry pripeHelloWorld of class class org.apache.jetspeed.om.registry.base.BasePortletEntry to registry Registry
log/jetspeedservices.log:2004-02-09 18:27:29,959 [Thread-221] DEBUG CastorRegistryService - RegistryService: No changes to entry pripeHelloWorld



The xreg-file:



gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$ cat conf/pripeHelloWorld.xreg
<?xml version="1.0" encoding="UTF-8"?>
<registry>
<portlet-entry name="pripeHelloWorld" hidden="false" type="ref"
parent="Velocity" application="false">
<meta-info>
<title>PRiPE Hello World</title>
<description>Minimales Velocity-Portlet</description>
</meta-info>
<classname>org.apache.jetspeed.portal.portlets.VelocityPortlet</ classname>
<parameter name="template" value="pripeHelloWorld" hidden="true"
cachedOnName="true" cachedOnValue="true"/>
<parameter name="action" value="portlets.HelloworldAction"
hidden="true" cachedOnName="true" cachedOnValue="true"/>
<parameter name="test" value="Bla-bla-bla." hidden="true"
cachedOnName="true" cachedOnValue="true"/>
<url cachedOnURL="true"/>
<category group="Jetspeed">PRiPE</category>
</portlet-entry>
</registry>



The vm-file:



gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$ cat templates/vm/portlets/html/pripeHelloWorld.vm
<b>Test</b><br><br>


Blah, blubb, bloing.<br>


The class file resides in classes/de/upb/zit/pripe/jetspeed/modules/actions/portlets (conf/TurbineResources.properties is updated: module.packages=de.upb.zit.pripe.jetspeed.modules). The corresponding java source:



gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$ cat src/de/upb/zit/pripe/jetspeed/modules/actions/portlets/ HelloWorldAction.java
/*
* Created on 09.02.2004
*
* To change the template for this generated file go to
* Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
*/
package de.upb.zit.pripe.jetspeed.modules.actions.portlets;


import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
import org.apache.jetspeed.portal.portlets.VelocityPortlet;
import org.apache.turbine.util.RunData;
import org.apache.velocity.context.Context;


/**
 * @author wizard
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class HelloWorldAction extends VelocityPortletAction {

protected void buildNormalContext(VelocityPortlet portlet, Context context, RunData rundata) {

                //String test = "Blaaaaaaaa";
                //context.put("test", test);

}


}



Does anyone know what i'm missing?



-------------------------------



Besides that, i have another velocity portlet, also not working, where the logs say:


log/jetspeedservices.log:2004-02-09 18:32:30,503 [Thread-221] DEBUG CastorRegistryService - RegistryService: Skipping fragment /java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF/conf/ velocityExample.xreg


Don't know what's going on here, too. The xreg-file:



gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$ cat conf/pripeVelocityExample.xreg
<?xml version="1.0" encoding="UTF-8"?>
<registry>
<portlet-entry name="pripeVelocityExample" hidden="false" type="ref"
parent="Velocity" application="false">
<meta-info>
<title>PRiPE Velocity Example</title>
<description>Mal schauen obs klappt...</description>
</meta-info>
<classname>org.apache.jetspeed.portal.portlets.VelocityPortlet</ classname>
<parameter name="template" value="pripeVelocityExample"
hidden="true" cachedOnName="true" cachedOnValue="true"/>
<parameter name="action" value="portlets.VelocityExampleAction"
hidden="true" cachedOnName="true" cachedOnValue="true"/>
<parameter name="testVar" value="Test-Test. 1-2-3. pust"
hidden="false" cachedOnName="true" cachedOnValue="true">
<meta-info>
<title>Kleiner Test-Text-String</title>
<description>Eigentlich total unwichtig</description>
</meta-info>
</parameter>
<parameter name="textString" value="HalloDoofeWelt"
hidden="false" cachedOnName="true" cachedOnValue="true">
<meta-info>
<title>Text-String</title>
<description>Nur so als kleiner Test...</description>
</meta-info>
</parameter>
<parameter name="ldapList" value="o=upb,c=de" hidden="false"
cachedOnName="true" cachedOnValue="true">
<meta-info>
<title>LDAP Search Base</title>
<description>Welcher Teil des LDAP-Baums soll durchsucht werden</description>
</meta-info>
</parameter>
<url cachedOnURL="true"/>
<category group="Jetspeed">PRiPE</category>
</portlet-entry>
</registry>



Is the error in the xreg-file itself, or could it be that the class file or whatever is causing this strange log message?



Am fighting with this darn portlets all afternoon. If anyone can help me save the day, that would be great! :-)



Bela


--
"Der Blitzableiter auf einem Kirchturm ist das denkbar stärkste Misstrauensvotum gegen den lieben Gott."
-- Karl Kraus


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to