Click OK. Repeat the preceding steps if you want to add more customization

6-22 Oracle Fusion Middleware Developers Guide for Oracle Portal The new security role is added to the Available list. You can also manually create security roles.

36. Click Next to display the Caching Option page

Figure 6–15 . Figure 6–15 Caching Option Page

37. Select Cache Portlet if you want to enable caching for your portlet.

Selecting this option indicates that portlet caching is managed by the portlet container. The portlet itself may choose to cache content for any given response. The settings on this page apply only when the portlet itself does not specify a caching condition for a response.

38. In the Default Expiry Conditions section, select:

■ Cache Content Expires After [] Seconds if you want the cached portlet content to expire after a certain amount of time. Specify the time limit in the adjacent field. ■ Cache Content Never Expires if you do not want the cached portlet content to expire. You may want to select this option if the portlet contains static content that is unlikely to change.

39. Click Next to display the Initialization Parameters page

Figure 6–16 . Note: If you do not want any default caching for this portlet, choose Do Not Cache By Default. In this case, the wizard actually sets a cache duration of 0 seconds. As stated earlier, this cache setting only comes into play when the portlet itself does not specify a caching condition for a response. If you choose no caching here and you later decide that you want default caching for the portlet, you can easily go back and change the cache duration value in the portlet.xml file, which is generated by the wizard, to a number greater than zero. Creating Java Portlets 6-23 Figure 6–16 Initialization Parameters Page

40. Initialization parameters provide the Web application developer, who decides

what goes into the .war file, an alternative to JNDI variables for configuring the behavior of all of the different components of the Web application for example, servlets and portlets in a compatible way. These initialization parameters are added to the portlet.xml file. If you want to add an initialization parameter, click New. This adds a new row to the table of parameters. You can then double click the row to edit the details.

41. In the Name field, enter a unique name for the initialization parameter. Use only

letters, numbers, and the underscore character.

42. In the Value field, enter a default value for the parameter.

43. In the Description field, enter a description for the parameter.

44. To delete an initialization parameter, select it in the table and click Remove.

45. Click Next to display the Finish page.

46. Click Finish to generate the files for your portlet. The following files should be

generated for your project node in the Application Navigator see Figure 6–17 : ■ If you selected Generate JSP for the portlet modes, generated code for each mode If you selected Custom Code instead, that code will reside in the portlets Java class. ■ Two Java classes – packagename.portletname.java is invoked by the portlet container and contains all the methods required by the portlet standards Note: If your Portal is WSRP2 enabled, then the Portal Navigation Parameters page appears. Click Next to display the Finish page.