File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Help in ArrayList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Help in ArrayList" Watch "Help in ArrayList" New topic
Author

Help in ArrayList

k swamy
Greenhorn

Joined: Jul 31, 2001
Posts: 14
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

Joined: Jan 06, 2001
Posts: 977
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

Joined: Jul 31, 2001
Posts: 14
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

Joined: Jan 06, 2001
Posts: 977
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

Joined: Feb 20, 2001
Posts: 3695

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

Joined: Jul 31, 2001
Posts: 7
probably you forgot to cast it. (String) list.get(i)
 
 
subject: Help in ArrayList