Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

prb running servlet ..

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ..
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic