This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2-requested list key 'state' could not be resolved as a collection/array/map/enumeration/ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2-requested list key Watch "Struts2-requested list key New topic
Author

Struts2-requested list key 'state' could not be resolved as a collection/array/map/enumeration/

akshat Singh
Greenhorn

Joined: Apr 27, 2011
Posts: 4
Please help me in Struts2, I am stucked in action....

The problem is that I have a application form for accessing that form you should be registered in the database. So the login utility will check for the password & email in the database if it is there than it will go to the app. form otherwise it will throw an error. It is working fine until I want a dropdown in the form say that contains all the States and Cities of India. I want this thing to retrieve from the database but initially I am checking by hardcoding whether its working or not.

So, my Action contains 2 method one is default execute() method which is populating the States of India but the problem is that in the struts.xml file when I am not stating any method than it is executing the default execute method and populating the dropdown but the validation method is not executing and when I am passing the validating method than it is not populating the dropdown. I am sending my codes please help where I am wrong, its very urgent yaar.

I tried redirection also by Message-Store-Interceptor also but that is also not working when I tried to write the states addition list separately in a class file.

Struts.xml


tiles.xml


ApplyAction.java



JSP File


I am also trying like this......
ApplyAction.java


So, how can I pass the value of State & StateID in the jsp <s:select> tag's list, I tried many options but neither of them working, Please help..........
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2-requested list key 'state' could not be resolved as a collection/array/map/enumeration/
 
Similar Threads
Struts2 tiles ActionClass not detected
ejbLoad is not getting called
How to display data from database to JSP Page in Struts2
problem in getting Blob data and displaying
Is it possible to enhance this code further?