This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Dear sir in the above bean class i am calling a busness method getAdvice from a servlet file. But see i have written System.out.println() in the contaner call back method of bean class. But how these statment will printed in iexplorer. As we know that to print a statment on explorer you need to be the object of printwriter class but here how will i get the object of printwriter class that is response.getWriter()
You will do no such thing. The SOP calls are purely for logging purposes, they're not for data that should go back to the client.
That's not to say that in a real application you'd do it like that, you'd instead use some logging package to handle logging (like the standard Java logging or Log4J), but you would NOT return that information to the calling EJB client (in fact most of it you cannot return to the client because the methods are never called from the client).