排除Eclipse的“在服务器上运行”部署 [英] Troubleshoot Eclipse's "Run on server" deploy

查看:112
本文介绍了排除Eclipse的“在服务器上运行”部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在接管现有的基于Struts的Web应用程序,并尝试在本地机器上首次部署它。我的前任告诉我通过Eclipse在Tomcat服务器上运行它。

I am taking over an existing Struts-based web application and am trying to deploy it for the first time on my local machine. My predecessor told me to run it through Eclipse on a Tomcat server.

我已经安装了最新的tomcat,它运行正常。我已经从CVS服务器抓取了代码,并通过一些调整,从Java文件中删除了所有的错误。然后,我创建了一个新的运行配置,它运行为在服务器上运行。

I have installed the latest tomcat and it is running fine. I have grabbed the code from their CVS server and, with a few tweaks, removed all of the errors from the Java files. I then created a new Run Configuration having it run as "Run on server".

当我运行运行配置时,tomcat服务器在控制台中启动时没有错误消息,并且Eclipse浏览器页面弹出正确的本地URL。但返回的页面是404。看看我的Tomcatwebaps文件夹,我看到我的应用程序不在那里。

When I run the Run Config, the tomcat server starts up without error messages in the Console and an Eclipse browser page pops up to the correct local URL. The returned page is a 404, however. Looking at my Tomcat "webaps" folder, I see that my application is not there.

我的问题是,我该如何解决这个问题?我的tomcat错误日志在部署时没有得到更新,如下所示,Console输出没有提示出现问题。

My question is, how can I troubleshoot this? My tomcat error logs do not get updated when I deploy and the Console output, shown below, offers no hint that there is a problem.

May 30, 2011 3:48:07 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: <long list of paths>
May 30, 2011 3:48:07 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 30, 2011 3:48:07 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 410 ms
May 30, 2011 3:48:07 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 30, 2011 3:48:07 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
May 30, 2011 3:48:08 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor CanPost_Emil.xml
May 30, 2011 3:48:08 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 30, 2011 3:48:08 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 30, 2011 3:48:08 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
May 30, 2011 3:48:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 244 ms


推荐答案

这不是在Eclipse中运行Web应用程序的方式。

This is not the way to run web apps inside Eclipse.

转到服务器视图面板,然后选择添加服务器。这里按照说明安装Tomcat适配器,然后添加您拥有的项目(如果它们是动态Web项目)。您现在可以启动和停止服务器,并在更改项目时选择更新的项目。

Go to the Server view panel instead, and choose Add server. Here install the Tomcat adapter according to the instructions, and then add the projects you have (if they are Dynamic Web Projects). You can now start and stop the server and have the projects chosen updated when you change.

这样做。不要尝试创建运行配置启动Tomcat。

Do it this way. Do not try to create a Run Configuration launching Tomcat.

这篇关于排除Eclipse的“在服务器上运行”部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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