• Post Reply Bookmark Topic Watch Topic
  • New Topic

prb running servlet ..

 
Akshatha Nayak
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys ,
i'm stuck here with a prb ... is there anything wrong with the below given servlet ... coz i'm not getting any output which is a html page ...
servlet uses java bean classes .. i have imported all the necessary classes .. pls help me with this ..

Thankx in advance ..
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You're squashing all of your exception messages.
Why don't you either throw everything so the message comes up in the browser or use e.printStackTrace() so you can read the stack trace in your logs and see what the problem is?
 
Akshatha Nayak
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankx alot Ben .. i used printStackTrace method & i cud figure out what was wrong ..now its working ...
what i dont understand is y wasnt it printing when i used getMessage method .. coz i had a SOP statement in that method ..
Thankx again
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akshatha, please reduce the use of contractions in your posts (y, prb, cud etc). They only serve to make your posts harder to understand, and we should be aiming at improving communication.

(We don't charge by the letter!)

thanks,
Dave
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Becuase you were catching all exceptions but weren't doing anything with them.
e.getMessage() returns a string but you didn't do anything with the string.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David O'Meara:
Akshatha, please reduce the use of contractions in your posts (y, prb, cud etc). They only serve to make your posts harder to understand, and we should be aiming at improving communication.

(We don't charge by the letter!)

thanks,
Dave



Well said, and once again it shows that people who are careless in their written word are the same in code as he's eating all his exceptions
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!