This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help in ArrayList

 
k swamy
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
In a Jsp Using the arraylist i am obtaining the object from the servlet.
when i access the values of the arraylist(arraylistname.get())
i couldnt get the values and the error thrown is JspException Compilation failed.
Can u please explain me in this.But i am getting correctly the arraylist size and all.
 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
the signature for the get method of ArrayList is:
yourList.get(int index);
and it returns the element at the specified position in this list.
 
k swamy
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah I have given the same syntax for the method in my Jsp.Still i am getting the error.can u please explain it why?
 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Coul�d you please post the fragment of code from your servlet and jsp where you do that, than it�s gonna be easyer to help.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, the full error stack trace is more helpful than "Compilation failed." (unless that's all it gives you, in which case your servlet runner sucks.)
 
srikanth bukkapatnam
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
probably you forgot to cast it. (String) list.get(i)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic