You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Dan Mihaila <da...@gmail.com> on 2006/07/15 15:22:52 UTC
Simplest example error
Hello,
I tried to deploy the simplest example that I found on the jespeed site
and I encounter an error. I tried another example and I received the
same problem:
Cannot create Portlet instance HelloWorld for Portlet Application
helloworld
And I don't know what to do. I browsed all over the web and i didn't
find anything that helped me. So I write to you.
I attached the little project.
I don't know if you can download the attach and i paste you the file here:
helloworld.psml
<?xml version="1.0" encoding="UTF-8"?>
<page>
<defaults
skin="orange"
layout-decorator="tigris"
portlet-decorator="tigris"
/>
<title>Daca nici acum nu merge atunci...o sa ....</title>
<metadata name="title" xml:lang="fr">La plus simple portlet du
monde</metadata>
<fragment id="helloworld" type="layout"
name="jetspeed-layouts::VelocityTwoColumns">
<fragment id="ident-10" type="portlet" name="helloworld::helloworld">
<property layout="TwoColumns" name="row" value="0" />
<property layout="TwoColumns" name="column" value="0" />
</fragment>
</fragment>
<security-constraints>
<security-constraints-ref>public-view</security-constraints-ref>
</security-constraints>
</page>
*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>
<description xml:lang="*en*">Hello World</description>
<portlet-name>helloworld</portlet-name>
<display-name xml:lang="*en*">HelloWorld</display-name>
<portlet-class>HelloWorld</portlet-class>
<expiration-cache>60</expiration-cache>
- <#> <supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
- <#> <portlet-info>
<title>Hello World</title>
<short-title>Hello</short-title>
<keywords>Hello World</keywords>
</portlet-info>
</portlet>
- <#> <user-attribute>
<description xml:lang="*en*">User Name</description>
<name>user.name</name>
</user-attribute>
- <#> <user-attribute>
<description xml:lang="*en*">User Full Name</description>
<name>user.name.full</name>
</user-attribute>
- <#> <user-attribute>
<description xml:lang="*en*">User E-Mail</description>
<name>user.email</name>
</user-attribute>
- <#> <user-attribute>
<description xml:lang="*en*">User Organization</description>
<name>user.organization</name>
</user-attribute>
- <#> <user-attribute>
<description xml:lang="*en*">User Timezone</description>
<name>user.timezone</name>
</user-attribute>
- <#> <user-attribute>
<description xml:lang="*en*">User Preferred Locale</description>
<name>user.locale</name>
</user-attribute>
</portlet-app>
*web.xml*
<?xml version="1.0" ?>
<!DOCTYPE web-app/ (View Source for full doctype...)/>
- <#> <web-app>
<display-name>Hello World Example</display-name>
- <#> <servlet>
<servlet-name>helloworld</servlet-name>
<display-name>Hello World</display-name>
<description>Simple Hello World</description>
<servlet-class>HelloWorld</servlet-class>
</servlet>
- <#> <servlet-mapping>
<servlet-name>helloworld</servlet-name>
<url-pattern>/helloworld/*</url-pattern>
</servlet-mapping>
</web-app>
HelloWorld.java
import javax.portlet.GenericPortlet;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.PortletException;
import java.io.PrintWriter;
import java.io.IOException;
/** * a simple HelloWorld Portlet */
public class HelloWorld extends GenericPortlet {
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
response.setContentType("text/html");
response.getWriter().println("A very simple portlet.");
}
}
Thank you very much for your time!
Dan Mihaila
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Simplest example error
Posted by Philip Mark Donaghy <ph...@gmail.com>.
Hi Dan it is always helpful to let us know which version of Jetspeed your using.
Thanks, Philip
On 7/15/06, Dan Mihaila <da...@gmail.com> wrote:
> Hello,
> I tried to deploy the simplest example that I found on the jespeed site
> and I encounter an error. I tried another example and I received the
> same problem:
> Cannot create Portlet instance HelloWorld for Portlet Application
> helloworld
> And I don't know what to do. I browsed all over the web and i didn't
> find anything that helped me. So I write to you.
> I attached the little project.
> I don't know if you can download the attach and i paste you the file here:
> helloworld.psml
> <?xml version="1.0" encoding="UTF-8"?>
> <page>
> <defaults
> skin="orange"
> layout-decorator="tigris"
> portlet-decorator="tigris"
> />
> <title>Daca nici acum nu merge atunci...o sa ....</title>
> <metadata name="title" xml:lang="fr">La plus simple portlet du
> monde</metadata>
>
> <fragment id="helloworld" type="layout"
> name="jetspeed-layouts::VelocityTwoColumns">
> <fragment id="ident-10" type="portlet" name="helloworld::helloworld">
> <property layout="TwoColumns" name="row" value="0" />
> <property layout="TwoColumns" name="column" value="0" />
> </fragment>
> </fragment>
>
> <security-constraints>
> <security-constraints-ref>public-view</security-constraints-ref>
> </security-constraints>
> </page>
>
> *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>
> <description xml:lang="*en*">Hello World</description>
> <portlet-name>helloworld</portlet-name>
> <display-name xml:lang="*en*">HelloWorld</display-name>
> <portlet-class>HelloWorld</portlet-class>
> <expiration-cache>60</expiration-cache>
> - <#> <supports>
> <mime-type>text/html</mime-type>
> <portlet-mode>view</portlet-mode>
> </supports>
> <supported-locale>en</supported-locale>
> - <#> <portlet-info>
> <title>Hello World</title>
> <short-title>Hello</short-title>
> <keywords>Hello World</keywords>
> </portlet-info>
> </portlet>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Name</description>
> <name>user.name</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Full Name</description>
> <name>user.name.full</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User E-Mail</description>
> <name>user.email</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Organization</description>
> <name>user.organization</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Timezone</description>
> <name>user.timezone</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Preferred Locale</description>
> <name>user.locale</name>
> </user-attribute>
> </portlet-app>
>
> *web.xml*
> <?xml version="1.0" ?>
> <!DOCTYPE web-app/ (View Source for full doctype...)/>
> - <#> <web-app>
> <display-name>Hello World Example</display-name>
> - <#> <servlet>
> <servlet-name>helloworld</servlet-name>
> <display-name>Hello World</display-name>
> <description>Simple Hello World</description>
> <servlet-class>HelloWorld</servlet-class>
> </servlet>
> - <#> <servlet-mapping>
> <servlet-name>helloworld</servlet-name>
> <url-pattern>/helloworld/*</url-pattern>
> </servlet-mapping>
> </web-app>
>
> HelloWorld.java
> import javax.portlet.GenericPortlet;
> import javax.portlet.RenderRequest;
> import javax.portlet.RenderResponse;
> import javax.portlet.PortletException;
> import java.io.PrintWriter;
> import java.io.IOException;
>
> /** * a simple HelloWorld Portlet */
> public class HelloWorld extends GenericPortlet {
>
> public void doView(RenderRequest request, RenderResponse response)
> throws PortletException, IOException
> {
> response.setContentType("text/html");
> response.getWriter().println("A very simple portlet.");
> }
>
> }
>
> Thank you very much for your time!
>
> Dan Mihaila
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
--
Philip Donaghy
donaghy.blogspot.com del.icio.us/donaghy/philip
Skype: philipmarkdonaghy
Office: +33 5 56 60 88 02
Mobile: +33 6 20 83 22 62
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Simplest example error
Posted by Dan Mihaila <da...@gmail.com>.
I use Jetspeed 2, and those chars were puts by my thunderbird (from the
paste operation). I figure out what was the problem(after 2 days and a
lot of mistakes): the structure of the application! It has to be:
WEB-INF/classes ,etc... When I "cleaned up" the root directory there was
no problem left! :)
Thanks for your time!
Dan
Philip Mark Donaghy wrote:
> Hi Dan, I don't know if this is intentional but your web.xml and
> portlet.xml have invalid text(- <#>) in them.
>
> Philip
>
> On 7/15/06, Dan Mihaila <da...@gmail.com> wrote:
>> Hello,
>> I tried to deploy the simplest example that I found on the jespeed site
>> and I encounter an error. I tried another example and I received the
>> same problem:
>> Cannot create Portlet instance HelloWorld for Portlet Application
>> helloworld
>> And I don't know what to do. I browsed all over the web and i didn't
>> find anything that helped me. So I write to you.
>> I attached the little project.
>> I don't know if you can download the attach and i paste you the file
>> here:
>> helloworld.psml
>> <?xml version="1.0" encoding="UTF-8"?>
>> <page>
>> <defaults
>> skin="orange"
>> layout-decorator="tigris"
>> portlet-decorator="tigris"
>> />
>> <title>Daca nici acum nu merge atunci...o sa ....</title>
>> <metadata name="title" xml:lang="fr">La plus simple portlet du
>> monde</metadata>
>>
>> <fragment id="helloworld" type="layout"
>> name="jetspeed-layouts::VelocityTwoColumns">
>> <fragment id="ident-10" type="portlet" name="helloworld::helloworld">
>> <property layout="TwoColumns" name="row" value="0" />
>> <property layout="TwoColumns" name="column" value="0" />
>> </fragment>
>> </fragment>
>>
>> <security-constraints>
>> <security-constraints-ref>public-view</security-constraints-ref>
>> </security-constraints>
>> </page>
>>
>> *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>
>> <description xml:lang="*en*">Hello World</description>
>> <portlet-name>helloworld</portlet-name>
>> <display-name xml:lang="*en*">HelloWorld</display-name>
>> <portlet-class>HelloWorld</portlet-class>
>> <expiration-cache>60</expiration-cache>
>> - <#> <supports>
>> <mime-type>text/html</mime-type>
>> <portlet-mode>view</portlet-mode>
>> </supports>
>> <supported-locale>en</supported-locale>
>> - <#> <portlet-info>
>> <title>Hello World</title>
>> <short-title>Hello</short-title>
>> <keywords>Hello World</keywords>
>> </portlet-info>
>> </portlet>
>> - <#> <user-attribute>
>> <description xml:lang="*en*">User Name</description>
>> <name>user.name</name>
>> </user-attribute>
>> - <#> <user-attribute>
>> <description xml:lang="*en*">User Full Name</description>
>> <name>user.name.full</name>
>> </user-attribute>
>> - <#> <user-attribute>
>> <description xml:lang="*en*">User E-Mail</description>
>> <name>user.email</name>
>> </user-attribute>
>> - <#> <user-attribute>
>> <description xml:lang="*en*">User Organization</description>
>> <name>user.organization</name>
>> </user-attribute>
>> - <#> <user-attribute>
>> <description xml:lang="*en*">User Timezone</description>
>> <name>user.timezone</name>
>> </user-attribute>
>> - <#> <user-attribute>
>> <description xml:lang="*en*">User Preferred Locale</description>
>> <name>user.locale</name>
>> </user-attribute>
>> </portlet-app>
>>
>> *web.xml*
>> <?xml version="1.0" ?>
>> <!DOCTYPE web-app/ (View Source for full doctype...)/>
>> - <#> <web-app>
>> <display-name>Hello World Example</display-name>
>> - <#> <servlet>
>> <servlet-name>helloworld</servlet-name>
>> <display-name>Hello World</display-name>
>> <description>Simple Hello World</description>
>> <servlet-class>HelloWorld</servlet-class>
>> </servlet>
>> - <#> <servlet-mapping>
>> <servlet-name>helloworld</servlet-name>
>> <url-pattern>/helloworld/*</url-pattern>
>> </servlet-mapping>
>> </web-app>
>>
>> HelloWorld.java
>> import javax.portlet.GenericPortlet;
>> import javax.portlet.RenderRequest;
>> import javax.portlet.RenderResponse;
>> import javax.portlet.PortletException;
>> import java.io.PrintWriter;
>> import java.io.IOException;
>>
>> /** * a simple HelloWorld Portlet */
>> public class HelloWorld extends GenericPortlet {
>>
>> public void doView(RenderRequest request, RenderResponse response)
>> throws PortletException, IOException
>> {
>> response.setContentType("text/html");
>> response.getWriter().println("A very simple portlet.");
>> }
>>
>> }
>>
>> Thank you very much for your time!
>>
>> Dan Mihaila
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Simplest example error
Posted by Philip Mark Donaghy <ph...@gmail.com>.
Hi Dan, I don't know if this is intentional but your web.xml and
portlet.xml have invalid text(- <#>) in them.
Philip
On 7/15/06, Dan Mihaila <da...@gmail.com> wrote:
> Hello,
> I tried to deploy the simplest example that I found on the jespeed site
> and I encounter an error. I tried another example and I received the
> same problem:
> Cannot create Portlet instance HelloWorld for Portlet Application
> helloworld
> And I don't know what to do. I browsed all over the web and i didn't
> find anything that helped me. So I write to you.
> I attached the little project.
> I don't know if you can download the attach and i paste you the file here:
> helloworld.psml
> <?xml version="1.0" encoding="UTF-8"?>
> <page>
> <defaults
> skin="orange"
> layout-decorator="tigris"
> portlet-decorator="tigris"
> />
> <title>Daca nici acum nu merge atunci...o sa ....</title>
> <metadata name="title" xml:lang="fr">La plus simple portlet du
> monde</metadata>
>
> <fragment id="helloworld" type="layout"
> name="jetspeed-layouts::VelocityTwoColumns">
> <fragment id="ident-10" type="portlet" name="helloworld::helloworld">
> <property layout="TwoColumns" name="row" value="0" />
> <property layout="TwoColumns" name="column" value="0" />
> </fragment>
> </fragment>
>
> <security-constraints>
> <security-constraints-ref>public-view</security-constraints-ref>
> </security-constraints>
> </page>
>
> *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>
> <description xml:lang="*en*">Hello World</description>
> <portlet-name>helloworld</portlet-name>
> <display-name xml:lang="*en*">HelloWorld</display-name>
> <portlet-class>HelloWorld</portlet-class>
> <expiration-cache>60</expiration-cache>
> - <#> <supports>
> <mime-type>text/html</mime-type>
> <portlet-mode>view</portlet-mode>
> </supports>
> <supported-locale>en</supported-locale>
> - <#> <portlet-info>
> <title>Hello World</title>
> <short-title>Hello</short-title>
> <keywords>Hello World</keywords>
> </portlet-info>
> </portlet>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Name</description>
> <name>user.name</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Full Name</description>
> <name>user.name.full</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User E-Mail</description>
> <name>user.email</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Organization</description>
> <name>user.organization</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Timezone</description>
> <name>user.timezone</name>
> </user-attribute>
> - <#> <user-attribute>
> <description xml:lang="*en*">User Preferred Locale</description>
> <name>user.locale</name>
> </user-attribute>
> </portlet-app>
>
> *web.xml*
> <?xml version="1.0" ?>
> <!DOCTYPE web-app/ (View Source for full doctype...)/>
> - <#> <web-app>
> <display-name>Hello World Example</display-name>
> - <#> <servlet>
> <servlet-name>helloworld</servlet-name>
> <display-name>Hello World</display-name>
> <description>Simple Hello World</description>
> <servlet-class>HelloWorld</servlet-class>
> </servlet>
> - <#> <servlet-mapping>
> <servlet-name>helloworld</servlet-name>
> <url-pattern>/helloworld/*</url-pattern>
> </servlet-mapping>
> </web-app>
>
> HelloWorld.java
> import javax.portlet.GenericPortlet;
> import javax.portlet.RenderRequest;
> import javax.portlet.RenderResponse;
> import javax.portlet.PortletException;
> import java.io.PrintWriter;
> import java.io.IOException;
>
> /** * a simple HelloWorld Portlet */
> public class HelloWorld extends GenericPortlet {
>
> public void doView(RenderRequest request, RenderResponse response)
> throws PortletException, IOException
> {
> response.setContentType("text/html");
> response.getWriter().println("A very simple portlet.");
> }
>
> }
>
> Thank you very much for your time!
>
> Dan Mihaila
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
--
Philip Donaghy
donaghy.blogspot.com del.icio.us/donaghy/philip
Skype: philipmarkdonaghy
Office: +33 5 56 60 88 02
Mobile: +33 6 20 83 22 62
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org