Hello Cameron,
Thanks for your quick reply.
Deployed ImageDisplayPortlet.war and it clicked
, After searching & adding, i cul see the image.
But the HelloWorld is still not working. javascript: x()
Confused
Message: ----------------
Cannot create Portlet instance com.examscam.portlet.HelloWorldPortlet for Portlet Application HelloWorld
-----------------
I checked for the .class file, package is correct and .class file is also there. This is how it looks;
-------------------------------------------
package com.examscam.portlet;
import java.io.IOException;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
public class HelloWorldPortlet extends GenericPortlet {
protected void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
// TODO Auto-generated method stub
response.setContentType("text/html");
response.getWriter().println("Hello
World!!");
}
}
-------------------------
portlet.xml
------------------------- <?xml version="1.0" encoding="UTF-8"?>
<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0" 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" id="BasicPortlets.413e4e0df0"><portlet>
<portlet-name>HelloWorld</portlet-name>
<display-name>HelloWorld portlet</display-name>
<display-name xml:lang="en">HelloWorld portlet</display-name>
<portlet-class>
com.examscam.portlet.HelloWorldPortlet
</portlet-class>
<init-param>
<name>wps.markup</name>
<value>html</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<resource-bundle>
com.examscam.portlet.nl.HelloWorldPortletResource
</resource-bundle>
<portlet-info>
<title>HelloWorld portlet</title>
</portlet-info>
</portlet>
</portlet-app>
-------------------------
web.xml
------------------------- <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_ID">
<display-name>BasicPortlets</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<taglib id="PortletTLD">
<taglib-uri>
http://java.sun.com/portlet</taglib-uri> <taglib-location>/WEB-INF/tld/std-portlet.tld</taglib-location>
</taglib>
</web-app>
------------
I dont have std-portlet.tld file.
Waiting for your reply.
Thanks,