- Create a new .war file say WPNotesTheme which should be a servlet specification 2.4 compliant web application.
- Copy content of
WebSphere\PortalServer\theme\wp.mashup.cc.theme\installedApps\wp.mashup.cc.theme.ear\PageBuilder2.war
, into your war file. I always make sure to copy theWebContent\themes
,WebContent\skins
folder and also content inside theWEB-INF
such astld
folder and other files - Once your .war file is ready deploy it on the WebSphere Portal server as .war file using either WebSphere Application Server Admin Console or using RAD, If your deploying on RAD, it might fail saying the application has errors(It happens because we are using the portal theme Tags that RAD is not able to find ), To fix this issue go to Windows -> Preferences and check "Allow applications containing errors to be published on server" check box
In my case i am deploying theWPNotesTheme
atWPNotesTheme
context root - Once the
WPNotesTheme.ear
application is installed, next step is to change the theme to use theWPNotesTheme.ear
instead of default PageBuilder2. In order to do that first take full export of your portal - Create UpdateTheme.xml file by copying the
csa2.websphereNotes
related theme element in it. Change value of context-root element and WPNotesTheme element to WPNotesTheme because thats where the theme is installed, your xmlaccess should look something like this
<?xml version="1.0" encoding="UTF-8"?>
<request build="wpnext_528_01" type="update" version="7.0.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="PortalConfig_7.0.0.xsd">
<portal action="locate">
<theme action="update" active="false" context-root="/WPNotesTheme" default="false" domain="rel"
objectid="ZJ_CCBRVKG10GE2D0IEJ69NID3082" resourceroot="WPNotesTheme">
<localedata locale="en">
<title>WebSphere Notes Theme</title>
<description/>
</localedata>
<parameter name="com.ibm.portal.themetype" type="string"
update="set"><![CDATA[CSA2]]></parameter>
<parameter name="theme.capability.oneUI" type="string"
update="set"><![CDATA[2.1]]></parameter>
<parameter name="theme.capability.dojo" type="string"
update="set"><![CDATA[1.4.3]]></parameter>
<parameter name="com.ibm.portal.friendly.name" type="string"
update="set"><![CDATA[csa2.websphereNotes]]></parameter>
<parameter name="theme.capability.mashups.enabler" type="string"
update="set"><![CDATA[2.4]]></parameter>
<parameter name="com.ibm.portal.theme.template.ref" type="string"
update="set"><![CDATA[dav:fs-type1/themes/csa2.websphereNotes/]]></parameter>
</theme>
</portal>
</request> - Import the updatetheme.xml in your websphere portal server, and now if you access the theme test page you will notice that Default.jsp from your WPNotesTheme.war is getting executed, when you hit the THeme test page you should see that Default.jsp in your .war file is getting compile
[3/18/11 19:33:02:501 PDT] 00000055 servlet I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [WPNotesThemeEAR] [/WPNotesTheme] [/themes/html/Default.jsp]: Initialization successful.
You can also verify this by adding couple of System.out lines in your Default.jsp
But you will notice that if you make change in any other JSP say bannerNav.jsp then your bannerNav.jsp is not getting executed instead the one in PageBuilder2.war is getting executed that is because your dynamic content spot in theme.html is still pointing to the PageBuilder2.war. YOu can fix this by changing the theme.html like this
<a rel="dynamic-content" href="res:/WPNotesTheme/themes/html/PageBuilder2/bannerNav.jsp"></a>
<%--
<a rel="dynamic-content" href="dyn-cs:id:bannerNav@tl:oid:csa2.theme"></a>
--%>
In this case i am commenting out the bannerNav dynamic spot and replacing it with URL tores:/WPNotesTheme/themes/html/PageBuilder2/bannerNav.jsp
, if you want you can actually change the value of dynamicContentSpot in the WAS Admin Console but it will require a server restart so may be you can make the changes before going to production- Last step would be copy your modified theme_en.html to the WebDav store
Once your changes are uploaded on the server you can hit your theme test page and you should see your changes
3 comments:
Hi.
I have a question, what's the path custom theme once it's deploy from administration console. Other thing, the file that I have that deploy is war or ear.
Thanks for your answer and sorry'me for my english.
Thanks for info
Web Design Company in Bangalore
Website development in Bangalore
Post a Comment