如何找出运行tomcat版本 [英] how to find out running tomcat version

查看:267
本文介绍了如何找出运行tomcat版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力让Appfuse + tomcat + jRebel正常工作。

I'm trying to get Appfuse + tomcat + jRebel working.

Appfuse默认使用Cargo下载tomcat(版本7.0.33)并部署应用程序它。我希望使用已安装的tomcat(版本7.0.27)而不是下载的tomcat。我根据 appfuse常见问题解答进行了更改。

Appfuse by default uses Cargo to download tomcat (ver. 7.0.33) and deploy the application to it. I wish to use an already installed tomcat (ver. 7.0.27) instead of the downloaded one. I made the change following the appfuse FAQ.

使用 mvn cargo:run 进行部署后,我怎么知道实际运行的tomcat确实是7.0.27?

After deploying with mvn cargo:run, how can I know that the actual running tomcat is indeed 7.0.27?

我曾经在错误页面中输入错误的URL(例如 localhost:8080 / dfsfsdf ),但现在显示没有。

I used to type a wrong URL (ex. localhost:8080/dfsfsdf) to see it in the error page, but now it shows nothing.

我的 $ CATALINA_HOME 指向我自己的tomcat 7.0.27。
对不起忘了提及,它适用于Windows

My $CATALINA_HOME points to my own tomcat 7.0.27. sorry forgot to mention, it's for Windows

更新:

由于这个问题已经成为某种方式流行,我想解释为什么接受答案。很简单,这是第一个解决了我的问题。

Since this question had become somehow popular, I would like to explain why that accepted answer. simple, it was the first one which solved my problem.

查看问题的标题, @Tech Junkie @CPU 100 确实有最好的答案,但不是我遇到的情况。 (我想知道 mvn cargo:run 运行我安装的tomcat或项目嵌入式tomcat):)

looking at the title of the question, @Tech Junkie and @CPU 100 really have the best answer, but not for the scenario I was encountered. (I was wanting to know if mvn cargo:run runs my installed tomcat or a "project embeded" tomcat) :)

推荐答案

如果您可以上传JSP文件,您可以打印出一些信息,如下例所示: bestdesigns.co.in/blog/check-jsp-tomcat-version

if you can upload a JSP file you may print out some info like in this example: bestdesigns.co.in/blog/check-jsp-tomcat-version

将此代码保存到名为tomcat_version.jsp的文件中:

Save this code into a file called tomcat_version.jsp:

    Tomcat Version : <%= application.getServerInfo() %><br>    
    Servlet Specification Version : 
<%= application.getMajorVersion() %>.<%= application.getMinorVersion() %> <br>    
    JSP version :
<%=JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br>

访问时, http://example.com/tomcat_version.jsp ,输出应类似于:

When you access, http://example.com/tomcat_version.jsp, the output should look similar to:

Tomcat Version : Apache Tomcat/5.5.25
Servlet Specification Version : 2.4
JSP version: 2.0

谢谢! :)

这篇关于如何找出运行tomcat版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆