You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by Nguyen Viet Trieu <jv...@yahoo.com> on 2005/05/07 06:03:12 UTC

problem when modify testsuite

Hi,
I have tested two portlets in testsuite example. But
when i tried to deploy first portlet in chapter 02
from apress.com i met problem:

SEVERE : Error in Portlet
java.lang.NullPointerException
	at
org.apache.pluto.portalimpl.om.servlet.impl.ServletDefinitionImpl.getRequestDispatcher
		(ServletDefintionimpl.java:118)
..........
I want to run two portlet. The Portlet in left hand is
the one in testsuite. The Portlet in right hand is my
portlet.
when i run link
http://localhost:8080/viettrieu/portalvt/ and clicked
Test link in left hand the portlet
which belongs to testsuite was fine. But in the right
hand my portlet had error : 

Error occurred in portlet!

here is my conf. files : 
portlet.xml :
<portlet>
        	<description>First Portlet for the Apress
Portlet book by Jeff Linwood and David
Minter.</description>
		
        	<portlet-name>PortletTrieu</portlet-name>
		
        	<display-name>First Portlet</display-name>
		
        
<portlet-class>com.portalbook.portlets.FirstPortlet</portlet-class>

        	<expiration-cache>-1</expiration-cache>
		        
        	<supports>
			<mime-type>text/html</mime-type>
			<portlet-mode>VIEW</portlet-mode>
		</supports>

		<portlet-info>
			<title>First Portlet</title>
			<short-title>1st Portlet</short-title>
			<keywords>First, Portlet</keywords>
		</portlet-info>
	</portlet>

web.xml :
<web-app>
    <display-name>Pluto Testsuite</display-name>
    <context-param>
        <param-name>parameter-name</param-name>
        <param-value>parameter-value</param-value>
    </context-param>
    <context-param>
        <param-name>test-parameter-name</param-name>
        <param-value>test-parameter-val</param-value>
    </context-param>
    <servlet>
        <servlet-name>PortletTrieu</servlet-name>
        <display-name>TestPortlet2
Wrapper</display-name>
        <description>Automated generated Portlet
Wrapper</description>
       
<servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
        <init-param>
            <param-name>portlet-guid</param-name>
           
<param-value>trieu.PortletTrieu</param-value>
        </init-param>
        <init-param>
            <param-name>portlet-class</param-name>
           
<param-value>com.portalbook.portlets.FirstPortlet</param-value>
        </init-param>
        <security-role-ref>
            <role-name>plutoTestRole</role-name>
            <role-link>tomcat</role-link>
        </security-role-ref>
    </servlet>
    <taglib>
       
<taglib-uri>http://java.sun.com/portlet</taglib-uri>
       
<taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>
    </taglib>
    <security-role>
        <role-name>tomcat</role-name>
    </security-role>
</web-app>

portletentityregistry.xml :
<portlet-entity-registry>
    <application id="4">
        <definition-id>trieu</definition-id>
        <portlet id="1">
           
<definition-id>trieu.PortletTrieu</definition-id>
            <preferences>
                <pref-name>TestName4</pref-name>
                <pref-value>TestValue4</pref-value>
                <read-only>true</read-only>
            </preferences>
			<preferences>
                <pref-name>TEST</pref-name>
                <pref-value>TEST_VALUE</pref-value>
                <pref-value>ANOTHER</pref-value>
                <read-only>false</read-only>
            </preferences>
        </portlet>
    </application>
    <application id="3">
        <definition-id>testsuite</definition-id>
        <portlet id="1">
           
<definition-id>testsuite.TestPortlet1</definition-id>
            <preferences>
                <pref-name>TestName4</pref-name>
                <pref-value>TestValue4</pref-value>
                <read-only>true</read-only>
            </preferences>
        </portlet>
    </application>
</portlet-entity-registry>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
</html>
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com