tags:

views:

36

answers:

0

Hello,

I'm attempting to upgrade a web application I'm working on from Java 1.5.0_06 to Java 1.6.0_16 and I've run into a problem concerning Jetspeed, the web portal I'm using.

Basically, I set some preferences for a certain portlet in my portlet.xml file, but it seems they're not being loaded.

The relevant portion of my portlet.xml file:

<portlet id="myID">
    <portlet-name>myName</portlet-name>
    <display-name>myDisplayName</display-name>
    <description>My Description</description>
    <portlet-class>org.example.MyClass</portlet-class>
    <expiration-cache>-1</expiration-cache>
    <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>EDIT</portlet-mode>
        <portlet-mode>VIEW</portlet-mode>
        <portlet-mode>HELP</portlet-mode>
    </supports>
    <supports>
        <mime-type>image/png</mime-type>
        <portlet-mode>EDIT</portlet-mode>
        <portlet-mode>VIEW</portlet-mode>
        <portlet-mode>HELP</portlet-mode>
    </supports>
    <supports>
        <mime-type>image/jpeg</mime-type>
        <portlet-mode>EDIT</portlet-mode>
        <portlet-mode>VIEW</portlet-mode>
        <portlet-mode>HELP</portlet-mode>
    </supports>
    <supported-locale>en</supported-locale>
    <portlet-info>
        <title>My Title</title>
    </portlet-info>
    <portlet-preferences>
        <preference>
            <name>Count</name>
            <value>0</value>
        </preference>
        <preference>
            <name>flag</name>
            <value>2</value>
        </preference>
    </portlet-preferences>
</portlet>

I have the following Java code in the doView function of my "MyClass" class:

String flagValue = preferences.getValue("flag", "");

My "flagValue" variable should contain "2" after the call, but it contains the empty string instead.

I'm not exactly sure what's causing this, as it was working before the Java change. Also, I've compared the jetspeed.log files between the two versions and can't really see a difference (not that that means there's not one there).

Any help would be much appreciated.

Thanks, B.J.