• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with JSTL

 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is piece of code that gives a list of fruit names in a drop down.
When i iterate and print this list in the bean this gives

But the output of the JSP prints this in the dropdown

Why is this list returning in square brackets and a space before each fruit name?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, a few questions about your code:

Is it really formated like that? Do you find it easily readable?

Why is there Java code in your JSP? if you are using JSTL an EL, there should be no Java code in your JSP.

Why are you copying the attribute from request scope to page scope? What is the purpose?

Why is this list returning in square brackets and a space before each fruit name?

What is the nature of the data in fruitsLst?

And what happened to the "i" in fruitsList?
[ September 06, 2008: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic