Deploying addressbook.war and
creating a JSP portlet
Log in to Portal Studio as a user with access to all operations. For example:
Username – enter “pso”.
Password – enter “123qwe”
Select Build | Portlets from the Portal Studio left pane.
Click New on the Portlet Manager toolbar.
When the Portlet Builder displays, click the down arrow beside the Add button and select JSP Element. The JSP Element Definition window appears.
Click the Browse button and navigate to %SYBASE%\PortalStudio\samples\ on Windows and $SYBASE/PortalStudio/samples on UNIX. Select addressbook.war, and click Open.
Click Upload to upload the file to the machine where the portal Web application is installed on EAServer or Tomcat.
When the file has been uploaded successfully, the WAR File and Web App Display Name are automatically entered for you and you see a prompt confirming the upload was successful.
Click OK.
In the Initial Resource field, enter:
index.jsp
Keep the Web App Qualified URL option selected.
Click Deploy to deploy the WAR file. You see the Portal Studio – Deploy window.
Complete these fields:
EAServer/Tomcat – select the application server on which to deploy the WAR file.
Host – enter the host name of the machine on which the application server is installed.
Port – enter the local host port number. Enter “9000” for EAServer, “8080” for Tomcat.
Admin Name – enter the administrator login used to log in to the application server. For Tomcat, the user must have a “manager” role.
Admin Password – enter the password for the login name entered.
Click Deploy. When you see a prompt that the deploy operation succeeded, click OK.
Enter the Element Name and click Finish.
In the Portlet Builder, click Save As.
Complete the options on the Finish window.
Complete the new element’s properties:
Portlet Name – enter “Address Book”.
Active – this option is selected by default. Deselect the option if you do not want this portlet to be active. Only portlets with an approved status and marked as active are available to portal users.
Iframe – select this option to display the portlet in an inline frame that can be placed inside of another HTML document or placed directly on a page with other elements flowing around it.
Unlike frames created using <FRAMESET> and <FRAME>, <IFRAME>
creates a frame that sits in the middle of a regular nonframed Web
page. <IFRAME> works like <IMG>, only instead of putting a
picture on the page, it puts another Web page on the page.
No Popup – available only when you select iFrame. Select this option to enable links in this portlet to display inline; that is, links will not display in a separate pop-up window.
Editable – whether the portlet can be edited by the users with the access roles to view the portlet.
Secure – whether this is a secure portlet.
Version – select this option to create a new version of the portlet each time you save it. Subsequent versions have new version numbers.
Parameter – used to create an invisible parameter to which you can assign click-across events.
This property does not display in the Portlet Properties
window that appears when you click Properties in the Portlet Builder.
In Context – indicates that the click-across session needs to keep the HTTP client in loop.
In Context helps address one-click capture Yahoo e-mail
portlet problems where there is a session value in the click-thru
links and the existing solution does not work. There is no way to
know when you need to use this option other than to try the normal
click-thru then select this option if the normal process is not
giving the desired results.
Title URL – shows the URL of the content you captured.
Help URL – enter the location of the online help file to associate with this portlet, or click Select to browse to and select the file.
Content Type – select the type of content this portlet will display.
Charset – select the character set to use in displaying this portlet’s content.
Category/Subcategory – select a category and subcategory that best fit this portlet.
Portlet Refresh Interval – select the interval at which you want this portlet’s content to refresh. The default is five minutes. The browser automatically makes a request for the portlet content when this interval runs down to zero.
The default is Daily, which translates into 1440 minutes.
Specify custom values by selecting Add New in the drop-down list. Specify this value minutes or seconds.
Default Size – select “Show All.”
Content Cache Interval – the interval at which you want the content of a portlet to be refreshed for the defined source. If this value is not Real Time, the content is held by the UWP cache for the duration of the specified interval. All requests made during this interval receive the cached content.
The default is Real Time, which means retrieve the portlet content from its source on every playback request.
Specify custom values by selecting Add New in the drop-down list. Select the minute/second drop-down list and enter a value in the text box.
Show Last Refresh – display the latest refresh image when the portlet displays. By default, this option is turned “on.”
Roles – select roles from the Available Roles list and add them to the Assigned Roles list to define what roles can access this portlet. See the Enterprise Security Administration Guide for more information on roles
User accounts with the roles in the Assigned Roles list
are the only user accounts that can access this portlet.
Description/Notes – add an optional description or note.
Click Finish. After a message displays that the portlet was saved successfully, click OK to return the Portlet Builder.
Select Status from the View By drop-down list, then click New on the Portlet Manager Status menu to see the new portlet in the detail view. All portlets are saved with a New status.
Right-click the Address Book listing in the detail view and select Status | Approved from the pop-up. When the confirmation prompt displays, click OK.
Right-click the Address Book listing in the detail view and select Active Status | Activate from the pop-up.
You have deployed the Address Book Web application. You have also created, saved, approved, and activated a JSP portlet in which to display the Address Book Web application. Next, add the portlet to a page.
Adding the JSP portlet to a page
Select Build | Pages from the Portal Studio left pane.
Click New on the Page Manager toolbar. The Page Builder displays.
Click the layout icon that indicates the portlet will display on 100% of the page.
Click Add. The Search window displays.
In the Name field, type “Address Book” and click Search. A listing for the Address Book portlet displays in the Results pane.
Click the Address Book listing and click Add above the Results pane. In the Page Builder, you see Address Book in the portlet list in the left pane and a cell representing the portlet displays in the right pane.
Click Save As. The Save Page window displays.
Complete these options:
Name – enter “Address Book”.
Type – select Catalog from the drop-down list.
Active – select this option.
Roles – hold down the Ctrl key and select PortalAdmin, PortalUser, and StudioAdmin, then click Add.
Click OK.
When a prompt states that the page was saved, click OK.
Click Close to exit the Page Builder.
When you return to the Page Manager, select New from the Status menu. You see the new page listed in the detail view, marked as active.
Right-click the Address Book listing in the detail view and select Approval Status | Approved from the pop-up. When the confirmation prompt displays, click OK.
Select Approved from the Status menu. The page now displays in the approved status detail view.
When a prompt confirms that the user pages have been updated, click OK.
Log out of Portal Studio.
Creating a servlet alias
Start Jaguar Manager and connect to the Jaguar server that has the search EJB installed.
For example, on Solaris, enter:
% cd $SYBASE/EAServer/bin
% jagmgr
On Windows, select Start | Programs | Sybase | EAServer 4.2.2 | Jaguar Manager.
When Sybase Central displays, select Tools | Connect | Jaguar Manager.
When the Login dialog box displays, enter:
Username – “jagadmin”.
Password – if you have not changed the “jagadmin” password, leave this field blank. If you have changed the jagadmin password, enter that password here.
Host Name – the name of the machine or host name for your installation.
Port Number – accept the default.
Click Connect.
Select Jaguar Manager | Servers | Jaguar | Installed Web Applications.
Right-click “addressbook” in the right pane and select Web Application Properties.
Select the Servlet Mapping tab.
Click Add and change the URL Pattern for “Address” servlet to:
/servlet/com.sybase.sample.addressbook.AddressBookServlet
Click OK to save your changes.
Right-click the Address Book Web application and select Refresh.
Select File | Exit to log out of Jaguar Manager.
Customizing personalization.properties
In any text editor, open personalization.properties, located in %EAServer%\Repository\WebApplication\onepage\WEB-INF\classes\ on Windows and in $EAServer/Repository/WebApplication/onepage/WEB-INF/classes/ on UNIX.
The current contents are:
connection_url = jdbc:sybase:Tds:changask:5000/portaldatabase
db_username = sa
db_password =
driver_classname = com.sybase.jdbc2.jdbc.SybDriver
Change the following:
connection_url – modify “changask:5000” to the host name and port number of the Portal Interface database.
db_username – enter the user name used to access the database.
db_password – enter the password for the user name you entered.
Save the file in the directory that started the EAServer process. If EAServer is started in $JAGUAR/bin (UNIX) or %JAGUAR%\bin (Windows), save the file there, then close the text editor.
Stop and restart EAServer.