JDTCompiler.java

/**
* Compile the jsp file from the current engine context. As an side- effect,
* tag files that are referenced by this page are also compiled.
* 编译 jsp 文件,对应生成 java 文件和 class 文件
* @param compileClass
* If true, generate both .java and .class file If false,
* generate only .java file
*/
void org.apache.jasper.compiler.Compiler.compile(boolean compileClass)
/**
* Compile the jsp file into equivalent servlet in .java file
* 编译 jsp 文件,生成相应的 servlet 的 java文件
* @return a smap for the current JSP page, if one is generated, null
* otherwise
*/
String[] org.apache.jasper.compiler.Compiler.generateJava()
/**
* Compile the servlet from .java file to .class file
* 将 servlet 的 java 文件编译成 class 文件
*/
void org.apache.jasper.compiler.JDTCompiler.generateClass(String[] smap)

JspCompilationContext.java

/**
* Full path name of the Java file into which the servlet is being
* generated.
* jsp 文件生成对应的 servlet java文件的全路径
*/
public String getServletJavaFileName() {
if (servletJavaFileName == null) {
servletJavaFileName = getOutputDir() + getServletClassName() + ".java";
}
return servletJavaFileName;
}

SmapUtil.java  写出 jsp 文件对应的 servlet 的 class 文件

public static void installSmap(String[] smap)
throws IOException {
if (smap == null) {
return;
} for (int i = 0; i < smap.length; i += 2) {
File outServlet = new File(smap[i]);
SDEInstaller.install(outServlet,
smap[i+1].getBytes(StandardCharsets.ISO_8859_1));
}
}

参考:

http://www.cnblogs.com/mapeng-cnblogs/p/4226005.html
https://my.oschina.net/heroShane/blog/198450
https://www.ibm.com/developerworks/cn/java/j-lo-servlet/

最新文章

  1. 解决安装rpm包依赖关系的烦恼 - yum工具介绍及本地源配置方法
  2. 1.Powershell认识
  3. pundit
  4. easyui textarea回车导致datagrid 数据无法展示的问题
  5. java web项目中 获取resource路径下的文件路径
  6. delphi 10 seattle 中 解决IOS 9 限制使用HTTP 服务问题
  7. 第42讲:Scala中泛型类、泛型函数、泛型在Spark中的广泛应用
  8. Program D--贪心-区间覆盖
  9. [SQL]向3个表插入数据的存储过程 和 C# 代码
  10. 关于AfterLogic WebMail 的.net版无法上传控件的解决办法
  11. ISO7816 传输协议 T0 T1
  12. python3使用smtplib发电子邮件
  13. xib storyboard
  14. 2017/11/25 2D变换
  15. Java的四种引用——强引用、软引用、弱引用、虚引用
  16. CNN大战验证码
  17. Jz2440 环境安装
  18. hadoop中的Jobhistory历史服务器
  19. 我也学习JAVA多线程-join
  20. JS获值

热门文章

  1. Knockout开发中文API系列4–监控属性数组
  2. SpringBoot2 全局异常处理
  3. SwipeBackLayout侧滑返回显示桌面
  4. add new row to data.frame/dataframe
  5. Sword websocket分析二
  6. 如何通过使用窗体身份验证和 Visual C#.NET 对 Active Directory 验证身份
  7. github开源库(三)
  8. chromedriver与chrome版本映射表(更新至v2.30)
  9. smarty模板开发基础总结
  10. NetBeans IDE集成Maven