[jboss-user] [Beginners Corner] - Re: Creating a Portal from JSP Pages

PeterJ do-not-reply at jboss.com
Mon Nov 20 11:47:55 EST 2006


1) I don't know if a standard war layout, but here is what mine looks like:

./WEB-INF/classes/com/xxx/ImagePortlet.class
  | ./WEB-INF/classes/com/xxx/ImageBean.class
  | ./WEB-INF/classes/com/xxx/message.properties
  | ./WEB-INF/lib/standard-1.1.2.jar
  | ./WEB-INF/jsp/help.jsp
  | ./WEB-INF/jsp/edit.jsp
  | ./WEB-INF/jsp/view.jsp
  | ./WEB-INF/jboss-app.xml
  | ./WEB-INF/image-object.xml
  | ./WEB-INF/web.xml
  | ./WEB-INF/portlet-instances.xml
  | ./WEB-INF/portlet.xml

In my portlet doView code, I access the view jsp as follows:

  protected void doView(RenderRequest request,
  |       RenderResponse response) throws PortletException, IOException{
  |     . . .
  |     PortletRequestDispatcher prd =
  |       getPortletContext().getRequestDispatcher("WEB-INF/jsp/view.jsp");
  |     prd.include(request, response);
  |   }


2) No.  I never use the protlet tags in my JSPs, only the standard tags.  You need the portlet tags only if you plan to generate URLs within the JSP itself.  In my case, I generate the URL within my portlet code and pass it out to the JSP using a bean.

3) The Manning sandbox contains a draft manuscript on portals and portlets by Hepper etal (http://www.manning.com/hepper/). You must register to enter the sandbox but registration is free. It helped me, and the price was right. It has a more complete JSP example.



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

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



More information about the jboss-user mailing list