[jboss-user] [JBoss Portal] - help: same class file for 2 portlets

Sonal K. do-not-reply at jboss.com
Tue May 29 05:24:20 EDT 2007


Hello everyone,
  I am developing a JSF portlet application. In that in portlet.xml file, I m same portlet-class for both the portlets.

Portlet.xml-->

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
             version="1.0">
   
      <portlet-name>HelloWorldJSFPortlet</portlet-name>
      <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
      <init-param>
         default-view
         /WEB-INF/jsp/image_dd2.jsp
      </init-param>
      
         <mime-type>text/html</mime-type>
         <portlet-mode>VIEW</portlet-mode>
      
      <portlet-info>
         HelloWorld JSF Portlet
      </portlet-info>
   
   
         <portlet-name>ImagePortlet</portlet-name>
         <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
         <init-param>
            default-view
            /WEB-INF/jsp/image_dd.jsp
         </init-param>
         
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
         
         <portlet-info>
            Image Portlet
         </portlet-info>
   
</portlet-app>

This is how my portlet.xml is. Here 2 instances are getting created, but both the portlet windows are referring to same jsp file and the window names are also same. Why is this happening? Is it bcoz I m giving same class file for both the JSP's??
Thanks in advance.
 

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

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



More information about the jboss-user mailing list