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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 61103
    
  66

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?
 
Consider Paul's rocket mass heater.
 
subject: using a java variable in the jsp side