Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

strange.. !! plz help me..

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, i'm into something kinda new problem..
here it goes..
Actually, I have a servlet, which works fine when you submit the log-in page..
But you know,.. I have a MENU at the top of the page.. and when you click on it..( linking it to the same servlet ).. it gives a problem..
It's a NULL pointer Exception.. but why..??
here is the problem.. :
Will not all the Queries RUN again..???

servlet runs fine, when form is submitted.. thats the first time servlet runs in the session..
When you click on the MENU item.. i am making it run again..
BUT the results of all the Queries are showing NULL.. why is this happening..???
Am I going somewhere Wrong ..???
Please let me know.. it would be Great !!
Thanks a lot for your help guy(s)/gal(s)
 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you re-executing your Statement and getting a new ResultSet?
Once you've exhausted the ResultSet, result.next() is going to continue to return false.
 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx for your reply..
Yeah I am re-executing my Statement to get a new ResultSet.. Is this Wrong..??
Because before anybody clicks on the MENU-item.. there is a possibility that the Home page ( which i'm linking servlet to, changes )..
So re-executing, Am i doing something wrong..??
plz let me know,... it would be GREAT.. !!
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to show us more of your code.
 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot..
ok i'm enclosing my code.. (most part .. )
just concentrate on the performTask method...
 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
one more thing..
Dont worry about request.getParameter(" ** ");
Not a problem there..
 
Shiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic