Soren,

Assuming you are talking about this hello world example?:
http://portals.apache.org/pluto/v20/deploying.html

I also just found another example, even though it is geared for uPortal rather 
than the example Pluto server. (But uPortal uses Pluto and supports JSR-168 
compliant portlets, so should work.):
https://wiki.jasig.org/display/PLT/Hello+World+Portlet

Some other example portlets are here:
https://source.jasig.org/portlets/
there are also some in here but not all of these work:
https://source.jasig.org/sandbox/

As of 2010/06/03 I'm not sure how any of those if any are JSR-286 (most are 
still JSR-168), but that shouldn't matter afaik just to get something simple 
working.

Some miscellaneous tips/notes:
* Pluto's jars should be in the shared/lib area, which requires some change to 
the default Tomcat 6 config to have it look for. That is the most appropriate 
place for it, afaik.
* Like any war, if you unzip the war, it should unzip its contents into the 
current directory (i.e. is isn't unzipping into (webapp directory name)/... ). 
That is just a war thing, not specific to portlets. This only matters if you 
tried to make the war by hand.
* Pluto's assembly API must be used to prep the war. There is a 
maven-pluto-plugin that can help with this (it uses Pluto assembly). Pluto 
assembly looks at the portlet.xml then modifies the web.xml and adds 
portlet*.tld file(s).
* Even though Tomcat is much more lenient when it decompresses a war, Pluto 
assembly (used by maven-pluto-plugin) uses the standard Java API to unjar the 
war, and if the META-INF/MANIFEST.MF file isn't the first entry (and there 
should be only one manifest), it will choke (and the error is not that helpful).
* Just because maven-pluto-plugin preps the war doesn't mean it is a valid 
portlet (or even valid web.xml and portlet.xml for a portlet) or that it will 
even register in Pluto afaik. You need to make sure that web.xml is cleaned up 
and that you didn't try to add the stuff that Pluto assembly puts into it. (For 
info on how to clean it up if you need that, see the unplutofy project).
* In newer versions of pluto (not sure what version, but sometime between 
1.0.0-RC2 and 1.1.7), portlets register themselves with pluto (I think). So you 
can someone tell if a portlet is available and at least valid enough for Pluto 
to register it (although it still may not work) if the logs showed that it 
registered. It may not register each time though? Registering is different than 
just Tomcat deploying the war (it is the line right after that in the logs 
usually, I think).

Hopefully none of that info is wrong, and please anyone feel free to correct or 
clarify those.

Wish I could provide more info, but maybe some of that will help.

Gary


On Jun 3, 2010, at 5:58 AM, Søren Blidorf wrote:

> Hi.
>  
> I am new to portlets and Pluto.
>  
> I have installed Pluto on my existing Tomcat and it works fine.
>  
> However I am having difficulties setting up a helloworld portlet.
>  
> I have created the portlet.xml and the helloworld.java. Compiled and deploy 
> but nothing happens.
>  
> I have tried different examples on google, but nothing works.
>  
> Does anybody have a helloworld.war file of a describsion for dummies on how 
> to get a helloworld to work.
>  
> Soren
>  

Reply via email to