You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Sonia Jorge <so...@teleline.es> on 2002/05/02 19:03:32 UTC

JSP PORTLET with FORM help me

I'm trying to do this JSP example found in one "jetspeed users mailing list"
mail, but i'm not able to make it work, this is de code of the files i use.
The problem is that jsp1.jsp doesn't appear when clicking the submit button.

I don't know what it's wrong.
I have test_jsp1.jsp
jetspeed/WEB-INF/templates/jsp/portlets/html folder.
jsp1.jsp under
jetspeed/WEB-INF/templates/jsp/screens/html folder
And EjemploJsp.class under
jetspeed/WEB-INF/classes/com/company/actions
folder.
I have added in the TurbineResources.properties the following lines:
module.packages=com.company
module.packages=com.company.actions


File: test_jsp1.jsp
------------------

<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed'%>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="<jetspeed:dynamicUri/>"
enctype="application/x-www-form-urlencoded" >
<input name="action" type="hidden" value="EjemploJsp">

 <!--WHAT GOES HERE??? '<file:'// -->
<table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Enter any number:</td>
<td>
<input type="text" name="number">
</td>
<td>
<input type="submit" name="Submit" value="Submit">
</td>
</tr>
</table>
</form>
</body>
</html>



File:jsp1.jsp
--------------

<html>
<body bgcolor="#FFFFFF" text="#000000">
Hello!
</body>
</html>

File:demo_portlets.xreg entry
------------------------------

<portlet-entry name="Test JSP" hidden="false" type="ref" parent="JSP"
application="false">
<meta-info>
<title>Test JSP</title>
<description>Our Test JSP #1</description>
</meta-info>
<parameter name="template" value="test_jsp1.jsp" hidden="false"/>
<parameter name="action" value="portlets.EjemploJsp" hidden="false"/>
<media-type ref="html"/>
</portlet-entry>





File:Ejemplo_Jsp.java
-----------------------

package com.company.actions;

//Java
//Jetspeed
import org.apache.jetspeed.portal.portlets.*;
import org.apache.jetspeed.portal.PortletConfig;

//Turbine
import org.apache.turbine.modules.Action;
import org.apache.turbine.modules.ActionLoader;
import org.apache.turbine.util.RunData;

public class EjemploJsp extends Action{

 public void doPerform(RunData data) throws Exception
 {
  data.setScreenTemplate("jsp1");
 }


}


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>