Liferay 6 :display a plain jsp page - liferay-6

Need your help guys. Any hint how can i dispaly a plain jsp in liferay context but without any liferay goodies, like theme, dockbar etc. Just a simple jsp page with some text.

I did that a while ago and what I did was to create a servlet in a portlet listening to some kind of URL. Example :
http://your-server:8080/my-portlet/my-servlet
Inside this Servlet you can then do a forward to the JSP in your portlet.
Any user accessing this URL will then be forwarded to a full JSP without any liferay stuff.

Related

How to call web service method from Web content display in Liferay 6.2?

I am creating a page using Liferay 6.2 where i need to display html contents sent as response from web service method. After seeing the customization and features available in web content display, i am planning to use them. As i am new to VM and FTL, i am not sure how to call web service method from web content display content. Please help me.
You can create a custom velocity tool as explained in this post.

How to get plid of specific portlet In Liferay velocity template

I am developing MVC Portlet and want to open specific page of my portlet through menu link via Controller.
In velocity template I have portlet name of my portlet.
How can i get plid of that portlet?
My code is as below:
#if ($nav_item.getName().equalsIgnoreCase("specific menu link"))
#set ($myURL = $portletURLFactory.create($request,"portletname_WAR_portletnameportlet",$getterUtil.getLong($plid),"RENDER_PHASE"))
$myURL .setParameter("view","methodName") //Controller paramter
<a href="$myURL" > $nav_item.getName()</a>
#end
Its appending my paramters to current url and staying on current page.
I have added my portlet on another page and tried using hard coded plid, it works fine but for different servers it will create problems.
So, How can i get my portlets plid at runtime in vm file to use while creating URL?
we have maintain some where else in configuration..
i can give you the tip some thing store PlId value in portlet preferences .. in the velocity get portlet preference by portlet id .. then get the plid.
some times portlet may be places in many pages so we may get multiple plids.
Use same page names across all portal based on page name fetch plid.

Forcing page reload from Vaadin portlet

Is there an easy way to force the entire page to reload from Vaadin? I have a portlet which affects the header value displayed which is pulled from IBM WebSphere's dynamic cache in a separate JSP.
I am porting over an old JSF portlet to Vaadin which depending on page reloads between actions to reflect the new value in the header template. So now I need to force the entire page (not just the portlet) to reload to make it appear that the action took effect.
You can reload the hosting web page with JavaScript:
getMainWindow().executeJavaScript("window.location.reload();");
I think this should also do the trick in a portal.

What is the difference between a Portlet label and a Portlet page (Websphere Portal Server 6.1)

What is the difference between a portlet label and a portlet page?
See the following references:
Portlet Label
Portlet Page

Liferay portlet sharing objects between portlet class and JSP

I am new to Portlets and also with Liferay Portal and I want to know how to share a custom object created in the Portlet doView method with the JSP page. I know about adding the object to the ActionRequest and retrieving it in the JSP but is there a better way ?
Thank you guys.
Check out Liferay's Inter-portlet communication (IPC). Here's a link that describes the IPC (via examples) http://wiki.java.net/bin/view/Portlet/JSR168FAQ#How_do_I_achieve_inter_portlet_c
hope this helps.