[jboss-user] [Beginners Corner] - Re: error when used JBossPortlet instead of GenricPortlet

je.a.le do-not-reply at jboss.com
Wed May 14 09:14:29 EDT 2008


Just had the same error and found the answer.

It's because you do not overide the right doview method :-) (public!=protected); you just add a new one... 
beside it seem the default for JBossPortlet.doView is to send a PortletException (when geneiric do nothing...)

btw which portlet container do you use ? with jbossportal you don't have to include additional jar to your war/ear (with netbean library->properties-> uncheck package :-) )

sample :

  | public class MenuPortlet extends JBossPortlet {
  |     protected void doView(JBossRenderRequest request, JBossRenderResponse response) throws PortletException, PortletSecurityException, IOException {
  | 	System.out.println(">>>>> ok doview");
  | 	response.setContentType("text/html");
  | 	PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/Menu_view.jsp");
  | 	dispatcher.include(request, response);
  |     }
  | }
  | 
check your portlet.xml for correct mode ; here i only use view

A+


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

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



More information about the jboss-user mailing list