Monday, December 1, 2014

Portlet: Deploy Portlet (JSR 286) using JDEV

In this blog we are going to deploy our previously created portlet  ( here ) and view its output

We are going to deploy our portlet in weblogic which is WSRP producer also. It means it can expose our JSR 286 based portlet as WSRP 2.0.
WSRP is web service for remote portlet. If we expose our JSR 286 portlet as WSRP 2.0 then our portlets can be used not only in java portals but in any other portasl (.NET) based etc.

To expose your portlet as WSRP we can follow these steps.
1. Create connection to weblogic server on Resource Pallete.
(I have a stand alone weblogic server running locally in my jdev and I would be deploying my portlets on it) As we are deploying on stand alone server it must behave as a portlet producer. For that we need to extend weblogic with 'Oracle Portlet Producer' as shown below 2. Create deployment profile:
a. Select project properties > Deployment > New b. Provide Archive Type (war) and name for deployment profile
c. Just say OK in war profile

3. Deploy war:
a. Right click on project and select Deploy and then deployment profile b. Select 'Deploy to Application Server option'
c. Select your server on which you want to deploy
d. Select 'Yes' for WSRP option Once deployment is successful, you will see a url like

Now launch that url on a browser Page provides a url 'WSRP v2 WSDL'. This url points to a WSDL, which exposes all portlets of application using a WSDL. We need this URL to test this portlet.

If we want to deploy it on integrated server, we can start integrated server and then deploy using a deployment profile as suggested above.
But to test it we need to run integrated server from the application which has portal page. As we can only have one integrated server running at a time I would suggest following steps

1. Create a new ADF application.
2. Start Integrated server when this new application is selected.
3. Open JSR 286 application and deploy it on already running integrated server.
4. Again open ADF application and create WSRP connection with deployed JSR286 application.
5. Create a page in ADF application and drag and drop portlet from connection on page directly.
[null, {"document_url": "http://sanjeev-technology.blogspot.com/2014/12/portlet-deploy-portlet-jsr-286-using.html", "unformatted_src": "http://1.bp.blogspot.com/-L4x0y0NdLUc/VHw8nHzKyuI/AAAAAAAACCw/1pGAhqK3svY/s1600/1.png", "src": "http://1.bp.blogspot.com/-L4x0y0NdLUc/VHw8nHzKyuI/AAAAAAAACCw/1pGAhqK3svY/s1600/1.png", "rendered_width": 320, "rendered_height": 247}, null, {"document_url": "http://sanjeev-technology.blogspot.com/2014/12/portlet-deploy-portlet-jsr-286-using.html", "unformatted_src": "http://4.bp.blogspot.com/-3hfw1cyyr-Q/VHxK4WkiPII/AAAAAAAACDk/Gmcjxb17_xk/s1600/5.png", "src": "http://4.bp.blogspot.com/-3hfw1cyyr-Q/VHxK4WkiPII/AAAAAAAACDk/Gmcjxb17_xk/s1600/5.png", "rendered_width": 400, "rendered_height": 283}, null, {"document_url": "http://sanjeev-technology.blogspot.com/2014/12/portlet-deploy-portlet-jsr-286-using.html", "unformatted_src": "http://3.bp.blogspot.com/-J5vYlfR5SGc/VHxCck31m_I/AAAAAAAACDA/Gwgzmmzkrhc/s1600/2.png", "src": "http://3.bp.blogspot.com/-J5vYlfR5SGc/VHxCck31m_I/AAAAAAAACDA/Gwgzmmzkrhc/s1600/2.png", "rendered_width": 400, "rendered_height": 268}, null, null, {"document_url": "http://sanjeev-technology.blogspot.com/2014/12/portlet-deploy-portlet-jsr-286-using.html", "unformatted_src": "http://2.bp.blogspot.com/-l_3SMzYUyjE/VHxDxtby5II/AAAAAAAACDU/9-YprH5x8m8/s1600/4.png", "src": "http://2.bp.blogspot.com/-l_3SMzYUyjE/VHxDxtby5II/AAAAAAAACDU/9-YprH5x8m8/s1600/4.png", "rendered_width": 400, "rendered_height": 165}, null, {"document_url": "http://sanjeev-technology.blogspot.com/2014/12/portlet-deploy-portlet-jsr-286-using.html", "unformatted_src": "http://1.bp.blogspot.com/-Flwng9EjIKs/VHxPsS_3P8I/AAAAAAAACDw/Qj3lDdKzW5Y/s1600/6.png", "src": "http://1.bp.blogspot.com/-Flwng9EjIKs/VHxPsS_3P8I/AAAAAAAACDw/Qj3lDdKzW5Y/s1600/6.png", "rendered_width": 320, "rendered_height": 252}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]