Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help - Struts2 s:select issue - Urgent

 
Abhi Roy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this FAQ entry. What's "PoC"? How are you accessing the page?
 
Abhi Roy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic