Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

using a java variable in the jsp side

 
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.
 
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.
 
Marshal
Posts: 67289
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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?

 
permaculture is largely about replacing oil with people. And one tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!