Win a copy of Spring Boot in Practice this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Problem in using Enumeration

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic