• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

strange.. !! plz help me..

 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • 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)
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
one more thing..
Dont worry about request.getParameter(" ** ");
Not a problem there..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic