Introduction This is part of a series of articles, this series of articles will discuss and use
WebSphere® Personalization (hereinafter referred to as Personalization) and
WebSphere Portal (hereinafter referred to as Portal) related topics. In Part 1, we describe how to establish a personalized portlet and web application. In the rest of this series of articles, we will build on the basis of your personalized portlets you want to build in Part 1. In this article, we will also describe WebSphere
personalize
Basic rules, you will need to understand it in order to read future articles. We are writing this series to help you start learning; this series of articles is not intended to provide an in-depth understanding of personalization or Portal. For more details on personalization and portal, see the references at the end of this article. We also provide the files necessary to build the library table used in this example (see the following)
Download this section). In the downloaded zip file, we include the last portlet, which is provided for those who are willing to browse the original code and experimentally developed portlets.
Prerequisites To build examples in this article, you must have the following software installed on the system. It is important to have exactly the same software on the machine:
DB2® Universal Database version 7.2 and Revision Kit 5 IBM HTTP Server, version 1.3.19 WebSphere Application Server, Advanced Edition, Version 4.02 WebSphere Studio Application Developer version 4.03 WebSphere Studio Application Developer WebSphere 4.0's Personalization Wizard WebSphere Portal 4.11 or 4.12 WebSphere Personalization 4.1 WebSphere Studio Application Developer WEBSPHERE Portal Toolkit Job System :Windows 2000
We recommend that you use WebSphere Portal Setup Manager to install the above software.
WebSphere Personalization Overview WebSphere Personalization allows developers to build a web page that is interested in stations viewers. It allows developers to choose content that is suitable for station viewers unique needs and interest. Personalization provides easy-to-use, web-based tools to help corporate users build personalized rules, thereby personalizing the contents of each unique platform viewer.
Three basic components of any personalized solution
User profile: Compose for the information about stations, including the user properties you can use to demonstrate what type of content to the station viewer. Developing an excellent user profile is critical to your personalization solution. Content Model: Define the properties of the content you want to deliver the contents of the station viewer (for example, product description, number, etc.). In WebSphere personalization, the user profile table and content model are called personalized resources. These resources are treated as a Java category.
Reference information for user information or content
Stored in external materials. To define personalized resources, you need to create a Java category, these Java categories comply with WebSphere personalized API and map to your information storage area. This API is composed of several functions, and Personalization Resource Engine calls these functions when executed under a rule to retrieve the selected content. You can use WebSphere Studio Application Developer (hereinafter referred to as Application Developer) to generate these categories. In the case where the data storage area is neither an associated database nor the LDAP directory, you will have to do the required API. You can create a resource for any content accessible with Java program, so you can personalize you
The content is not limited. Anything
Humanity
Solution should at least have a user resource and one or more content resources. Once these resources are established, they need to be released.
Humanity
In case of execution, such a rule can refer to and use them. The above work can be done by publishing resources from Application Developer, or through these resources into Personalization Resource Console. Matching Technology: In order to match each user with the correct content, you can use filtering, business rules, recommended engines, or combinations of these three. WebSphere personalized support all three methods that match the user with the content. We will use business rules for this purpose. Please use personalized Workspace Rule Composer to build a variety of rules. The rule is to define what content of the business logic is available on the platform when the user's functions are allowed. The rule editor allows you to establish an easy-to-read logical statement that determines what jobs to do with information (including user resources and content resource definition, date, time, request, and application objects, and application objects). These jobs often involve determining what is selected, but can also be used to update attributes. To help you personalize the web platform, WebSphere personalization provides three rule types: Classifier Rules, Job Rules, and Binding Rules. The following describes the types of these rules:
The classifier is used to divide the platform to divide the platform into several parts (eg, gold medal, silver or bronze medal) based on the attribute included in the user profile table. You can also use the classifier based on other conditions (such as information collected by the current date and time, or by implicit or explicit profile analysis). In a future article, we will further explain the analysis. The table below illustrates an example of the classifier rule. In this example, if the user's role property is Manager or Executive, the classifier userclearance is set to confidential; otherwise it is set to regular.
Userclearance IS confidential when current personnel.Role is equal to manager or current personnel.Role Is Equal to Executive OtherWise Regular Jobs determined what can be used to update values. You can also sort the results of the job rules. The table below illustrates an example of the job rule. This rule selects the content launched as confidential.
Select Content Whose News.confidential Is Equal To Y is a combination of jobs and classifiers. In a series of sets, one or more classifiers are combined with several job rules to form a stable rule. In the table below, the GetNewsbyclearance line rule is explained: If the user's classification is confidential (for example, the user is classified, because he or she is an Executive or Manager, the GetConfidentialNews job is performed. This rule also describes the GetSiteNews rules. In this example, if the userclearance is classified as confidential, the result will be the content returned by the GetConFidentialNews rule and the getSitNews rules. When Userclearance is confidential do getconfidentialnews always getsitnews Order As Is Show All Items
WebSphere Personalized Development Environment Personalization Development Environment Composed of the following groups:
WebSphere Studio Application Developer provides wizards through the Application Developer 4.0 Explea WEBSphere Personalization Wizard. If the user data or content information is in the relational database or in the LDAP directory, Application Developer produces your resource. If the information is located in any other location, you will have to do the personalized API necessary for that resource. In this case, Application Developer provides a complete, integrated development environment for developing classes for the actual API. Application Developer also provides a wizard for establishing content points, which is a reserved location for rules for filling in the JSP page. Personalized workspace is a browser-based tool for enterprise users to help corporate users easily establish rules and contribute, assign rules to content points and preview rules on the web station. . The rule editor allows you to build easy-to-read logical statements that use messages from user resource definitions and content resource definitions to determine what job to do (or transmit content from the content source to the web station) Or through update storage information).
WebSphere Personalization execution time The environment is composed of Personalization Server (which is performed on the WebSphere Application Server). The main components of execution include:
The Rules Engine Rule Engine (Recommendation Engine) The basic execution process is composed of the following stages:
When the web client requests a personalized web page (it is a JSP page with content points), the process begins. The WebSphere Application Server JSP compiler calls a method at the content point, and this method then calls the API of the Cancel Engine to perform the rules. Rule processing includes accessing resources that are defined to the resource engine, and retrieve user data and content data from customer data storage. The Personalization API is provided with the actual processing of the query for the customer data storage area to access the resource. Personalized portlets Overview In this section, we describe the personalized portlet you want to build. This example simulates a simple banking news application. This model consists of two simple tables: Customer and Customernews. All user data is defined by the Customer table and stored there. Content model storage is a Customernews table. The viewers of this platform will be classified according to the balances in their bank account. Classified as follows:
Basic
Account balance <= 100
Advantage
Account balance> 100 and <= 1000
Preferred
Account balance> 1000 and <= 10,000
Premium
Account balance> 10,000
We define job rules for each category in these categories. The job rules that will be established as part of this example are:
GetCurrentuser
This job rule returns a message about the current user.
GetBasicNews
This job rule selection is returned to Basic News. This news is for those customers who are classic (ie, the balance is less than or equal to 100).
GetVantagenews
This Job Rule Select Level attribute is an Adavantage news. The news is suitable for those who are classified as Advantage (ie, the balance between 100 to 1000).
GetPreferredNews
This job rule selects the level of the level attribute as preferred. This news is suitable for those who are classified as Preferred (ie, the balance between 1000 and 10,000 customers).
GetPremiumNews
This job rule selects the level of level attributes for premium. This news is suitable for those who are classified as Premium (ie, the balance exceeding 10,000 customers).
To create this sample, complete the following steps:
Create a portlet application in Application Developer. Establish a user resource and content resource corresponding to the Customer Table and the CustMomernews table. Establish content points for rules. Create a JSP, then add the content point and the corresponding program code to the JSP. Publish resource classes to WebSphere Personalization. Establish a WEBSPHERE personalized work area project. Establish a rule and associate them with the content point. Publish a project from a personalized work area. Create a WAR file and deploy portlets from Application Developer. Register sample users and view personalized portlets.
Create a portlet application in Application Developer First, use the wizard provided by Portal Toolkit to establish a project in Application Developer. Portal Toolkit provides a wizard that can be built for any common portlet type. This is useful because it generates all required files (such as portlet.xml and web.xml), add the desired JAR file, and establish a building path (Build ClassPaths) and the environment in the correct directory structure. This allows you to focus on writing the actual portlet code, without worrying about the infrastructure. This toolbox also provides the ability to defect portlets; we will introduce this topic in an article. Launch WebSphere Studio Application Developer
Select Start => Programs => IBM Studio Application Developer => IBM Studio Application Developer. Select Perspective => Open => Other to launch the SELECT PERSPECTIVE window. Select the portlet in this window, then press OK. Now, you have prepared it for the establishment of a portlet.
Establish a PORTLET application project
Select File => New => Portlet Application Project to launch Create a portlet Project Wizard. Enter the PersSampleportLethome in the Project Name field. Make sure you select Use Default location. Enter PersSampleportleTear in the Enterprise Application Project Name field. Enter the PersSampleportLethome in the Context root field. See Figure 1. Press Next. Figure 1. The initial screen of the CREATE A Portlet Project dialog box selects the Basic Portlet radio button on the next screen, then press Next. Create a portlet project - The Basic Portlet Parameters dialog is open. Enter the PersSampleportLethome Application in the Portlet Application Name field. Enter the PersSampleportLethome portlet in the portlet name field. Enter the PersSampleportLethome Application in the Concrete Portlet Application Name field. Enter the PersSampleportLethome Application in the Concrete Portlet Name field. Enter the PersSampleportlet in the Concrete Portlet Title field. Enter mypersSampleportlet in the Portlet Class Name field. See Figure 2. Press Finish. Figure 2. CREATE A Portlet Project - Basic Portlet Parameters dialog box In Navigator View, check your original project. You should see two folders called PersSampleportleear and PersSampleportLethome, and its directory structure is similar to Figure 3. Figure 3. Portlet project directory structure
Establish user resources and content resources Next, create personalized resources using Application Developer Personalization Wizards. Each personalized portlet must have a user resource and one or more content resources. Users resource description The properties of the user currently logged in to Portal. Content Resources Description You want to personalize the properties of personalized content. Personalization rules use this message to match the correct content with the correct user. Make sure that personalization Wizards appears in the Portlet Application Developer View If you do not see Content Spot Wizard, Content Wizard, and User Wizard in the Application Developer Tools, you can add them through the following steps. See Figure 5 below to see what these illustrations look like.
Select Perspective => Customize. Expand the Other folder, as shown in Figure 4, then select a personalized Wizards to check. Figure 4. Add personalized Wizards to your perspective
Establish user resources
Create a folder named PERSSAMPLEPORTLET under the Source folder. Highlight the PersSamplePortlet folder, then select the user wizard illustration, as shown in Figure 5. Figure 5. The first screen that launches the User Resource Wizard Personalization User Wizard is open. Select Database (SQL) in the Protocol field. Enter JDBC: DB2: Sample in the Database URL. Enter WSDEMO in the User ID field and enter WSDemo1 in the Password field. Make sure IBM DB2 UDB Local is selected as Driver Identifier and accepted all other preset values. Next, press Connect. See Figure 6. Figure 6. User Wizard Logon page When the connection is successfully completed, a new set of notebook tabs appears. Press the TABLES page sign. Select the Customer Table from the Availabel Tables listed on the left, then press the> button to add it to the SELECTED TABLES list. This is the primary table for the user resources. Figure 7. USER WIZARD TABLES Terminal Table Sight Press Next to turn to the columns page. Press >> buttons on the Column page to select all columns in this table. If this table has a lot of columns, you will be able to choose which column you want to choose. Only when you need to write rules to use a specific list of values to determine which line should be part of the result setting, or only when you need to display a column as part of the result settings, only Press the finish page sign. Please note the name of the resource file generated by the elves. Press the finish button. Figure 8 highlights all files generated by the user wizard. Note that these resource files are compiled and placed in an appropriate directory in the project. Figure 8. User Wizard Output
Establishing a content resource To create a content resource using CONETENT WIZARD, complete the same steps as you use to build user resources. Select Content Wizard in the Tool Column to start the wizard (to find the correct illustration, stop your cursor on the illustration to see the suspended annotation). Make sure you have selected the Customernews table as your content resource. Figure 9 shows the file generated by Content Wizard. Figure 9. Content Wizard Output
Get a short form of LDAP user identification Once Application Developer Wizards have generated Java files for resources, you must make some small modifications. This step is necessary when using personalization and security together with Portal. When you use personalization outside Portal, you must be responsible for telling personalized execution by setting PZN.username in a personalized context. However, when security is enabled, personalization
Do not use pzn.username when executed. Instead, the user name is obtained from LDAP. Unfortunately, this value is the full user identification of the Distinguished Name (DN) syntax. For example, the format of this name will be user: foosball.raleigh.ibm.com: 389 / uid = USER1, CN = USERS, DC = Raleigh, DC = IBM, DC = COM. To identify information,
personalize
It is only necessary to identify the user when executed, in which the user identifies the information to USER1. Therefore, you need to delete all additional messages, otherwise personalization will never match this user identification information. To do this, you can write a conversion program class and register it through the Resource Console; for this sample, we will take a shortcut and actually on a different way:
Add the following method to the CustomerManager.java file:
/ * TranslateAuthid Removes All The Extra Stuff That Gets attached as part of the dn * /
Public String TranslateAuthID (String Name) {
/ **** if ldap, set to uid **** /
/ ***** Find uid = ******* /
System.out.println ("The Name That Has Been Passed IS:" Name);
String Delim = New String ("UID =");
INT x = name.indexof (delim);
/ ****** Find comma ********** /
String Comma = new string (",");
INT Y = Name.indexof (COMMA, X);
/ ******* GET UID ********* /
IF ((x> = 0) && (y> = 0)))
Name = name.substring (x 4, y);
System.out.println ("*** new name =" name);
Return Name;
}
You can see that the above method completely deletes the additional numerals included in the user identifies the data, and then returns the name when executed by personal execution. Next, update the Public Resource FindById (String Name, ResourceContext Context) method in CustomerManager.java to call the above method. Add the following code in front of the Try Block:
// Changes Needed to Strip Out The Extra LDAP stuff
System.out.println ("Name Needed to Convert:" Name);
String translatedname = translateauthid (name); System.out.println ("Translated Name: TranslatedName);
Name = translatedname;
// end of change
System.out.println is not required, but join them will help you understand whether your program code is working in the content displayed in the log file.
Creating a content point Since you have defined some resources, you can use the Application Developer Personalization Content Spot Wizard to create content points. Please note: To build content points, first you have to build resources (you have already done), because you must define what type of content will be used to fill in content points.
Select the PersSampleportlet folder and select the Content Spot Wizard icon. Figure 10. Starting Content Spot Wizard Press the rule type page sign in Content Spot Wizard. Enter getCurrentUserspot as the name of the Content Spot Java Bean. Select PersSampleportlet.custom in the drop-down menu. See Figure 11. Figure 11. Complete Content Spot Wizard Press Next and press the finish button. The elf produces a Java Bean package form for content points. Complete the same step to create another content point. Name this content point GetCustomernews, then select PersSampleportlet.customernews as the return type. In the Navigator window, you will notice the elf generated a java file for each resource:
getCurrentUserspot and
GetCustomernewsspot.
Add the content point to the JSP file, now add the content point created in the previous step to the View JSP file, then add the program code to refer to the field in the content point you want to display.
Patrol the View.jsp file (see Figure 12), then press the second file, turn it on the JSP Editor. Figure 12. Patrol the View.jsp file Press the Design page sign and delete all existing content. Select getCurrentUser.class in the Navigator window, press the left mouse left button, drag the file to the top of View.jsp edit the window, and place the file here. An Attributes window is turned on. Press OK to accept the preset value. Complete the same steps, drag getCustomernews.class and place them on the JSP. Press the Source Term check in the window to see the UseBean label generated when you place the content click file in the JSP. Modify UseBean declaration as shown below (please pay attention to
"finished
/
"From
Remove in the UseBean tag and use the usebean> tab, this is the same for each bean): Your JSP page The original announcement looks as follows:
<% getcurrentuserspot.setRequest (Request);%> jsp: usebean>
jsp: usebean>
The above change is required for each content point you add to the page to connect to WebSphere Personalization.
Add program code to JSP to implant content points Now, use JSP Editor to add two tables to JSP. These two tables will eventually fill in content according to a rule. As soon as I now, you will associate each table with a content point. In essence, this is to link a resource with each table.
Create a table to display the user message
Press the Design page sign in JSP Editor. Select INSERT => Table to create a new table. Specify 2 rows and 1 columns, then press OK to close the dialog. Next, press the table below to start its Attributes dialog box. Press the Dynamic Terminal. Refer to Figure 13 after you finish this step.
Select the Loop Nuclear Cube. Specify 1 for the Start line, specify 2 for the END line. Select the Browse button to launch the Bean Property Selection dialog box. Select getCurrentUserspot.ruleContent [], then press OK. Press the OK on the Attributes dialog to close the dialog. Figure 13. Bean attributes dialog box and Bean Property Selection dialog box In the previous step, resources have been associated with tables. Now specifies which attributes you want to use or which column implantations are used. Select the first line of the table, enter "you are logged in as:". Put the rocker on the right side of the pure text, select INSERT => Dynamic Elements => Property Display. Select Browse in the Attributes dialog box to launch the Bean Property Selection dialog. This time, select the userID property, then press OK on each dialog box to close these dialogues. Select the second line on this table, enter "Your Account Balance IS:". Complete the same steps above, but this time you choose Balance property.
Create a table to display personalized news
Receive view.jsp through the second table to this page. Complete steps 2 to 4 in the previous section, but this time the Start line and END rows are specified as 2, and the loop property is set to getCustomernewsspot.ruleContent []. See Figure 14. Figure 14. The BEAN Property Selection dialogue of the second table After you complete the Bean Property dialogue, the first line of the watch is highlighted, then enter "Here is your personalized news ...". The second line will include the returned news. In the first step, you have established a loop on this line, so you will generate a row for each news that returned. Highlight the second line, then select INSERT => Dynamic Elements => Property Display. Select the Content property in the Bean Property Selection dialog box, then press OK. See Figure 15. Figure 15. Select the content you want to display in the table Press Ctrl-S to store View.jsp. Releases a personalized resource category Since we have established our resources and content points, then we need to build some rules to fill in content points. Before doing this work, you must know these resources when you do personalize. Please use the Personalization Resource Console to complete this work. Note that you can also reach the same purpose by defining the Publish Server in Application Developer and then use it to publish these resources. First, discharge resources and content from Application Developer:
Select File => export => file system. Select the following items (see Figure 16 below):
Whole PersSampleportLethome / WebApplication / Web-INF / CLASSES / PERSSAMPLEPORTLET folder. The entire PersSamplePortleThome / WebApplication / Resources / PersSampleportlet folder. For the exchange of destination, enter d: /websphere/appserterial/installedapps/personalization_runtime.ear/persadmin.war/web-inf/classed, where D: / is a disk machine where WebSphere Application Server is installed. Press FINISH if prompted to create a category directory, select Yes. Figure 16. Remitting Resources Figure 17. Specifying the Exit Directory Next, make sure the WebSphere Portal is being executed. If WebSphere Portal is not executing, start WebSphere from Services Windows, start the WebSphere Administrative Console, and make sure that the Portal Application Server is performed until the next step. Enter http://localhost/wps/persadmin/adminframe.jsp in the location field of the browser window to open a personalized resource console. Use the full host name instead of the local host. If you are prompted to identify the data and password, you can enter WPSADMIN and WPSADMIN separately. Press Import on the Resource Hierarchies page sign. Enter file name D: /websphere/appserver/installedapps/persAlization_runtime.ear/persadmin.war/web-inf/classess/resources/persSampleportlet/customer.hrf, then press Import. Similarly, D: / Indicates the disc installed on the disk machine. This time, through the steps to the Customernews.hrf file, repeat the procedure to enter Customernews. Verify that the resource has been exchanged by turning to the Resource Collections page sign. Now, the resource appears in the Collections drop-down. Figure 18. Personalized Resource Console Establishing a New Society Workplace Project now, establish a project in a personalized work area, you can use the rule editor
personalize
Define your rules in the workspace. First, join a release server that defines where you want to post your rules, and then you will create your own project.
Have to start
personalize
Workspace, please enter http://localhost/wps/persworkspace/index.jsp in your browser. Remember to replace the local host with the full host name. User identification information wpsadmin and password wpsadmin or user identification information WPSBIND and password WPSBIND login to the workspace. Press Global Settings. This launched a personalized Global Settings window. Figure 19.
personalize
Workspace Select Manage Publish Servers, then hold down the button on the right to add a new release server. Figure 20. Personalized workspace Global Settings Enter the value of the release server, as shown in Figure 21, and then press SAVE. Please do not choose the Requires Authentication Nuclear Note. If security is not enabled in Portal, please do not enter the user identification information and password. Figure 21. The Add Publish Server dialog is next to establish a project. Select Manage Projects, and then press and hold to start the process of establishing a project. In the Add Project dialog box, select Create New, enter the D: / PersSampleportlet in the Project Path field, and enter the PersSampleportlet in the Project Name field (see Figure 22). Then, press OK. Figure 22. The Add Project dialogue Edit Project dialog is now open (see Figure 23). Figure 23. The Edit Project dialog box completes the steps shown below (make sure the software
The disk machine is reflected in the actual location on your system):
Enter a D: / PersSampleportlet in the Campaign Path field. Enter d: / penssampleportlet / rules in the Rule Paths field. Enter d: /websphere/appserterial/installedapps/Persadmin.war/web-inf/classes/resources/web-inf/classes/resources/perssampleportlet. Please note that resources are reside. HRF file resident here. Enter d: /websphere/appserterial/installedapps/Persadmin.war/web-inf/clasadmin.war/web-inf/clasadmin.war/web-inf/clasadmin.war/web-inf/clasadmin.war/web-inf/clasadmin.war/web-inf/clasadmin.war/web-inf/clasadmin.war/web-inf/classoness. Please note that the resource interface class is left here. At this point, you don't need to preview the JSP page, so don't fill in the column related to Preview. We will introduce this topic in a future article. Press Save to leave the dialogue. Finally, press Make Current to activate the item for this user. Figure 24. Complete personalization of global settings
Establish a personalized rule now, we will build three rule:
Classifier Rules: We will establish a Userlevel classifier rule that classifies users according to the balance on the user account. Job Rule: We will establish six job rules, the first is getCurrentUser, which gets the current user's message. The remaining five job rules get news projects based on their suitable user and other levels. Series Rules: We will establish a GetCustomernews line rule that links the classifier rules and job rules.
Establish a UserLevel classifier rule
Press the Rule Composer page sign. Make sure to select Classifiers in the drop-down menu, then press and hold to create a new rule in Rule Composer (see Figure 25). Figure 25. Call Rule Composer to establish a rule to name the classifier UserLevel. Please note that the parable in the main part of the rules is super-connected. You only need to choose a super-link once, then fill in the result dialogue. Press the rules main part
Classification, then name this classification Basic. Press resource.attribute and select the Current Customer Resource radio button and the Balance property radio button, as shown in Figure 26 below. Figure 26. Select a resource and its property to select IS Equal To, then change it to is Less Than or Equal To. Select Value and enter 100. Continue to join the classification until the rules look like Figure 27 below. When you need to add more than one condition for a classification, please select Add Condition. When you do this, press Save. Figure 27. Final Userlevel classifier rule
Establish a GetCurrentUser job rule
Be sure to select Actions in the drop-down menu, then press and hold to establish the first job rule. Name it GetCurrentuser. Note that in Figure 28, you need to select the Specify Another Attribute Sylrow button, and then press Browse when setting the VALUE field. When you store this value, it will change from Customer.UserID to Current Customer.UserID. Figure 28. Establishing the GetCurrentUser Figure 29 shows the rules of completion Figure 29. Final GetCurrentUserrule
Establish a GetBasicNews job rule
Press to establish the next rule. Name it GetBasicNews. Establish a GetBasicNews job rule so that it
Similar
Figure 30 shows. For this rule and the rest of the job rules, you need to select the Specify A Value of Type Text radio button when setting the Value field. Figure 30. Final GetBasicNews
Establish the remaining four job rules to establish the remaining four job rules: PGETADVANTAGENEWS, GetAllNews, GetPreferrednews and getPremiumNews. Complete the same steps as you use to build GetBasicNews. For example, for GetPreferRedNews rules, the selection level is set to Preferred content. Figure 31. Job rules
Establishing a GetCustomernews line rule In this rule, you will cause the classifier rules and jobs you created in the previous steps:
Be sure to select Bindings in the drop-down menu of the rule type, press Start the rule editor. Name the rule getCustomernews. When you press Classifier, an available classifier will appear. In our example, we only define a classifier. Select the Userlevel classifier. Figure 32. Select a classifier in a series of tuning rules When you press the Classification, the classification list that appears in front of you is the classifier defined for your previous steps. Figure 33. Select a classification. Similarly, press DO Action to see the list of all job rules you have already defined. Choose the job rules that best use the classification you are processing. Complete the GetCustomernews line rules, as follows: Figure 34. GetCustomernews line rules Related rules and content points now
Press the Campaign Manager page sign in the work area. Select Normal View on the left. It shows the list of content points in this item. Please note that all items in the rule column are empty. Press the EMPTY link in the RULE column and select a rule from the available rule list to assign a rule for each content point. Use FIGS. 35 and 36 as a guide. Figure 35. Select the Fill Content Spot dialog block of the getCurrentUser rule. Figure 36. Assign the rules to the view after the content point
Issuing a personalized project You have defined all the rules and assign them to the content point, then you can post a project. This makes the rules are available for personalization.
Select Global Settings. Select Publish Files. Make sure to select PersportletServer, then press Publish.
Restall the WAR file from Application Developer, you have completed the establishment of all personal components and prepare for your portlet. Returns the Application Developer to the portlet.
Right-click PersSampleportLethome in Application Developer and select Export War. Figure 37. Export WAR file Select the location you want to put on the WAR, then press Finish. Figure 38. Details of the remapping of the WAR file
Deploy and test portlet in WebSphere Portal
To deploy the portlet on WebSphere Portal, enter http: //
Press the Edit Layout and Content Tilemill in the Work With Pages. Press GET portlets. Enter the PERS in the Name Contains field, then press GO. then
click it once
Your portlet's Plus icon to add this portlet to the portlet list, then press OK. Select the portlet, then press the Add Portlet to Container icon. Press the Activate activation page. Press the Security page sign in the Portal Administration group
. On this page, grant portlet to all verified user's view access rights. Now you prepare for your personalized portlet. Before you test it, make sure you register for three user identification materials USER1, USER2, and USER3, and password USER1, USER2, and USER3. Next, log in to Portal with user identification data USER1. Choose the page group and page of the portlet. The following page will be turned on, this page shows the details of the PersSampleportlet .. Figure 39. The portlet output of User1 is next to log in with user2. Note that the balance of USER2 is 1002, so it is classified as preferred. Therefore, User2 will see news related to Preferred customers. Figure 40. User2 portlet output
Conclusion In this article, we demonstrate how to develop a simple and personalized portlet. Specifically, we show you a short form of how to use WebSphere Portal Toolkit and how to get user identification materials from LDAP; these topics are unique to WebSphere Portal and WebSphere Personalization. We will explore more advanced themes in future articles.
Related reference
WebSphere personalized news center. for
Personalization
Information Provides fast and concentrated information. WebSphere Portal message center. Provide rapid and concentrated information for Portal information. Portlet catalog. Hundreds of portlets for you to download and review. WebSphere Studio Application Developer Portal Toolkit Help file (please select Portlet Developer Document from Application Developer Help Perspective). Update to some message centers. Pike and melissa. WebSphere Personalization 4.0 WEBSPHERE Studio Application Developer Wizards. IBM WebSphere Developer Technical Journal. May 2002.