• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in using Enumeration

 
namrata suri
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have written a jsp which accepts n number of paired values i.e
"labelname and labelvalue"



Now, to catch these values I have written another jsp as follows



Problem is that instead of giving me the output in order like

label0 'a'
labelval0 '40'
label1 'b'
labelval1 '50' etc etc

its giving me

label0 'a'
labelval1 '50'
labelval0 '40'
label1 'b'

I need the values in order because I have to use them for formation of a string. Since, the outputs are random in order...I m facing difficulty.
 
Vijitha Kumara
Bartender
Posts: 3952
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
namrata suri wrote:

First you are doing too many things in JSP which would be refactored by using JSTL,EL etc.. and moving some code to a controller servlet. For your question, first you have to fix those typos like not quoting attribute values in tags and see how it works.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!