Hi,
I'm just starting with Jetspeed and still have to figure out
a lot, so I have a simple question (I think :).
I have a JSP template and an action, but the action does not
seem to be called and I do not understand why not. In the JSP,
I try to print the value of a request parameter that should have
been set in the action. The only thing it prints is null.
This is probably just a very small thing but what am I doing
wrong??
Thanks in advance,
Ronald Wildenberg.
The JSP template:
[code]
<%@ taglib prefix='jetspeed' uri='/WEB-INF/templates/jsp/tld/template.tld'
%>
<%
String jspeid = (String) request.getAttribute("js_peid");
%>
<b>Hello World (<%= jspeid %>)</b>
<br></br>
<div id="randomNumber" align="left">
<%= request.getAttribute("randomNumber") %>
</div>
[/code]
The action:
[code]
public class HelloWorldAction extends JspPortletAction {
protected void buildNormalContext(Portlet portlet, RunData rundata)
throws Exception
{
rundata.getRequest()
.setAttribute("randomNumber",
new Integer(new
java.util.Random().nextInt(1000)));
}
}
[/code]
The registry entry:
[code]
<portlet-entry name="HelloWorld" hidden="false" type="ref"
parent="JSP" application="false">
<meta-info>
<title>HelloWorld</title>
<description>Simple HelloWorld JSP template.</description>
</meta-info>
<parameter name="template" hidden="true" value="helloWorld.jsp"/>
<parameter name="action" hidden="true"
value="com.company.jetspeed.portal.portlets.HelloWorldAction"/>
<media-type ref="html"/>
<category>idp</category>
</portlet-entry>
[/code]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]