wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes using a java variable in the jsp side Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "using a java variable in the jsp side" Watch "using a java variable in the jsp side" New topic
Author

using a java variable in the jsp side

ihsan kocak
Ranch Hand

Joined: Mar 14, 2012
Posts: 31
hi all.i am trying to use a variable(an arraylist) which exists in java file(taskcompletion.java).i declared the variaable on java side like this:

public static List<String> yeniler = new ArrayList<String>(1000);



then i would like to use this variable in jsp page like this:



<dmf:label label="<%=form.yeniler.get(i)%>" />



but it gives an java.lang.IndexOutOfBoundsException size:0



how can i initialize the list before page use it?



Best Regards.
Paul Strachan
Greenhorn

Joined: Oct 24, 2004
Posts: 10
your code creates an ArrayList with an initialCapacity of 1000 and size of 0.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

dmf is not a standard JSP tag library. What is it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ihsan kocak
Ranch Hand

Joined: Mar 14, 2012
Posts: 31
It is a documentum(emc) tag.
Bear Bibeault wrote:dmf is not a standard JSP tag library. What is it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using a java variable in the jsp side
 
Similar Threads
generics what's the difference?
Extracting values from an ArrayList into String variables
Is it possible to send arraylist from jsp to javascript(same page)
Reading from a database with MVC
how to pass arraylist from jsp to java bean