Hi!
I'm trying to run a portlet which uses velocity templates. I have
deployed portlet and everything seems to be fine, but on page where i
have placed my app i see only header without any content below. Jetspeed
doesn't report any exceptions or errors. I don't what's wrong, I'd be
extremely grateful for all helpful hints.
regards,
adam
This is my portlet:
public class VelocityTest extends GenericVelocityPortlet {
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
Context context = getContext(request);
context.put("test", new String("test text"));
super.doView(request, response);
}
}
portlet description:
<portlet id="velo">
<init-param>
<description>This parameter sets the template used in view
mode.</description>
<name>ViewPage</name>
<value>/WEB-INF/view/view.vm</value>
</init-param>
<portlet-name>velo</portlet-name>
<display-name>velocity</display-name>
<description>velo Portlet test</description>
<portlet-class>VelocityTest</portlet-class>
<expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<resource-bundle/>
<portlet-info>
<title>Velocity hello world</title>
<short-title>velo</short-title>
<keywords>Velocity hello</keywords>
</portlet-info>
</portlet>
web.xml:
<web-app>
<display-name>velocity</display-name>
<description>velocity example</description>
<!-- Define Velocity Servlet -->
<servlet>
<servlet-name>velocity</servlet-name>
<servlet-class>org.apache.portals.bridges.velocity.BridgesVelocityViewServlet</servlet-class>
<init-param>
<param-name>org.apache.velocity.toolbox</param-name>
<param-value>/WEB-INF/velocity/toolbox.xml</param-value>
</init-param>
<init-param>
<param-name>org.apache.velocity.properties</param-name>
<param-value>/WEB-INF/velocity/velocity.properties</param-value>
</init-param>
<load-on-startup>10</load-on-startup>
</servlet>
<!-- Map *.vm files to Velocity -->
<servlet-mapping>
<servlet-name>velocity</servlet-name>
<url-pattern>*.vm</url-pattern>
</servlet-mapping>
</web-app>
and this is the content of view.vm:
$test
<img src="http://portals.apache.org/images/apache-portals.gif" alt="aa" />
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]