• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

doubt on getParameterNames()

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
I am getting different types of exceptions while calling.


It displays some set of name and value pair. After Exception is thrown.
.......................................
.........................................
16:22:32,750 INFO [STDOUT] Name ::: opcode Value ::: 01/04/2004
16:22:32,750 INFO [STDOUT] Name ::: hidbusinesspartnercode Value :::
16:22:32,750 INFO [STDOUT] Name ::: accountRight Value :::
16:22:32,750 INFO [STDOUT] Name ::: periodFlag Value :::
16:22:32,750 INFO [STDOUT] Name ::: hidEndDateFrom Value :::
16:22:32,750 ERROR [Engine] ApplicationDispatcher[] Servlet.service() for servlet jsp threw exception
java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:790)
................................
...........................


But ,in API , the methods do not throw any exeption. if it is not found , simply returns null.
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

nextElement() declares to throw NoSuchElementException
Looks like you call it twice after each hasMoreElements()

Herman
 
Ranch Hand
Posts: 49
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


You are doing nextElement() twice thats the reason try this out it would surely help you!!
 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, I wrote it twice.
Thanks both of you,
now it is working
 
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic