[S2] Jsp not loading bean from superclass static method

View: New views
3 Messages — Rating Filter:   Alert me  

[S2] Jsp not loading bean from superclass static method

by Neil Aggarwal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello:

I jut upgraded from Struts 2.0.14 to 2.1.8
and noticed I am now getting this error:

SEVERE: Servlet.service() for servlet jsp threw exception
The requested list key 'accountManagerMap' could not be resolved as a
 collection/array/map/enumeration/iterator type. Example: people or
people.{name}

I have this in my JSP code:

<s:select label="Account Manager"
key="marketingContact.accountManager.emailAddress"
        list="accountManagerMap"/>

The method getAccountManagerMap is in a superclass and is static.

This worked fine in 2.0.14, did something change in 2.1.8?

Thanks,
        Neil

--
Neil Aggarwal, (281)846-8957, http://www.JAMMConsulting.com
CentOS 5.4 KVM VPS $55/mo, no setup fee, no contract, dedicated 64bit CPU
1GB dedicated RAM, 40GB RAID storage, 500GB/mo premium BW, Zero downtime


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: [S2] Jsp not loading bean from superclass static method

by Lukasz Lenart :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You have to define constant as below in struts.xml or in
struts.properties - from some version is set to false by default

struts.ognl.allowStaticMethodAccess=true


Regards
--
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


RE: [S2] Jsp not loading bean from superclass static method

by Neil Aggarwal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lukasz:

> struts.ognl.allowStaticMethodAccess=true

I will try that.

        Neil

--
Neil Aggarwal, (281)846-8957, http://www.JAMMConsulting.com
CentOS 5.4 KVM VPS $55/mo, no setup fee, no contract, dedicated 64bit CPU
1GB dedicated RAM, 40GB RAID storage, 500GB/mo premium BW, Zero downtime


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...