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 Stefan Zoerner <sz...@apache.org> on 2005/12/19 17:55:36 UTC

Providing portlet.tld in the portlet war or not

Hi all!

I have a question regarding deployment of portlet applications. Within 
my portlets, I use JSP for markup creation, and within my JSPs, I use 
the portlet specific tag library (for portlet URL creation within the 
markup).

My aim is to create war files which may be installed on any JSR 168 
compliant portlet container.

I use the taglib directive within my JSPs like this

<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

My question: Am I supposed to include the tag library descriptor within 
my war-file and declare it in the web.xml file? I think I can't, because 
the file is vendor specific, the spec defines only the tags itself, not 
the implementing Java classes.

Cite JSR 168: "The portlet-container must provide an implementation of 
the portlet tag library."

If I use Pluto, and do not include a tld-file in the war and the 
web.xml, it works fine: the portlets work after deployment although I do 
not know why (first I thought Pluto "enhances" my web.xml by adding the 
tag lib, but this is not the case). But what about others?

Are there any recommendations/best practices about that? Am I supposed 
to change the tld-file before I deploy it to a specific portal (as 
described for BEA here: 
http://dev2dev.bea.com/pub/a/2004/09/deployJava81sp3.html).

Thanks in advance and greetings from Hamburg covered in snow, Stefan


Re: Providing portlet.tld in the portlet war or not

Posted by Stefan Zoerner <sz...@apache.org>.
Stefan Zoerner wrote:

> Hi all!
> <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
> 
> My question: Am I supposed to include the tag library descriptor within 
> my war-file and declare it in the web.xml file? I think I can't, because 
> the file is vendor specific, the spec defines only the tags itself, not 
> the implementing Java classes.
> 

Some smart guy helped me to solve this one, and I'll just drop a little 
note for those who are also interested to the answer of this miracle.

The spec does not force you to include the TLD-File in your webapp (but 
the URI is standardized). If a portlet container does not run your 
portlet app, because a vendor specific TLD-file is missing, it is (to be 
very accurate) not compliant. Although there are some implementations 
like that (open source as well as commercial).

No problem for Pluto (which is compliant and obviously should be as it 
is the reference impl), sorry for any time taken for this one,

     Stefan