views:

347

answers:

1

Hi Friends, I have an existing PHP website which use considerable amount of jquery and ajax. Now our client need to integrate it as an portlet in a Oracle BEA Weblogic server and their prefered specification is JSR168. I'm completely new to java portlets and so I have few questions regarding portlet. 1. Can we integrate PHP website ( which is in another server) into a java portlet container? Or it is only for jsp web sites? I'm asking this because there may be differences in session handling in client side in PHP and JSP and it will cause problesm. 2. Can we use ajax when using portlet without a big performance reduction? 3. What are the basic changes we should do to the existing website in order to make it compatible to JSR168?

Thanks you very much for taking time to read my problem. thanks & regards, Manjula

+2  A: 
  1. I think the PHP/Java Bridge, with its implementation of the JSR 223 Script API, will be the best way to expose you existing PHP application as a Java Servlet. Once you have the Servlet implemented via PHP, then forwarding from a Portlet to that will be the same as forwarding to any other Servlet or JSP. Alternatively, you may be able to call your PHP scripts directly from your Portlet code.

  2. It is possible to use AJAX with Portlets. AJAX requests are made as Portlet resource requests which are proxied via the Portal that is using the Portlet. This inherently implies some performance overhead, but no more so than when using Portlets in a more 'traditional' way.

  3. In terms of portletizing the existing website, you would need to decide how (and why) you want to expose parts of the application as Portlets. The simplest way might be to expose the whole site as a single Portlet, but that is kind of missing the point and you may as well just render the site in an iframe. Beyond the technical challenge of getting the PHP application exposed to Java, as discussed in 1, this part really needs to be answered by your client.

Andy