Static Analysis for Java Servlets and JSP

  • Christian Kirkegaard
  • Anders Møller
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4134)


We present an approach for statically reasoning about the behavior of Web applications that are developed using Java Servlets and JSP. Specifically, we attack the problems of guaranteeing that all output is well-formed and valid XML and ensuring consistency of XHTML form fields and session state. Our approach builds on a collection of program analysis techniques developed earlier in the JWIG and Xact projects, combined with work on balanced context-free grammars. Together, this provides the necessary foundation concerning reasoning about output streams and application control flow.


Regular Language Output Stream Program Fragment Sequence Node Choice Node 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)Google Scholar
  2. 2.
    Arkin, A., et al.: Web Services Business Process Execution Language Version 2.0. OASIS, Committee Draft (December 2005)Google Scholar
  3. 3.
    Berstel, J., Boasson, L.: Formal properties of XML grammars and languages. Acta Informatica 38(9), 649–671 (2002)CrossRefMathSciNetMATHGoogle Scholar
  4. 4.
    Brüggemann-Klein, A., Wood, D.: Balanced context-free grammars, hedge grammars and pushdown caterpillar automata. In: Proc. Extreme Markup Languages (2004)Google Scholar
  5. 5.
    Christensen, A.S., Møller, A., Schwartzbach, M.I.: Extending Java for high-level Web service construction. ACM Transactions on Programming Languages and Systems 25(6), 814–875 (2003)CrossRefGoogle Scholar
  6. 6.
    Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 1–18. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  7. 7.
    Jansen-Vullers, M.H., van der Aalst, W.M.P., Rosemann, M.: Mining configurable enterprise information systems. Data & Knowledge Engineering 56(3), 195–244 (2006)CrossRefGoogle Scholar
  8. 8.
    Kirkegaard, C., Møller, A.: Type checking with XML Schema in Xact. Technical Report RS-05-31, BRICS. Presented at Programming Language Technologies for XML, PLAN-X 2006 (2005)Google Scholar
  9. 9.
    Kirkegaard, C., Møller, A.: Static analysis for Java Servlets and JSP. Technical Report RS-06-10, BRICS (2006)Google Scholar
  10. 10.
    Kirkegaard, C., Møller, A., Schwartzbach, M.I.: Static analysis of XML transformations in Java. IEEE Transactions on Software Engineering 30(3), 181–192 (2004)CrossRefGoogle Scholar
  11. 11.
    Kirkegaard, C., Møller, A.: dk.brics.schematools (2006),
  12. 12.
    Knuth, D.E.: A characterization of parenthesis languages. Information and Control 11, 269–289 (1967)CrossRefMATHGoogle Scholar
  13. 13.
    Minamide, Y.: Static approximation of dynamically generated Web pages. In: Proc. 14th International Conference on World Wide Web, WWW 2005, pp. 432–441. ACM Press, New York (2005)CrossRefGoogle Scholar
  14. 14.
    Mohri, M., Nederhof, M.-J.: Robustness in Language and Speech Technology. In: Regular Approximation of Context-Free Grammars through Transformation, vol. 9. Kluwer Academic, Dordrecht (2001)Google Scholar
  15. 15.
    Sun Microsystems. Java Servlet Specification, Version 2.4 (2003), available from:
  16. 16.
    Sun Microsystems. JavaServer Pages Specification, Version 2.0 (2003), available from:
  17. 17.
    Vallee-Rai, R., Hendren, L., Sundaresan, V., Lam, P., Gagnon, E., Co, P.: Soot – a Java optimization framework. In: Proc. IBM Centre for Advanced Studies Conference, CASCON 1999, IBM (November 1999)Google Scholar
  18. 18.
    van der Aalst, W.M.P., Aldred, L., Dumas, M., ter Hofstede, A.H.M.: Design and implementation of the YAWL system. In: Persson, A., Stirna, J. (eds.) CAiSE 2004. LNCS, vol. 3084, pp. 142–159. Springer, Heidelberg (2004)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Christian Kirkegaard
    • 1
  • Anders Møller
    • 1
  1. 1.BRICSUniversity of AarhusDenmark

Personalised recommendations