com.ouncelabs.core.appserverimporter.jspcompile
Class JSPCompilerSupport

java.lang.Object
  extended by com.ouncelabs.core.appserverimporter.jspcompile.JSPCompilerSupport

public abstract class JSPCompilerSupport
extends java.lang.Object

The behavior of "Precompiled" JSP compiler. Used to generate the mapping between jsp files and the compiled class file To debug look at <staging directory>/jsp_map.xml It should look like:
<jsp_maps package_name="com/ibm/_jsp">
<jsp_map java_file="WEB-INF/classes/com/ibm/_jsp/_hello.class" jsp_file="hello.jsp"/>
</jsp_maps>


Constructor Summary
JSPCompilerSupport()
           
 
Method Summary
abstract  java.lang.String getJavaClassFileName(java.lang.String jspFileName, java.lang.String packageName, java.lang.String staging_dir, java.lang.String web_inf_classes_dir)
          Determines the .class file that corresponds with the specified .jsp file
abstract  java.lang.String getPackageName(java.lang.String projectName)
          Determine Package name to use for JSP files
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSPCompilerSupport

public JSPCompilerSupport()
Method Detail

getJavaClassFileName

public abstract java.lang.String getJavaClassFileName(java.lang.String jspFileName,
                                                      java.lang.String packageName,
                                                      java.lang.String staging_dir,
                                                      java.lang.String web_inf_classes_dir)
                                               throws java.io.IOException
Determines the .class file that corresponds with the specified .jsp file

Parameters:
jspFileName - path to the jsp file e.g <AppScanSource Data>/j2ee/JDBCSample/sample3.war_staging/hello.jsp
packageName - the package name e.g. com/ibm/_jsp
staging_dir - path to the staging directory e.g. <AppScanSource Data>/j2ee/JDBCSample/sample3.war_staging
web_inf_classes_dir - e.g. <AppScanSource Data>/j2ee/JDBCSample/sample3.war_staging/WEB-INF/classes/
Returns:
the path of the class file e.g. <AppScanSource Data>/j2ee/JDBCSample/sample3.war_staging/WEB-INF/classes/com/ibm/_jsp/_hello.class
Throws:
java.io.IOException - if an I/O operation fails

getPackageName

public abstract java.lang.String getPackageName(java.lang.String projectName)
                                         throws java.io.IOException
Determine Package name to use for JSP files

Parameters:
projectName - The project name
Returns:
Package name to use for JSP files e.g. "com/ibm/jsp"
Throws:
java.io.IOException - if an I/O operation fails