Hi,

Your action class should be in a module package named sth. like
com.yourcompany.portal.modules.actions.HelloWorldAction.
Then you should specify your module in Turbine.properties, by adding the
line

#add my module package for the jsp actions
module.packages=com.youcompany.portal.modules

Then change your registry and specify only your action class' name :

<parameter name="action" hidden="true"
value="HelloWorldAction"/>

Now it should work.

I hope this helps. Have fun with Jetspeed !

Pierre

> -----Original Message-----
> From: Ronald Wildenberg [mailto:[EMAIL PROTECTED]]
> Sent: lundi, 17. f�vrier 2003 16:50
> To: Jetspeed User List (E-mail)
> Subject: Can't get action working
> 
> 
> 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]
> 

Reply via email to