File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieving data. Error thrown:The requested list key could not be resolved as a array type.

 
Samuel Castillo Romero
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,

First of all sorry for the dup. topic since I saw that issue before but I couldn't make it works on my own code so maybe anybody can help me on that.

Basically I am trying to create a form and for one of the fields I will like to put some data from the code itself (fill a dropdown list) but always I get the same error:

tag 'select', field 'list', name 'muestraCategoria': The requested list key '%{categorias}' could not be resolved as a collection/array/map/enumeration/iterator type

Let me show you my code (it is in Spanish, sorry about that)

JSP: buscaGestor.jsp



STRUTS: struts.xml


JAVA ACTIONSUPPORT




The only part which is not working is the one related to fill the drowpdown list. If I skip that one, everything is working fine... I tried to go thorugh the different issues already posted in the site but I cannot make it works.

I will really appreciate your help!

Thanks.
 
jatan bhavsar
Ranch Hand
Posts: 297
Eclipse IDE Java
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Samuel,

Refer This example. Name should be present in the pojo.

Its similar example which solve your problem.
Regards
Jatan
 
Samuel Castillo Romero
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jatan bhavsar wrote:Hi Samuel,

Refer This example. Name should be present in the pojo.

Its similar example which solve your problem.
Regards
Jatan


Hi Jatan,

Really helpful your guideline! I could solve the issue. Basically I was doing two thing wrong:

1. As you said, I had to put name present in the POJO with setters/getters methods.
2. Also, I noticed about a HUGE error in my code due to I was calling to that JSP file as a HTML so there was no action executing. Now, I am executing that JSP as part of an action and it is retrieving the data properly!

Now, the next step is retrieve the data from my DataBase which shouldn't be a big deal

Thanks a lot,
Sam.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic