Ad. 2) I'm not sure if I understand your question well. You can simply use  and 
access most of portlet objects from JSP. 
You can also pass your objects to jsp within a session or using 
RenderRequest.setAttribute (set object in portlet and get in jsp/servlet).

Ad. 3) You can do such thing if you extend JBossPortlet (instead of 
GenericPortlet). You pass method name which should be invoked in action phase 
as request parameter - default param name is "op" but it can be changed by 
overwriting .getDefaultOperation() method

Generally some more advenced stuff can be used when you extend JBossPortlet 
instead of GenericPortlet.

Look at ForumsPortlet class in forums module in portal sources. 
You can easily pass things into jsp using custom taglib.

 For example you do:

1) in portlet you fill DelegateContext object with your data - which have 
nested structure
2) you dispatch with passing DelegateContext to JSP like:

req.setAttribute(PortalJsp.CTX_REQUEST, delegateContextObject);
PortletRequestDispatcher rd = getPortletContext()
  .getRequestDispatcher("yourJSPFile.jsp");

3) In your JSP you can use a set of tags to get data from DelegateContext 
object like:

<n:if/>
<n:include/>
<n:iterate/>

all of those are implemented in org.jboss.portal.core.servlet.jsp.taglib.* 
package

If you want to investigate it more just analize ForumsPortlet doView() method. 
RolePortlet and UserPortlet uses this stuff as well






View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956758#3956758

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956758


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to