This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This is to avoid the conflict between the namespace for jsp on the other portlet, in the same portal.
Now, what i tried is that, i put the same portlets on the same page. i.e 2 similar concrete portlets are placed on the same page. Encoded the namespace.
Note: it works fine if only one portlet is placed on the page.
Btw: Which portlet container do you deploy on? I have successfully used this tag within JSPs on IBM WebSphere portal, and no problems with a portlet used twice within a page appeared.
Author of German LDAP-Book
Committer at Apache Directory Project
Joined: Jun 07, 2005
but i dont understand how did it work for u.. even i use IBM Websphere Portal Server...
Can u please tell me if u suspect i m doing something wrong....
Joined: Nov 29, 2001
The name of the function is prefixed with the namespace tag to ensure it is unique in the HTML page.
If the portlet which uses this JSP is placed several times on a page, no errors occur, but the function is declared with different names per portlet appearance, and is called accordingly.
Hope it helps, Stefan [ December 14, 2005: Message edited by: Stefan Zoerner ]
As a former IBMer who has had to research this question for more than one client, the answer is: You cannot namespace-encode anything in an external .js file. There's just no way to do it.
This definitely applies for WebSphere Portal 5.1.x.x, and very, very likely for Portal 6.0.
Alternative 1: Import it now as an external .js file, but as a JSP file. This may have performance issues since .js files can be put on the webserver, and don't have server-side code to run.
Hope this helps. [ August 07, 2007: Message edited by: Jimmy Ho ]