Tomcat 8
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/
Tomcat 8的更多相关文章
- Tomcat一个BUG造成CLOSE_WAIT
之前应该提过,我们线上架构整体重新架设了,应用层面使用的是Spring Boot,前段日子因为一些第三方的原因,略有些匆忙的提前开始线上的内测了.然后运维发现了个问题,服务器的HTTPS端口有大量的C ...
- docker——容器安装tomcat
写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...
- Tomcat shutdown执行后无法退出进程问题排查及解决
问题定位及排查 上周无意中调试程序在Linux上ps -ef|grep tomcat发现有许多tomcat的进程,当时因为没有影响系统运行就没当回事.而且我内心总觉得这可能是tomcat像nginx一 ...
- 记一次tomcat线程创建异常调优:unable to create new native thread
测试在进行一次性能测试的时候发现并发300个请求时出现了下面的异常: HTTP Status 500 - Handler processing failed; nested exception is ...
- Linux CentOS 配置Tomcat环境
一.下载Tomcat 下载Tomcat方式也有两种,可以参考我的前一篇博文Linux CentOS配置JDK环境,这边就不再赘述. 二.在Linux处理Tomcat包 1.创建tomcat文件夹 mk ...
- 在Linux虚拟机下配置tomcat
1.到Apache官网下载tomcat http://tomcat.apache.org/download-80.cgi 博主我下载的是tomcat8 博主的jdk是1.8 如果你们的jdk是1.7或 ...
- tomcat开发远程调试端口以及利用eclipse进行远程调试
一.tomcat开发远程调试端口 方法1 WIN系统 在catalina.bat里: SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compi ...
- Eclipse中启动tomcat报错java.lang.OutOfMemoryError: PermGen space的解决方法
有的项目引用了太多的jar包,或者反射生成了太多的类,异或有太多的常量池,就有可能会报java.lang.OutOfMemoryError: PermGen space的错误, 我们知道可以通过jvm ...
- mac下安装及配置tomcat
mac下的软件不像windows下的程序那样写注册表,对于tomcat的安装来说,在mac下是名符其实的绿色软件,具体操作如下: 1.到 apache官方主页 下载完整 tar.gz文件包.(没有专门 ...
- 设置tomcat远程debug
查看端口占用情况命令: netstat -tunlp |grep 8000 tomcat 启动远程debug: startup.sh 中的最后一行 exec "$PRGDIR"/& ...
随机推荐
- Vmware10 Centos7 共享文件夹设置方法
先安装包依赖: yum -y install kernel-devel-$(uname -r) yum -y install net-tools perl gcc gcc-c++ 安装vm tool ...
- python将dict中的unicode打印成中文
import json a = {u'content': {u'address_detail': {u'province': u'\u5409\u6797\u7701', u'city': u'\u9 ...
- java replaceall 使用正则表达式替换单等号,不替换其他相关的等号。
写项目需要将公式配置到数据库中,取出后根据公式规则进行比较,由于公式的等于是用单等号,在java中无法直接使用,故需要将单等号替换成双等号,单又不能影响大于等于以及其他形式.故果断选择正则表达式替换. ...
- OC与AS3的观察者模式比较以及外部回调
一.要点 1.AS3的观察者模式,主要是体现在在哪个组件上监听,那么就在这个组件上分发事件,并且可以直接传递Function. 2.OC的观察者模式,主要是需要你指定观察的对象,和观察的对象方法sel ...
- E/MediaPlayer: start called in state 4, mPlayer(0xcc719a40)解决
在使用MediaPlayer播放音频时报出 E/MediaPlayer: start called in state 4, mPlayer(0xcc719a40)错误 贴出代码 mMediaPlaye ...
- js if判断 遍历 替换图片地质
<script> $(document).ready(function() { var s = "The rain in Spain falls mainly in the pl ...
- SphereFace的原理
https://blog.csdn.net/qianqing13579/article/details/78288780
- Eclipse JUnit简单示例
在本节中,我们将看到一个简单的JUnit例子. 先创建一个工程,名称为:CalculateTest,并在这个工程上点击右键,选择:Build Path -> Add Library -> ...
- Response.Redirect与Server.Transfer区别-转
执行过程: 1.浏览器ASP文件请求->服务器执行->遇到response.redirect语句->服务器发送response.redirect后面的地址给客户机端的浏览器-> ...
- (转)st(state-threads) coroutine调度
目录(?)[-] EPOLL和TIMEOUT TIME TIMEOUT Deviation st(state-threads) https://github.com/winlinvip/state ...