+

Search Tips   |   Advanced Search

Create a custom launch page

We can configure an authoring portlet to use a launch page of the own design instead of the default user interface.

A custom launch page can either be a JSP or HTML file. We use remote actions to call different views and functions from with the authoring portlet's user interface. We can also use the web content API to add other functions to the launch page. Once you have created a custom launch page, you then configure the authoring portlet to use the custom launch page instead of the default authoring portlet user interface.

Storing JSP Files:

JSP files can be located:


A custom launch page example

This is a simple example of some code we can add to a JSP or HTML file, to allow users to create and view content items using remote actions.

<%--
/* Sample Launch Page */
--%>

<%@ taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm" %>

<%--
/* Add the username and password here */
--%>
<wcm:initworkspace username="wpsadmin" password="wpsadmin" >
An error occurred initializing the WCM workspace:
<%=error%>
</wcm:initworkspace>

<%--
/* Setup the context here */
--%>
<wcm:setExplicitContext wcmWebAppPath="http://localhost:10039/wps/wcm" wcmServletPath="/myconnect" path="Web Content/Articles/Sample Article" >
An error occurred setting the WCM context:
<%=error%>
</wcm:setExplicitContext>

<div>
   <div>
      <a href='<wcm:plugin name="RemoteAction" action="new" type="com.ibm.workplace.wcm.api.WCM_Content"/>'>New Content</a>
   </div>
   <div>
      <a href='<wcm:plugin name="RemoteAction" view="contentbytitle" action="openmainview"/>'>View Content by Title</a>
   </div>
   <div>
      <a href='<wcm:plugin name="RemoteAction" view="contentbysitearea" action="openmainview"/>'>View Content by Site Area</a>
   </div>
</div>

Reloading JSP files:

JSP files that are stored in the PA_WCM_Authoring_UI application are not reloaded, even if they are updated. You must restart the server, or put the JSP in a separate web application that is configured to reload JSP files, in order for changes made to the JSP to be displayed.


Parent: Developing

Related:

Custom authoring interfaces

Use remote actions