Project and Portfolio Management Practitioners Forum
cancel

creating new custom Java JSR168 portlet

Highlighted
Cenk Oguz
Respected Contributor.

creating new custom Java JSR168 portlet

Hi,

I am in the process of creating a custom Java JSR168 portlet.
I succeeded in creating one such portlet and it works out fine.

However I have a problem with PDF exports:
1) The portlet generates an image that is linked in the html output, just like in a regular portlet like Analyze Resource Load
2) However when using the PDF export the image is for some reason not included in the PDF output

Does anyone have any experience in custom Java Portlet creation in PPM?

BR,
Cenk
8 REPLIES
Sascha Mohr
Acclaimed Contributor.

Re: creating new custom Java JSR168 portlet

Seems to be a general limitation of the pdf export function in PPM. We are using the out of the box URL Portlet (which is also a JSR168 portlet) and it's the same with those.
Cenk Oguz
Respected Contributor.

Re: creating new custom Java JSR168 portlet

Thanks, checked it out and noticed the same thing. However it seems to be a matter of security. Pages without any authentication are PDF-rendered well with images. Pages without authentication were not.

In particular, trying to display a png image directly from /itg/cache rendered the login page!

So it seems one must get past security somehow.
Sascha Mohr
Acclaimed Contributor.

Re: creating new custom Java JSR168 portlet

Strange, here there are only empty boxes in the PDF where it should display SAP NetWeaver, MS Sharepoint and Lotus Notes content. They all require authentication.
Cenk Oguz
Respected Contributor.

Re: creating new custom Java JSR168 portlet

Sorry, a typo.

I meant that pages requiring authentication displayed empty boxes in the PDF.

Pages without authentication were rendered correctly in the PDF.

As I said, when linking on of the logo gif images directly the PDF displayed the logon page in the PDF portlet (may not apply i SSO is enabled). It implies that security is somehow blocking.

Will make an attempt by generating an image from non-authentication location.
Cenk Oguz
Respected Contributor.

Re: creating new custom Java JSR168 portlet

Ok, just confirmed it, it is a authentication/security issue causing images to not appear in dashboard PDF exports.

I guess standard portlets use the PPM security mechanism to allow access to generated /cache image files.

I stand without a chance to do so, so what I did was make the image be generated in the portlet WAR instead, which stands outside the PPM (itg.war) security. After that PDF exports worked out.

A prettier solution would be a simple servlet in the portlet WAR that streams the image.
Mahen M
Acclaimed Contributor.

Re: creating new custom Java JSR168 portlet

Do you have any documentation on how to create a new JSR 168 portlet in PPM? If so kindly share it with me.

Regards,
Mahendran M
Cenk Oguz
Respected Contributor.

Re: creating new custom Java JSR168 portlet

If you need info on how to construct a JSR168 portlet the general JSR168 specification/API and tutorials are what you should look into.

You can find a simple sample of a Weather Portlet at http://developers.sun.com/portalserver/reference/techart/jsr168/

However deployment is a different matter that is depending on the portal.
Old Mercury had a small deployment document for PPM, attached it.
Mahen M
Acclaimed Contributor.

Re: creating new custom Java JSR168 portlet

Thank You

Regards,
Mahendran M