Hammad, Perhaps this will help...
In your test_jsp1.jsp file, set a query string or hidden variable called 'action' to something like 'testFormActionHandler' (i.e. <form name="form1" method="post" action="/jetspeed/portal?action=testFormActionHandler" />". Note that there are other ways (likely more proper) to enter the 'action' string for a form, but basically it doesn't need to call anything but it's current location as Jetspeed knows where you are anyway and unless otherwise redirected, sends you there. In your classes directory of org.apache.jetspeed.modules.actions (or whatever package you define as scribed in TurbineResources.properties file under 'Module Packages') create a class called 'myFormSubmitAction.class' that extends 'Action'. All it need consist of is a 'public void oPerform( RunData data ) throws Exception' method. This method can access the request, session context and all kinds of other data via the RunData object. Look at some of the jetspeed source files for reference (i.e. 'org.apache.jetspeed.modules.actions.CreateNewUserAndConfirm.java'). When the action parameter is set, the servlet looks in the modules action class location for a class named after the action. It attempts to run the doPeform after which processing is passed back to the template that called that action handler class. ~sidd -----Original Message----- From: Hammad Sophie [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 11:27 PM To: Jetspeed User Group Subject: need some help with JSP Portlets Hello Jetspeed users: Has anyone developed a portlet which uses multiple jsp files. one calling the other? I was trying to write a test JSP portlet which calls another jsp file. I wasn't able to understand what to put in the 'action' element in the form. I tried using the taglibs provided with jetspeed but it doesn't seem to work.... Jetspeed picks up the portlet entry from my local-portlets.xreg file, i.e. I can see it in the list of available portlets and I can add it without problem to my portal. However when I run it i get a blank page on my browser. The address it goes to is: http://localhost:8080/jetspeed/portal/template/html%2Fjsp1.jsp xreg file: <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"/> <media-type ref="html"/> </portlet-entry> My jsp files: file name: test1_jsp.jsp located in: <jetspeed-home>/WEB-INF/templates/jsp/portlets/html ------------ <%@ 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:link template="html/jsp1.jsp" />" > <!--WHAT GOES HERE??? //--> <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> ------the file it is calling is: jsp1.jsp located in the same folder as above. -------------- <html> <body bgcolor="#FFFFFF" text="#000000"> Hello! </body> </html> On another note, an example such as converting the number guessing jsp included with tomcat to a JSPportlet would be more helpful than the simplistic hello world jspportlet included with jetspeed.... :( BTW, has anyone tried doing that???? Thanks for your help. I really appreciate it. Hammad. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
