Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

doubt on getParameterNames()  RSS feed

 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • 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.
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

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

Herman
 
Jilesh Lakhani
Ranch Hand
Posts: 49
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
yes, I wrote it twice.
Thanks both of you,
now it is working
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!