Sunday, November 22, 2009
Clipper Portlet, IFrame Portlet & WSRP Portlet
A clipper portlet is a portlet that renders content (full or part) from another web site. A clipper portlet can include all or a subset of another web site’s content using a process called “web clipping.” You can clip all or part of another web site. Users can effectively view and interact with content from another web site without leaving the portal. The session of Clipper portlet is independent of session of the weblogic portal application.
IFrame Portlet
Also called Browser (URL) Portlets, display HTML content from an external URL; no development tasks are required to implement them. You can clip all or part of another web site. Users can effectively view and interact with content from another web site without leaving the portal.Browser portlets, also called Content URI portlets, are basically HTML portlets that use URLs to retrieve their content. Unlike other portlet types that are limited to displaying data contained within the portal project, browser portlets can display URL content that is outside from the portal project.
WSRP Portlet
Also called, remote portlets conform to the WSRP standard; they can be hosted within a producer application (simple producer or complex producer), and surfaced in a consumer application. WSRP Portlet (or Remote portlet or producer portlet) are the ones who are actually remote portlet and are supported by weblogic portal. All portlets that are created as part of weblogic portal application are by default remote portlets and available to be consumed by the consumer portal. Pages and Books can also be made remote and can be consumed as part of consumer portal. By setting the property "isRemote" for the portlet, it can be prohibitted to be available as remote portlet.
Which one to choose when?
Clipper and Browser porlets are not recommended to use for transactional purposes, they are meant to be for displaying view only contents from third party sites (part or full). However remote portlets (producer portlets) are available for the purpose of publishing as remote porltets and consuming them through consumer portlets. Separate sessions are maintained for each of these consumer and producer portal applications however Weblogic portal platform is responsible to maintain the session between the producer and consumer portals.
Oracle Weblogic Simple Producer
Oracle Weblogic Simple producer is a light version of Oracle Weblogic Portal + Oracle Weblogic Federated resources. From here onwards simple producer will be used to indicate Oracle Weblogic Simple Producer. Remote portlets deployed on producer can be consumed by the consumer portal using WSRP protocol.
A simple producer can be created using the following steps:
Step 1: Create the simple producer domain
Step 2: Create the simple producer project
Step 3: Move the existing application to simple producer project or create new application as required.
Step 4: Generate simple producer portlets, books, pages etc.
Step 5: Deploy the simple producer application on simple producer domain
Step 6: Consume the simple producer portlets and you are done.
Following features are supported by Simple Producer:
- Page flow & struts portlets can be created and published as remote portlets
- URL Rewriting is supported
- Java, JSP, HTML, Clipper or Iframe portlets are not supported
- Registration of remote portlets are not supported
- No portal administration is available for simple producer
- No Backing file support is available for simple producer
- No event support is available for simple producer and thus inter portlet communication is also not available.
- Render dependency file is not supported by simple producer
- Portal APIs are not supported by simple producer
JSTL tag not working in Weblogic Portal 10
Caused by: weblogic.servlet.jsp.CompilationException: Failed to compile JSP /package/JSPName.jsp
JSPName.jsp:165:13: Static attribute must be a String literal, its illegal to specify an expression.
Resolution: Replace the jstl taglib as http://java.sun.com/jsp/jstl/core for weblogic 10 and newer versions, for older versions it should be http://java.sun.com/jstl/core, jsp word is the key in the url for the taglib.
Junit test cases in Weblogic Workspace
Open the project properties, build path and
1. Remove the following libraries from your Weblogic System Libraries
api.jar
wls-api.jar
weblogic.jar
wlcommons-logging.jar
junit.jar
wseeclient.jar
2. Add the following to the build path as external jar files
api.jar
wls-api.jar
weblogic.jar
wlcommons-logging.jar
junit.jar
wseeclient.jar
3. Compile the project and run the junit tests.
4. Thats it!
Not able to configure SAML
Sometimes the way weblogic server is started, it does not recognize the DemoIdentity.jks and thats why we need to make the following changes to recognize this by weblogic server:
Go to weblogic admin console
Environment -> servers -> AdminServer -> Configuration -> Keystores
- change the value of Keystores to use “Custom Identity and Java Standard Trust”
- Enter the complete path of the DemoIdentity.jks in custom identity store field
Save the changes and redefine the SAMLAuthenticator.
Add proxy information to Server
-Dhttp.proxyHost=[http-proxy-host-url]
-Dhttps.proxyHost=[https-proxy-host-url]
-Dhttp.proxyPort=[proxy-port]
-Dhttps.proxyPort=[ssl-port]
HttpConnectionURL Vs SoapHttpConnectionURL
Add the following in the startup script:
set JAVA_OPTIONS=%JAVA_OPTIONS% -DUseSunHttpHandler=true
EJB Client generation
- Right click the ejb project – > Properties -> Weblogic EJB – > Jar Settings EJB Client Jar: enter the name of the client jar
- To build the client jar export the project as “EJB Jar File”, both the jars will be created, client as well as ejb jar.
EJB Client generation using ANT
- Add this @JarSettings(ejbClientJar = “xyzManagementClient.jar”) to the bean
- add desired EJBC flags directly to the build script where “weblogic.ejbc” is executed.