`
gelongmei
  • 浏览: 208827 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

要想看jetty加载sevlet web.xml可以从这里debug

阅读更多
org.apache.jasper.compiler.TldLocationsCache#processWebDotXml

"qtp1031863266-28@4650" prio=5 tid=0x1c nid=NA runnable
  java.lang.Thread.State: RUNNABLE
blocks qtp1031863266-27@4649
  at org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCache.java:427)
  at org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:332)
  at org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:292)
  at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:572)
  at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:497)
  - locked <0x138f> (a java.util.concurrent.ConcurrentHashMap)
  at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:579)
  at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1649)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:182)
  at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239)
  at org.apache.jasper.compiler.ParserController.parse(ParserController.java:140)
  at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:204)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:431)
  at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
  - locked <0x1381> (a org.apache.jasper.servlet.JspServletWrapper)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:476)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:366)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)
  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
  at org.eclipse.jetty.server.Server.handle(Server.java:367)
  at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
  at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
  at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
  at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
  at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
  at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
  at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
  at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
  at java.lang.Thread.run(Thread.java:722)



#####################################################################

以下是jsp解析的servlet初始化位置


"main@1" prio=5 tid=0x1 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
  at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:145)
  at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:477)
  at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:293)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
  - locked <0xf2a> (a java.lang.Object)
  at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:730)
  at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:254)
  at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1238)
  at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:689)
  at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:480)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
  - locked <0xf2b> (a java.lang.Object)
  at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
  - locked <0xf2c> (a java.lang.Object)
  at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
  at org.eclipse.jetty.server.Server.doStart(Server.java:279)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
  - locked <0xf2d> (a java.lang.Object)
  at com.meizu.aid.mojo.JettyStartMojo.execute(JettyStartMojo.java:51)
  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
  at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  at org.codehaus.classworlds.Launcher.main(Launcher.java:47)




############################################
所有servlet初始化的地方
org.eclipse.jetty.servlet.ServletHandler#initialize
一般不写servlet也会有二个是被初始化的:
0 = {ServletHolder@3934} "helloworld" #自定义 servlet
1 = {ServletHolder@3841} "jsp"   #jetty自增实现
2 = {ServletHolder@3935} "default"  #jetty自增实现
3 = {ServletHolder@3936} "demo-web" #spring的dispatcherservlet

##############################################
JETTY 从这里开始

"main@1" prio=5 tid=0x1 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
  at org.eclipse.jetty.servlet.Holder.setClassName(Holder.java:178)
  at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitServlet(StandardDescriptorProcessor.java:286)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
  at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
###########JETTY的这里开始加载 getWebDefault()#即webdefault.xml文件,里面配置了jspservlet,defaultservlet
#############这就要去看jetty-webapp-x.x.x.jar\org\eclipse\jetty\webapp\webdefault.xml里面的配置了
  at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:325)
  at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1236)
  at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:689)
  at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:480)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
  - locked <0xd31> (a java.lang.Object)
  at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
  - locked <0xd32> (a java.lang.Object)
  at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
  at org.eclipse.jetty.server.Server.doStart(Server.java:279)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
  - locked <0xd33> (a java.lang.Object)
  at com.meizu.aid.mojo.JettyStartMojo.execute(JettyStartMojo.java:51)
  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
  at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  at org.codehaus.classworlds.Launcher.main(Launcher.java:47)


###################################
以下是搜索JAR包中的TLD后缀文件加载到相应的命名空间中
org.apache.jasper.compiler.TldLocationsCache#scanJar(java.net.JarURLConnection, boolean, java.util.List<java.lang.String>)
分享到:
评论

相关推荐

    gradle的jetty插件使用例子

    在`src/main/webapp`下,你会找到Web应用的结构,如`WEB-INF`目录,其中包含`web.xml`(Servlet容器的部署描述符),以及静态资源和视图文件。 使用IDEA(IntelliJ IDEA)进行开发时,可以集成Gradle插件,方便地...

    eclipse中配置使用jetty调试web项目

    配置完成后,可以通过Eclipse的Run As菜单选择“Jetty Run”或“Jetty Debug”启动Web应用。在运行模式下,你可以通过浏览器访问`http://localhost:端口号/上下文路径`来查看应用。在调试模式下,可以设置断点并...

    eclipse 整合 jetty 调试

    将Eclipse与Jetty整合,可以极大地提高开发效率,便于快速测试和调试Web应用。本文将详细介绍如何在Eclipse中整合Jetty,并进行调试。 **一、Eclipse安装Jetty插件** 1. 打开Eclipse市场(Help &gt; Eclipse ...

    Eclipse+_maven_+_jetty_开发web

    Eclipse、Maven和Jetty是当前流行的软件开发工具和框架,它们可以高效地协同工作于Web项目的开发过程中。本知识点将详细介绍如何结合这三个工具开发Web项目。 Eclipse是一个开源的集成开发环境(IDE),它广泛用于...

    jetty jars

    Jetty是一款轻量级、高性能的Java Web服务器和Servlet容器,它被广泛用于开发、测试和部署Web应用程序。Jetty 6.1.7是该软件的一个特定版本,发布于2009年,提供了对Servlet 2.5规范的支持。在Eclipse集成开发环境中...

    eclipse整合jetty

    org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock: method() V not found”。此时可以尝试使用新的更新站点进行安装: ``` http://run-jetty-run.googlecode.com/svn/trunk/updatesite/ ``` ...

    jetty在eclipse中配置

    Jetty是一款轻量级、高性能的Java Web服务器和Servlet容器,它被广泛用于开发、测试和部署Web应用程序。Eclipse是流行的Java集成开发环境(IDE),开发者可以利用它来管理和运行项目。本教程将详细介绍如何在Eclipse...

    jetty6 eclipse配置

    Jetty是一款轻量级、高性能的Java Web服务器和Servlet容器,它被广泛应用于各种规模的Web应用程序部署。在Eclipse中配置Jetty可以让开发者在开发过程中实时预览和测试Web应用,无需每次都通过构建和部署流程。以下是...

    IntelliJ+Maven+Jetty+Jrebel实现web项目java代码更改后热部署

    3. **Jetty**: Jetty是一个轻量级的Java Web服务器和Servlet容器,它可以快速地启动和停止,非常适合用于开发和测试阶段。通过Jetty,开发者可以在开发过程中实时查看和测试应用,而无需每次都重新编译和部署整个...

    将dwr集成到spring mvc(dwr的配置是基于xml)

    从"pom.xml"这个文件名来看,我们可能是在一个Maven项目中进行操作。在`pom.xml`文件中,你需要添加DWR的依赖项,如下所示: ```xml &lt;groupId&gt;org.directwebremoting &lt;artifactId&gt;dwr &lt;version&gt;3.x.x&lt;/version&gt;...

    jetty安装包

    如果你想要改变端口或其他配置,可以编辑`etc/jetty.xml`或创建自定义的start.ini文件来添加或修改参数。 6. **部署Web应用**: 将你的Web应用程序(WAR文件)复制到`webapps`目录下,Jetty会自动检测并部署这个...

    Flex入门-Flex整合Servlet

    通过这种方式,Flex与Servlet的整合使得我们可以充分利用Flex的富客户端能力,同时利用Java的强大后端处理能力,构建出高效、交互性好的Web应用。在实际项目中,还需要考虑到安全性、性能优化、错误处理等方面,以...

    spring-boot-reference.pdf

    15.2. Importing XML Configuration 16. Auto-configuration 16.1. Gradually Replacing Auto-configuration 16.2. Disabling Specific Auto-configuration Classes 17. Spring Beans and Dependency Injection 18. ...

    dwr.jar 以及dwr配置文件

    在实际项目中,将dwr.jar添加到项目的类路径中,然后在web.xml中配置DWR的servlet,最后根据项目需求调整dwr.xml文件,就可以开始利用DWR的强大功能了。DWR支持多种服务器环境,如Tomcat、Jetty等,并且兼容各种现代...

    logback相关jar包和demo代码.zip

    它可以与 Tomcat、Jetty 等Servlet容器配合使用,提供类似于 Apache HTTP Server 的访问日志格式。 `logback.xml` 是 Logback 的配置文件,通过它可以设置日志级别、日志输出目的地、过滤器等。以下是一些配置示例...

    Jwebap User Guide 配置网站日志追踪

    接下来是`web.xml`文件,它是Web应用的部署描述符,虽然主要负责Web应用的初始化参数和Servlet配置,但也可以与Jwebap配合使用,通过在`web.xml`中引入Jwebap的相关配置,使得日志设置能够在Web应用启动时自动加载。...

    springMVC搭建详情

    &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt; &lt;property name="prefix" value="/WEB-INF/views/" /&gt; &lt;property name="suffix" value=".jsp" /&gt; ``` 4. 创建 ...

    Tomcat面试专题及答案.pdf

    Tomcat是由Apache软件基金会开发的Java Servlet和JavaServer Pages(JSP)容器,遵循Java EE规范中的Web应用程序部署描述符(web.xml)。它是开源且免费的,常用于部署Servlet和JSP应用。 ### 2. Tomcat与Jetty、...

Global site tag (gtag.js) - Google Analytics