org.makumba.analyser.engine
Class TomcatJsp

java.lang.Object
  extended by org.makumba.analyser.engine.TomcatJsp

public class TomcatJsp
extends Object

This class is tomcat-specific because the available APIs do not expose this functionality. Given a servlet request, it allows to determine the URI of the currently executing JSP. This is needed for static page analysis. Adaptations will need to be made for other servlet containers. With simple modifications, the class can be made to act as a JSP servlet decorator.

Version:
$Id: TomcatJsp.java 4455 2010-01-12 11:02:38Z rosso_nero $
Author:
Cristian Bogdan

Constructor Summary
TomcatJsp()
           
 
Method Summary
static String getContextCompiledJSPDir(ServletContext context)
          Computes the path to the directory in which the compiled JSP is
static String getFullCompiledJSPDir(ServletContext context)
          Computes the directory where the compiled JSPs resides, which is for Tomact in <javax.servlet.context.tempdir>/org/apache/jsp
static String getJspCompilerPackage()
           
static String getJspURI(HttpServletRequest request)
          Computes the URI to the current JSP
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TomcatJsp

public TomcatJsp()
Method Detail

getJspURI

public static String getJspURI(HttpServletRequest request)
Computes the URI to the current JSP

Parameters:
request - the Http request associated with the JSP
Returns:
A String containing the URI to the JSP

getContextCompiledJSPDir

public static String getContextCompiledJSPDir(ServletContext context)
Computes the path to the directory in which the compiled JSP is

Parameters:
context - the ServletContext of the running tomcat
Returns:
A String containing the path to the directory where JSPs are being compiled

getFullCompiledJSPDir

public static String getFullCompiledJSPDir(ServletContext context)
Computes the directory where the compiled JSPs resides, which is for Tomact in <javax.servlet.context.tempdir>/org/apache/jsp


getJspCompilerPackage

public static String getJspCompilerPackage()