Servlet Debugging Issues

 < Free Open Study > 

When using web applications we can expect to see the same types of bugs as we see in standalone Java applications as well as problems that arise from the subtleties of the servlet model and the nature of web application programming. For example:

  • A single servlet instance may support multiple concurrent users in multiple threads. This has major synchronization implications if we're relying on the values we've stored in instance variables (as we'll see in the Chapter 11).

  • The servlet container is an active partner to our web applications. It manages the lifecycle of servlets, it handles incoming requests, and it tracks session-specific user data. When debugging web applications it is just as important to know what the container is doing as it is to know what our own classes are doing.

  • In a multi-user system, performance bottlenecks may occur due to multiple concurrent requests for common resources. So it is important to understand the interplay between the competing requests.

To help with this final point our definition of debugging includes profiling (the determination of the flow of control and use of resources) and performance monitoring (the measurement of the time taken for requests to complete). In fact, many of the techniques we'll learn in this chapter will be applicable to our investigation of performance and scalability in Chapter 13.

 < Free Open Study > 

Professional Java Servlets 2.3
Professional Java Servlets 2.3
ISBN: 186100561X
EAN: 2147483647
Year: 2006
Pages: 130 © 2008-2017.
If you may any questions please contact us: