Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes where to lookout for console messages while working in notepad? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "where to lookout for console messages while working in notepad?" Watch "where to lookout for console messages while working in notepad?" New topic
Author

where to lookout for console messages while working in notepad?

pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
i have written the following program which basically demonstrates Servelt life cycle.

i worked it in a notepad.


now where do i look for console messages??
[ June 15, 2008: Message edited by: Bear Bibeault ]
pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
public class LifeCycle extends HttpServlet {

public static int instanceCount;
{
System.out.println("Doing static initialization on LifeCycle class");
instanceCount = 0;

}

public void init() {
System.out.println("In init() on LifeCycle");
}

public LifeCycle() {
instanceCount++;
System.out.println("In LifeCycle constructor");
}

public void destroy() {
System.out.println("In destroy() on LifeCycle");
}

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("In doGet() on LifeCycle");
try {
throw new Exception();
} catch (Exception e) {
// Just doing this to show doGet() called from service()
e.printStackTrace();
}
}

}
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61084
    
  66

The fact that you used Notepad to write the code is pretty much moot. What matters is what servlet container you are using to deploy the web app and how it is configured.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
hi ,

i used tomcat 5.5 version server.


guys i got the information that it is found in logs file in tomcat directory.


thanks for the quick response
 
Don't get me started about those stupid light bulbs.
 
subject: where to lookout for console messages while working in notepad?