Pink Little WebSphere World

Wednesday, June 10, 2009

How to get WCM/WP User Info in WCM

Create a JSP component with the following code:

<%@page import="java.util.*, java.security.*,
java.io.*, java.net.*,
java.text.*, javax.servlet.http.*"%>

<%
Principal userPrincipal = (Principal) request.getSession().getAttribute("wcm_session_user");
com.ibm.portal.puma.User pumauser = (com.ibm.portal.puma.User) userPrincipal;
String givenName = (String) pumauser.getGivenName();
String familyName = (String) pumauser.getFamilyName();
if (givenName == null) givenName = "";
if (familyName == null) familyName = "";
out.print(givenName + " " + familyName);
%>

Source: http://www.ibmportal.com/viewtopic.php?id=420

Tuesday, July 15, 2008

How to enable and disable versioning on WCM 6

Search WCMConfigService.properties for "versioningStrategy". You can set the properties to always (enable) or never (disable)

# enable version control for the following types.
# options are always | never
versioningStrategy.AuthoringTemplate = always
versioningStrategy.Component = always
versioningStrategy.Content = always
versioningStrategy.PresentationTemplate = always
versioningStrategy.Site = always
versioningStrategy.Taxonomy = always
versioningStrategy.Workflow = always

Thanks Max Bareither for the tip!

Tuesday, February 12, 2008

Enabling e-mail for Web Content Management 6.0 - SMTP Authentication

In addition to the InfoCenter steps (http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/index.jsp?topic=/com.ibm.wp.ent.doc/wcm/wcm_config_smtp.html) you may need to add a username and password if your SMTP server requires authentication.

1- Check WCMConfigService.properties file under /wcm/shared/app/config/wcmservices

2- Add defaultusername and defaultpassword. See example:

#SMTP Mail Setup
connect.connector.mailconnector=defaultsmtpserver, defaultfromaddress, defaultreplytoaddress, defaultusername, defaultpassword

connect.connector.mailconnector.defaultsmtpserver= mail.myserver.com
connect.connector.mailconnector.defaultfromaddress= fernanda@myserver.com
connect.connector.mailconnector.defaultreplytoaddress= fernanda@myserver.com

#Add these lines:
connect.connector.mailconnector.defaultusername= fernanda@myserver.com
connect.connector.mailconnector.defaultpassword= mypassword

3- Restart WebSphere Portal for the new settings to take effect.

Note: For the 6.1 server the config file should be under: was_profile_root/PortalServer/wcm/shared/app/config/wcmservices/

Wednesday, February 6, 2008

Lotusphere 2008

January, 20-24th - Orlando, FL

WebSphere Portal and Portlet Factory 6.1 are coming soon!
Some of the new features: semantic tags, JSR 286 Portlet API, improved AJAX support
WebSphere Portal 6.1 Beta Version is available for download.

For more details see:

WebSphere Portal 6.1 Open Beta
WebSphere Portal 6.1 Beta Forum

Friday, January 25, 2008

Working with JSP elements on WCM 6

The JSP file must be stored under
<was_profile>/<cellName>/installedApps/wcm.ear/ilwwcm.war/

If your JSP contains references to other files like Javascripts, images, style sheets, etc, do the following:

1- Store those files under the same folder as the JSP.
2- Refer them as /wps/wcm/<file_name>

For example, if you have an image called dot.gif, your code within the jsp should look like:
<img src="/wps/wcm/dot.gif"/>

In order to check if the files are in the correct place, you should be able to access the follow URL:

http://<yourPortalserver>:<portNumber>/wps/wcm/dot.gif

PS: You must copy your jsp to PortalServer/installedApps/WCM_Local_xxx.ear/xxx.war/jsp if your JSP component will be rendered in a Local Web Content Viewer portlet.

IWKPL1515X: Value must be between 2/7/08 11:43 AM and 2/8/08 11:43 AM. (Expiry Date)

This is a WCM 6 exception. It happens when the author tries to save new content after the "Expiry date and Time field properties" were changed in the "Default Content Settings" in the Authoring Template.

Solution:IBM suggested the installation of 6.0.1.1-WCM-PK57002.zip

For more details, see: http://www-1.ibm.com/support/docview.wss?uid=swg1PK57002

IBM recommends 17 additional fixes that need to be applied before the expiry date issues is corrected:

PK54658, PK53869, PK53463, PK53575, PK53183, PK52815, PK52906, PK52802, PK53868, PK55366, PK55082, PK52688, PK51512, PK53899, PK52903, PK51892, PK55773, WCM 6.0.1.2, PK57002

How to setup automatic content expiration on WCM 6

In order to setup automatic content expiration you need to do the following:

1- Set the content expiry date.
2- Create "Scheduled Move" workflow action based on the "Expiry Date" to move content from Published to Expired stage. Add this action to your Published stage.
3- To guarantee the author will set the exp date, make it a required field in the Authoring Template. Also, set a default Workflow and a range of dates to be selected from. Click the icon besides "Expiry Date" under the AT "Default Content Settings" for options.