This sample portlet requires the following:
It also requires one of the following portlet containers:
If you do not have the above software available, please visit the Oracle WebCenter Suite Home Page to obtain it.
This sample portlet will be deployed and configured on the selected portlet container. It is assumed that the reader is familiar with these processes on the selected container; if not please consult the product-specific documentation.
Technologies used by this sample include Java Portlets (JSR 168), JSP 2.0, JSTL, Web services, CSS, and JavaScript. For more information on these technologies, please refer to the Additional References.
Blogs allow users and groups to easily publish regular entries on descriptions of events, issues, etc., providing an efficient means of communication. Oracle WebCenter Wiki and Blog Server 10g Release 3 provides a comprehensive blogging platform for use in your Enterprise 2.0 applications. This sample portlet demonstrates the use of many of these capabilities within Oracle's portal solutions.
The blog sample portlet is designed to allow the user to easily connect to a blog server in order to view and/or edit blogs. Once connected the portlet provides the user with options to navigate the blog entries, and create and edit them if they are the blog owner. All of the state is stored as portlet preferences, allowing the user to maintain their navigation and settings.
The sample portlet is packaged as a Java Web Archive (WAR) file that contains all of the files necessary to deploy the application. The following list of files may be used as a reference when deploying, configuring, modifying, and otherwise using the sample.
| Directory | Description |
|---|---|
| /docs | Installation & Configuration documentation for samples |
| /imageserver | All CSS, JS, and IMG files needed for the portlet |
| /serverpackages | PTE file used for importing of WCI portal objects |
| /src | All JSPs and Java classes used for portlet functionality |
| /webapp | Web Application Archive needed for deployment of the portlet |
| Directory | File | Description |
|---|---|---|
| /src/samples/webcenter/portlets/beans | BlogComment.java | Utility class for blog comments |
| /src/samples/webcenter/portlets/beans | BlogEntry.java | Utilities class for blog entries |
| /src/samples/webcenter/portlets/blog | BlogPortlet.java | The JSR 168 Portlet source file |
| /src/samples/webcenter/portlets/blog | BlogPortlet.properties | Properties file for messages and choices |
| /src/samples/webcenter/services/wiki | BlogType.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki | DomainInfo.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki | PageEditMode.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki | PageInfo.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki | PageType.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki | SearchResult.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki | SearchType.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki/remote | WikiRemoteServiceSoapBindingStub.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki/remote | WikiService.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki/remote | WikiServiceProxy.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki/remote | WikiServiceService.java | Generated from WSDL |
| /src/samples/webcenter/services/wiki/remote | WikiServiceServiceLocator.java | Generated from WSDL |
| Directory | File | Description |
|---|---|---|
| /WEB-INF/lib | axis.jar | Apache Axis Web Services |
| /WEB-INF/lib | commons-beanutils.jar | Apache Commons Bean Utilities |
| /WEB-INF/lib | commons-digester-1.5.jar | Apache Commons Digester |
| /WEB-INF/lib | commons-discovery.jar | Apache Commons Discovery |
| /WEB-INF/lib | commons-logging.jar | Apache Commons Logging |
| /WEB-INF/lib | glassfish.jstl_1.2.0.1.jar | Glassfish JSTL 1.2 Implementation |
| /WEB-INF/lib | jakarta-oro-2.0.7.jar | Apache Text Processing for Regular Expressions |
| /WEB-INF/lib | jaxrpc.jar | Glassfish Reference Implmentation for XML based RPC |
| /WEB-INF/lib | jsr168tags.jar | WCI JSR 168 Portlet Tag Implementation |
| /WEB-INF/lib | log4j-1.2.8.jar | Apache Logging Services |
| /WEB-INF/lib | openfoundation.jar | WCI Interoperability Objects Implementation |
| /WEB-INF/lib | openkernel.jar | WCI Base Kernel Implementation |
| /WEB-INF/lib | openlog-framework.jar | WCI Logging Implementation |
| /WEB-INF/lib | orielly.jar | Orielly Servlet Support Implementation |
| /WEB-INF/lib | ptportletcontainer.jar | WCI JSR 168 Portlet Implementation |
| /WEB-INF/lib | pthome.jar | WCI Base Configuration Implementation |
| /WEB-INF/lib | wsdl4j-1.5.1.jar | Java APIs for WSDL (JWSDL) |
| /WEB-INF/lib | wss4j.jar | Apache WSS4J (WS-Security) |
| /WEB-INF/lib | xalan.jar | Apache XML XSLT Parser Implementation |
| /WEB-INF/lib | xerces144.jar | Apache XML Parser Project |
| Directory | File | Description |
|---|---|---|
| /blog | blogEdit.jsp | Edit mode JSP |
| /blog | blogHelp.jsp | Help mode JSP |
| /blog | blogView.jsp | View mode JSP |
| /blog/views | entries.jspx | Used for viewing the all entries in blog |
| /blog/views | entry.jspx | Used for viewing and editing single blog entry |
| /blog/views | init.jspx | Initializes the JSP and JavaScript variables |
| /blog/views | main.jspx | Renders the main user interface |
| /blog/views | search_results.jspx | Used for viewing the search results |
| Directory | File | Description |
|---|---|---|
| /imageserver/plumtree/portal/custom/wcservices/blog/css | default.css | Default style sheet |
| /imageserver/plumtree/portal/custom/wcservices/blog/css | otn.css | OTN-style style sheet |
| /imageserver/plumtree/portal/custom/wcservices/blog/css | sky.css | Sky style sheet |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | configure.png | Configure settings icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | delete.png | Delete icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | edit.png | Edit icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | help.png | Help icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | minus.png | Collapse icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | new.png | New icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | plus.png | Expand icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | rss.png | RSS feed link icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images | search.png | Search icon |
| /imageserver/plumtree/portal/custom/wcservices/blog/images/default | blog_banner.png | Banner image for the default template |
| /imageserver/plumtree/portal/custom/wcservices/blog/images/otn | blog_banner.png | Banner image for the otn template |
| /imageserver/plumtree/portal/custom/wcservices/blog/images/sky | blog_shadow.png | Shadow background image for the otn template |
| /imageserver/plumtree/portal/custom/wcservices/images/blog/sky | blog_banner.png | Banner image for the sky template |
| /imageserver/plumtree/portal/custom/wcservices/blog/images/sky | blog_body.png | Body image for the sky template |
| /imageserver/plumtree/portal/custom/wcservices/blog/js | blog.js | JavaScript utility functions |
| Directory | File | Description |
|---|---|---|
| /WEB-INF | portlet.xml | JSR 168 Portlet Definitions |
Deployment of the sample portlet will follow all of the standard procedures for WCI portlet deployment. Please follow all of the steps below:
For many portlet containers the Java Web Archive (WAR) file may be deployed directly using various development and administration tools and utilities. If you are planning on exploring and modifying the sample code you should deploy this as an "exploded" archive on the file system. This may be done via an import utility, as in an IDE, or via a standard JAR or Zip utility.
When using the portlet via Web Services for Remote Portlets (WSRP), please consult the product-specific instructions for creating the consumer and/or producers for the portlets. The portlet has been designed and tested with WSRP in mind, but there may be additional configuration and/or modifications to the code necessary depending on the way the server is configured.
The sample portlet does not provide container-specific security hooks and uses a simple user name based system for accessing the remote services. It assumes that the user exists on both the local and remote systems, and that the authentication is handled by the portal. Additional security via common security realms, SSO, credential vaults, and the like will require configuration and possible code modifications.
Once the portlet has been deployed on the server it must be added to a portal, page, etc. to be used. The portlet has been designed to be usable by an anonymous (non-authenticated) user, although any customizations made will only be available for the life of the session. When the user authenticates the portlet state will be stored in the portlet preferences, with little need for further manual configuration.
The portlet has been designed to be "bootstrapped" when initially accessed by the user. It will display the configuration screen, allowing the user to enter or select from a list of available options. The table below contains the name of the preferences and the expected values.
| Name | Value(s) | Description |
|---|---|---|
| URL | http://<hostname>:<port> | The host where the server is deployed |
| Type | Personal or Community | The type of blog |
| Name | myblog, johndoe, etc. | The name of the blog |
| Show | All or Single | Show all blog entries or just one |
| Entry ID | Unique number | ID of the single blog to show |
| Max | Number | Maximum number of entries to show |
| Template | default, otn, or sky | The display template to use |