On some application servers, there is a length limit on path names (including the file name) of 255 characters.
IBM® WebSphere® Portlet Factory generates JSP files and method classes based on the model name and any profiles applied to the model. In most cases, the file name lengths are well under 255 characters. However, when you use the model as a portlet in nested portals, the generated file could exceed the file length limitation.
To prevent the generation of file names that are too long, WebSphere Portlet Factory converts the profile names to a unique ID. You can determine the file length at which WebSphere Portlet Factory converts the profile name portion of a generated file name to an ID by setting the bowstreet.profiles.maxKeyLength
property in the WEB-INF/config/cluster.properties
file. The default value is 60.
does not refer to the length of the whole file name, just the length of the profile name portion of it. As a result, set the maxKeyLength
low enough to account for the portlet name, widget name, model name, and any other parts of the path to the generated file.
For example, the class generated for a model named datatablepage that is used as a portlet in a nested portal could have the following file name:
WebSphere Portlet Factory checks the length of the profile names embedded in the name and if it exceeds the value of the maxKeyLength
property (in this case, 60), it converts them to an ID. The following would be the result of the previous example:
Name conversions in the log
When WebSphere Portlet Factory initiates a name conversion and the mapping is used for the first time, an entry is made in the log file. This entry notifies you that a conversion occurred. The entry can look similar to the following.
*-- TIME: [Tue Aug 16 15:28:42 EDT 2002] --*
MSG:"Profile key is too long. Adding mapping for ID 139657846 to main_external_
You can see a generated file in your WebSphere Portlet Factory file system that looks like the following.
You can examine the log file to view the original profile names that were converted.
Parent topic: About profile creation: wpf7