This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes Need Help - Struts2 s:select issue - Urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Need Help - Struts2 s:select issue - Urgent" Watch "Need Help - Struts2 s:select issue - Urgent" New topic
Author

Need Help - Struts2 s:select issue - Urgent

Abhi Roy
Greenhorn

Joined: Jun 23, 2009
Posts: 22
Hello,

I need some urgent help.

I'm just trying to use an JSP which will display an list populated in the action class. Here is my code. The same code is using in the real project. But in my PoC setup, always I'm getting the following error

tag 'select', field 'list': The requested list key 'empList' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
at org.apache.struts2.components.Component.fieldError(Component.java:230)
at org.apache.struts2.components.Component.findValue(Component.java:351)
at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80)
at org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856)


I have spend my whole day, to find out the problem, but still in dark.

Here is my JSP


My Action Class


My web.xml


My Struts.xml


And you can find the lib file I have used as jpg attachment.
Please help me out.

My environment

1. Tomcat 6.0.14
2. Struts 2.0.16
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please read this FAQ entry. What's "PoC"? How are you accessing the page?
Abhi Roy
Greenhorn

Joined: Jun 23, 2009
Posts: 22
Thanks for your response David.
PoC is Proof Of Concept...my intension is to develop some other functionality and these should be the basic feature.. .and for your second question, I'm calling the page by http://localhost:8080/StrutsTabs/quizAjax!input.action...
Thanks
/Abhi
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

There's nothing in the list. The execute() method isn't called when you call the input() method--input() is.

This is one usecase for the Preparable interface.
Abhi Roy
Greenhorn

Joined: Jun 23, 2009
Posts: 22
Hello David,

Sorry for delayed response.I was out of station. Thanks for your feedback. Ya it was the problem and now it has been rectified.

Do you have any knowladge whether S2 checkbox has any bug? My problem in some of the system , the checkbox is working perfectly but in some of the system it is not.

Let me to explain the problem , the action class is configured to execute some special functon while the check will be checked, but I was astonised in some of the system , the action calss can not detect if the check box is checked.

I'm using Struts 1.0.12 and Tomcat 5.5.27.

Thanks again
/Abhi

 
GeeCON Prague 2014
 
subject: Need Help - Struts2 s:select issue - Urgent