• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using a java variable in the jsp side

 
ihsan kocak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your code creates an ArrayList with an initialCapacity of 1000 and size of 0.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dmf is not a standard JSP tag library. What is it?
 
ihsan kocak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a documentum(emc) tag.
Bear Bibeault wrote:dmf is not a standard JSP tag library. What is it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic