Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a method from the servlet.

 
John Paterson
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

I have a servlet in which I create a method 'A' which basically instantiates a class and than invokes method 'B' from this class. I invoke this method A from the init method
of the servlet. I have a print statement both in method A, and method B. When I run the servlet I am getting the print result from method A in the console, but I don't get
anything from method B, which I believe implies method B is not being reached. The code looks fine to me. How do I trouble shoot this? I am using Eclipse Indigo. Hope someone
can advise. Thank you.

regards
John
 
Saif Asif
Ranch Hand
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello peter.

I think we will have a better understanding if you paste the code snippet here.

 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you are trying this out of curiosity, it looks like a not so good design to me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic