有用过jetty tomcat的么,说下感觉,和tomcat的区别

在Tomcat下跑JFinal项目报错,怀疑Jetty包和tomcat冲突
如题,以下是错误信息:
Unable to read TLD &META-INF/c.tld& from JAR file
把 &jetty-server-6.1.26.jar 删掉就可以了,这个包是在开发阶段用的
--- 共有 1 条评论 ---
呃,忘了文档内有写
tomcat下还需要jetty的包干啥?两点,性能极佳,配置简单方便。
主要是设计思想的不同。Tomcat 主要是作为 JSP/Servlet 最新规范的参考实现而设计,属于学院派,但是显得庞大而杂乱。Tomcat 的性能很差,一般是作为 Http Server(如 Apache)的插件来用。Jetty 主要是作为企业级产品的嵌入式组件来设计的,可以非常方便地嵌入到其它产品中。而且 Jetty 是作为单独的 Http Server 来设计的,据 Jetty 开发人员的测试,Jetty 的性能几乎与 Apache 相当。Jetty 的体系结构结构精巧紧密,JBoss、JOnAS 缺省都是把 Jetty 作为他们的 Web Container 的。Tomcat 作为 Web Container 只是可选的。
Jetty 在国内用的人不多。我们目前全部开发都是在 Jetty 上做的,感觉 Jetty 还是非常稳定可靠的。Tomcat 开发的代码只要不使用 JSP/Servlet 最新规范中的内容,移植到 Jetty 上不费吹灰之力。Jetty 也支持到 JSP 1.2/Servlet 2.3 了(还不够用吗?呵呵)。生产环境,尤其是高负载的环境中还是使用 Jetty 更好。
1.Tomcat和Jetty都是一种Servlet引擎,他们都支持标准的servlet规范和JavaEE的规范。
1.架构比较
Jetty的架构比Tomcat的更为简单
Jetty的架构是基于Handler来实现的,主要的扩展功能都可以用Handler来实现,扩展简单。
Tomcat的架构是基于容器设计的,进行扩展是需要了解Tomcat的整体设计结构,不易扩展。
2.性能比较
Jetty和Tomcat性能方面差异不大
Jetty可以同时处理大量连接而且可以长时间保持连接,适合于web聊天应用等等。
Jetty的架构简单,因此作为服务器,Jetty可以按需加载组件,减少不需要的组件,减少了服务器内存开销,从而提高服务器性能。
Jetty默认采用NIO结束在处理I/O请求上更占优势,在处理静态资源时,性能较高
Tomcat适合处理少数非常繁忙的链接,也就是说链接生命周期短的话,Tomcat的总体性能更高。
Tomcat默认采用BIO处理I/O请求,在处理静态资源时,性能较差。
3.其它比较
Jetty的应用更加快速,修改简单,对新的Servlet规范的支持较好。
Tomcat目前应用比较广泛,对JavaEE和Servlet的支持更加全面,很多特性会直接集成进来。
相关 [jetty tomcat] 推荐:
- 行业应用 - ITeye博客
jetty和tomcat比较. Tomcat 主要是作为 JSP/Servlet 最新规范的参考实现而设计,属于学院派,但是显得庞大而杂乱. Tomcat 的性能很差,一般是作为 Http Server(如 Apache)的插件来用. Jetty 主要是作为企业级产品的嵌入式组件来设计的,可以非常方便地嵌入到其它产品中.
- redhobor - IBM developerWorks 中国 : 文档库
Jetty 应该是目前最活跃也是很有前景的一个 Servlet 引擎. 本文将介绍 Jetty 基本架构与基本的工作原理:您将了解到 Jetty 的基本体系结构;Jetty 的启动过程;Jetty 如何接受和处理用户的请求. 你还将了解到 AJP 的一些细节:Jetty 如何基于 AJP 工作;以及 Jetty 如何集成到 Jboss;最后我们将比较一下两个 Servlet 引擎:Tomcat 和 Jetty 的优缺点.
- ITeye博客
在每个项目中都要配置路径什么的,非常的麻烦. 可以用jetty,项目本身就是服务器. 他会找项目中的WebContent. 已有
0 人发表留言,猛击-&&
这里&&-参与讨论. —软件人才免语言低担保 赴美带薪读研.
- 开源软件 - ITeye博客
Jetty误判长连接为超时连接的问题. 在上一篇中介绍了jetty的反映器模型,selector线程与业务子线程交互的点有:. 1、分发事件给子线程做,启动子线程;. 2、子线程发现阻塞或者连接关闭等时间时,注册内部changes,等待selector线程调度;. 3、检测超时连接,并且关闭连接. 在检测超时连接上面,jetty存在较多的问题,可能会误判.
- 开源软件 - ITeye博客
概述. 本文档主要介绍了Tomcat的性能调优的原理和方法. 可作为公司技术人员为客户Tomcat系统调优的技术指南,也可以提供给客户的技术人员作为他们性能调优的指导手册. 2
调优分类. 由于Tomcat的运行依赖于JVM,从虚拟机的角度我们把Tomcat的调整分为外部环境调优和自身调优两类来描述.
- 编程语言 - ITeye博客
tomcat默认参数是为开发环境制定,而非适合生产环境,尤其是内存和线程的配置,默认都很低,容易成为性能瓶颈. linux修改TOMCAT_HOME/bin/catalina.sh,在前面加入. windows修改TOMCAT_HOME/bin/catalina.bat,在前面加入. 最大堆内存是1024m,对于现在的硬件还是偏低,实施时,还是按照机器具体硬件配置优化.
- 移动开发 - ITeye博客
Tomcat是我们经常使用的 servlet容器之一,甚至很多线上产品都使用 Tomcat充当服务器. 而且优化后的Tomcat性能提升显著,本文从以下几方面进行分析优化.
一、内存优化.
默认情况下Tomcat的相关内存配置较低,这对于一些大型项目显然是不够用的,这些项目运行就已经耗费了大部分内存空间,何况大规模访问的情况.
- 开源中国社区最新新闻
版本标签:
Jetty 9.0.0.v. Jetty 9 支持 SPDY 和 WebSocket. Jetty 9.x 特性:. 移植到 Jetty 9.x 的要求:.
- 企业架构 - ITeye博客
原文地址:http://my.oschina.net/wangyongqing/blog/115647. Jetty用户经常想配置他们的web应用到不同的虚拟主机. 通常情况下,一个单一的IP地址的机器有不同的DNS解析名与它相关联的,部署在这个机器上的web应用必须能够通过这些关联的DNS解析名访问到.
- ITeye博客
之前大概的看过WebSocket,当时Tomcat还不支持WebSocket,所以当时写了一篇基于Jetty的WebSocket实现,地址如下:. 现在Tomcat7.0.27发布了,从这个版本开始Tomcat就支持WebSocket了. Tomcat的WebSocket和Jetty的大致上差不多,大同小异,这里就简单的贴两个类吧:.
坚持分享优质有趣的原创文章,并保留作者信息和版权声明,任何问题请联系:@。开发用的是jetty服务器,运行没有问题。现在我打war包丢tomcat中,就启动不了,这是什么谁知道啊?
11:33:17[org.springframework.web.context.ContextLoader] INFO-[Root WebApplicationContext: initialization started]
11:33:17[org.springframework.web.context.support.XmlWebApplicationContext] INFO-[Refreshing Root WebApplicationContext: startup date [Fri May 16 11:33:17 CST 2014]; root of context hierarchy]
11:33:17[org.springframework.context.support.PropertySourcesPlaceholderConfigurer] INFO-[Loading properties file from file [F:\git\permission\target\classes\config\cas-config.properties]]
11:33:17[org.springframework.context.support.PropertySourcesPlaceholderConfigurer] INFO-[Loading properties file from file [F:\git\permission\target\classes\config\common-message-cn.properties]]
11:33:17[org.springframework.context.support.PropertySourcesPlaceholderConfigurer] INFO-[Loading properties file from file [F:\git\permission\target\classes\config\jdbc.properties]]
11:33:17[org.springframework.context.support.PropertySourcesPlaceholderConfigurer] INFO-[Loading properties file from file [F:\git\permission\target\classes\config\log4j.properties]]
11:33:17[org.springframework.context.support.PropertySourcesPlaceholderConfigurer] INFO-[Loading properties file from file [F:\git\permission\target\classes\config\my-config.properties]]
11:33:17[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0' of type [class org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:17[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'org.springframework.beans.factory.config.MethodInvokingFactoryBean#0' of type [class org.springframework.beans.factory.config.MethodInvokingFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'dataSource' of type [class org.apache.tomcat.jdbc.pool.DataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'sqlSessionFactory' of type [class org.mybatis.spring.SqlSessionFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'sqlSessionFactory' of type [class org.apache.ibatis.session.defaults.DefaultSqlSessionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'userMapper' of type [class org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'systeminfoMapper' of type [class org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'roleMapper' of type [class org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'menuMapper' of type [class org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'menuBtnMapper' of type [class org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'commonMapper' of type [class org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'commonMapper' of type [class com.sun.proxy.$Proxy25] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'menuMapper' of type [class com.sun.proxy.$Proxy27] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:18[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'commonServiceImpl' of type [class com.ts.mon.monServiceImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'transactionManager' of type [class org.springframework.jdbc.datasource.DataSourceTransactionManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean '(inner bean)' of type [class org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'txAdvice' of type [class org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.apache.shiro.realm.AuthorizingRealm] INFO-[No cache or cacheManager properties have been set.
Authorization cache cannot be obtained.]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'casShiroRealm' of type [class com.ts.mon.mapper.MyCasRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'casSubjectFactory' of type [class org.apache.shiro.cas.CasSubjectFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'shiroEhcacheManager' of type [class org.apache.shiro.cache.ehcache.EhCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.apache.shiro.web.mgt.DefaultWebSecurityManager] WARN-[The 'sessionMode' property has been deprecated.
Please configure an appropriate WebSessionManager instance instead of using this property.
This property/method will be removed in a later version.]
11:33:19[org.apache.shiro.web.mgt.DefaultWebSecurityManager] INFO-[http mode - enabling ServletContainerSessionManager (HTTP-only Sessions)]
11:33:19[org.apache.shiro.cache.ehcache.EhCacheManager] INFO-[Cache with name 'com.ts.mon.mapper.MyCasRealm.authorizationCache' does not yet exist.
Creating now.]
11:33:19[org.apache.shiro.cache.ehcache.EhCacheManager] INFO-[Added EhCache named [com.ts.mon.mapper.MyCasRealm.authorizationCache]]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'securityManager' of type [class org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter#16a0e4c' of type [class org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'casFilter' of type [class org.apache.shiro.cas.CasFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'util:map#59d0a04d' of type [class org.springframework.beans.factory.config.MapFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] INFO-[Bean 'util:map#59d0a04d' of type [class java.util.LinkedHashMap] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)]
11:33:19[org.springframework.web.context.ContextLoader] INFO-[Root WebApplicationContext: initialization completed in 2713 ms]
大家可以看到我的日志中,有很多的
is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)] 这个以前是真心没注意过,这到底是什么啊?
我在jetty中运行是没问题的,但是我打war包丢tomcat中直接都运行不来了。。。
求大神解惑。。。
晕菜!换成tomcat8就可以了。。
Spring 4 声称支持 Java EE7 标准,Tomcat-7.0.34以上的版本才支持 Java EE7 标准,应该是你之前用的tomcat7的版本不支持 Java EE7
--- 共有 2 条评论 ---
试了windows可以,然后买了服务器,linux上又不行。我次奥
可能咯。。现在换tomcat8了,启动完全没那问题了。。唉
引用来自“谭书记”的评论 我草。。。真特么的变态。。我下了个tomcat8,启动就没问题了。。。
spring4.*以上版本不支持tomcat8以下的呢吗???
太神奇了!!! &
应该是spring4引用了一些新特性,tomcat8才支持它导致的吧
--- 共有 1 条评论 ---
极有可能。
我草。。。真特么的变态。。我下了个tomcat8,启动就没问题了。。。
spring4.*以上版本不支持tomcat8以下的呢吗???
太神奇了!!! &
将信息输出到log里面,这里给的信息估计还不是重点,重点应该是这个之前的信息
--- 共有 1 条评论 ---
问题解决了。。是spring4.*要tomct8才能跑。。。囧
spring4貌似要jre1.8吧,你用spring3的看一看
--- 共有 1 条评论 ---
jdk1.7肯定是够了的哟,毕竟我用jetty是可以运行的
据说是因为spring版本和jre的版本对应关系不好造成的,spring和jre的版本是多少啊
--- 共有 9 条评论 ---
那就不知道咯。。唉。
: 你写了和运行环境相关的代码
如果说程序有问题,为啥我在jetty上,和windows上可以运行呢??纠结
: 我也在折腾阿里云服务器,那个和真实的linux没区别,所你说和哪个没关系哈,应该是你自己写的程序有问题
无奈了,入手了台阿里服务器,linux上一试,又不行了。。真无奈
刚才我不管它卡住,一直开着,奇迹发生了。。。过了大概好几分钟后,开始死循环一样的飞快的打日志了。。我抓了几张图,内存使用直接使用上130WK,我吓得赶紧关了。。
INFO信息,又不是错误
--- 共有 1 条评论 ---
问题就出在这了,我在tomcat里面启动就卡住了。。。这才是关键啊。。
日志信息还不够完整,前面肯定还有一些重要信息,后面应该也有,弄个完整的日志文件上来吧
--- 共有 4 条评论 ---
: 嗯,我是jetty热部署嘛,启动很快。。但是打成war包丢tomcat里面就不行了,启动一会就卡在dataSource那个日志那,不动了。。。
: 没一个error?计算是其他的打印也有可能有问题。 我顺便搜索了下你的这个info,有些人是因为jdk路径、jre环境等各种问题导致
除非是我日志级别有问题,打印的内容不够,呵呵
兄弟,很完整了。前面是jetty的打印,后面是springMvc加载的类。。都和这个无关的哟。。。且这个启动是不报错可以正常运行的哦jetty 和tomcat 中报错 我的的项目打成 war包 在 tomcat就可以运行 ,但是在jetty中就会报错&br&
全部答案(共1个回答)
你的是笔记本吗~?
不是什么重要的东西
你是想不让它随系统启动?
优化一下就好了 ...
有可能是U盘中毒了,你可以杀毒试试。如果不行,没有特别重要的东西格式化试一下。
我最近刚弄了一个 servlet3的,不过没用tomcat的,用的是glashhfish,应该也可以的,不过是netbean开发的,你要多大的项目呢?
你试这在Eclipse 中新建一个web工程,部署到tomcat下,如果部署成功,那么是你的web项目的问题,可以考虑把web项目中的代码拷贝到你新建的web项...
大家还关注
确定举报此问题
举报原因(必选):
广告或垃圾信息
激进时政或意识形态话题
不雅词句或人身攻击
侵犯他人隐私
其它违法和不良信息
报告,这不是个问题
报告原因(必选):
这不是个问题
这个问题分类似乎错了
这个不是我熟悉的地区}

我要回帖

更多关于 jetty tomcat 区别 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信