| < Free Open Study > |
|
We started this chapter by listing some of the problems associated with servlet development that make servlet debugging different from traditional debugging. We don't want our application to be adversely affected by simply observing it, which established that non-invasive techniques were the preferred approach to debugging web applications.
We demonstrated the usefulness of filters and event listeners by developing some simple non-invasive debugging components that could be added to any web application. These components were used to capture information about how a web application operates. As an alternative, we looked at the Java Platform Debugger Architecture (which is not part of the Servlets API). We saw how the JPDA offers greater debugging possibilities but at the cost of additional complexity and performance degradation.
For each of the techniques we produced debugging output in a consistent tagged format that lent itself to visualization and further processing. The TraceViewer class provided a simple example of this.
After comparing the three approaches, with filters and events listener coming out (just about) on top, we discussed how they could be brought together into a flexible debugging architecture based on the J2SE 1.4 Logging API.
Finally we looked briefly, at the idea of a novel runtime reverse-engineering tool, based entirely on what we covered in this chapter.
In the next chapter we'll look at some real-life servlet problems involving class loading and synchronization that can be investigated using the techniques we've learnt.
C |
---|
ConsoleHandler
coupling mechanism
|
D |
---|
debug trace
DebugFilter
debugging
debugging listener
debugging techniques/tools, 2
doFilter() method, DebugFilter class
doGet() method
doPost() method
duration> element
|
E |
---|
elements
event driven debugging, 3 event listener
event listeners
|
F |
---|
FileHandler
filter> element
filter-mapping> element
filters
formatters
|
H |
---|
Handler object
HttpSessionAttributeListener interface
HttpSessionListener interface
|
I |
---|
interfaces
invocation> element
|
J |
---|
J2SE 1.4
Java Debug Interface (JDI)
Java Debug Wire Protocol (JDWP)
Java Virtual Machine Debug Interface (JVMDI)
JBuilder IDE
JPDA (Java Platform Debugger Architecture)
JPDA debugger
JPDADebugger class
|
L |
---|
listener> element
logging
logging enhancements J2SE 1.4, 22
|
M |
---|
MemoryHandler
message> element
methods
|
P |
---|
processMethodEntryEvent() method
|
R |
---|
receiver> element
reverse engineering
|
S |
---|
sender> element
service() method
servlet container
servlet debugging see debugging. ServletContextAttributeListener interface
ServletContextListener interface
SimpleFormatter
SocketHandler
StreamHandler
|
T |
---|
thread> element
Tomcat
TraceViewer class
|
U |
---|
UML
|
V |
---|
VisualAge IDE
|
X |
---|
XMLFormatter
|
| < Free Open Study > |
|