wood burning stoves 2.0*
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
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: 61413
    
  67

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: where to lookout for console messages while working in notepad?