如何使用SpringSource工具集运行web应用程序?

时间:2022-06-13 07:32:26

I'd like to run my Spring application using STS, but I have no idea how to do that. I see the tc server instance, and I can run it, but this does not start my application. I've tried dragging my project workspace onto it, but that hasn't worked either. I've right-clicked and read/checked out all of the options on the context-sensitive menu, but I don't see anything to run my project inside tc server. Does anyone know how?

我想用STS来运行我的Spring应用程序,但是我不知道怎么做。我看到了tc服务器实例,我可以运行它,但是这并没有启动我的应用程序。我已经试着将我的项目工作空间拖到它上面,但是这也没有用。我已经右键点击并查看了上下文敏感菜单上的所有选项,但是我没有看到任何在tc server中运行我的项目的东西。有人知道吗?

EDIT:

编辑:

This is what I get when running the project. I see nothing about my project's war at all. It is included as a "web module" when I check out the tc server settings though. And it does have a web.xml and all of that other good stuff. The project works fine in maven's tomcat goal and inside IDEA. I am just having problems getting it to run in eclipse.

这是我在运行项目时得到的。我一点也不了解我的项目。当我检查tc服务器设置时,它被作为一个“web模块”被包括进来。它确实有一个网络。xml和其他的好东西。该项目在maven的tomcat目标和内部思想中运行良好。我只是有问题让它在eclipse中运行。

Mar 30, 2012 3:35:51 PM com.springsource.tcserver.security.PropertyDecoder <init>
INFO: tc Runtime property decoder using memory-based key
Mar 30, 2012 3:35:51 PM com.springsource.tcserver.security.PropertyDecoder <init>
INFO: tcServer Runtime property decoder has been initialized in 206 ms
Mar 30, 2012 3:35:52 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 30, 2012 3:35:52 PM com.springsource.tcserver.serviceability.rmi.JmxSocketListener init
INFO: Started up JMX registry on 127.0.0.1:6969 in 65 ms
Mar 30, 2012 3:35:52 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 741 ms
Mar 30, 2012 3:35:52 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 30, 2012 3:35:52 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: VMware vFabric tc Runtime 2.6.3.RELEASE/7.0.23.A.RELEASE
Mar 30, 2012 3:35:52 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\me\Documents\workspace-sts-2.9.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\trainingdividend.xml
Mar 30, 2012 3:35:52 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:trainingdividend' did not find a matching property.
Mar 30, 2012 3:35:52 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\Users\me\Documents\workspace-sts-2.9.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\insight.war
Mar 30, 2012 3:35:52 PM com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader start
INFO: Context [localhost|insight] will not be woven
Mar 30, 2012 3:35:53 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Mar 30, 2012 3:36:03 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'Spring MVC Dispatcher Servlet'
Mar 30, 2012 3:36:05 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 30, 2012 3:36:05 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 13468 ms

2 个解决方案

#1


2  

If you are missing the Run As > Run on Server option, then chances are your project does not have the Dynamic Web Module facet.

如果您缺少在服务器选项上运行的>运行,那么您的项目可能没有动态Web模块方面。

#2


0  

I was running into 404 errors in my J2ee project, created using Dynamic WebModules. Initially I thought it was a context problem, as the url that STS was attempting to run was quite wrong. However the project the context was correct. But needed to get rid of the errors shown in the markers tab (which may not stop attempts to run as Server) before I made any progress.

在我的J2ee项目中,我遇到了404错误,这是使用动态WebModules创建的。起初我认为这是一个上下文问题,因为STS试图运行的url是完全错误的。然而,项目的背景是正确的。但是在我取得任何进展之前,需要清除标记选项卡中显示的错误(它可能不会停止作为服务器运行的尝试)。

After resolving obvious code, jar,path errors, I then check if I can export a war file correctly. If not, it is usually an issue in the DEPLOYMENT ASSEMBLY portion of the projects properties (at least in my Java project). Specifying the class files and jars from required projects is needed to get the correct war file structure. Once accomplished, bye bye 404s

在解决了明显的代码、jar、路径错误之后,我检查是否可以正确导出war文件。如果不是,它通常是项目属性(至少在我的Java项目中)的部署程序集部分中的一个问题。为了获得正确的war文件结构,需要指定所需项目的类文件和jar。一旦完成,再见。

#1


2  

If you are missing the Run As > Run on Server option, then chances are your project does not have the Dynamic Web Module facet.

如果您缺少在服务器选项上运行的>运行,那么您的项目可能没有动态Web模块方面。

#2


0  

I was running into 404 errors in my J2ee project, created using Dynamic WebModules. Initially I thought it was a context problem, as the url that STS was attempting to run was quite wrong. However the project the context was correct. But needed to get rid of the errors shown in the markers tab (which may not stop attempts to run as Server) before I made any progress.

在我的J2ee项目中,我遇到了404错误,这是使用动态WebModules创建的。起初我认为这是一个上下文问题,因为STS试图运行的url是完全错误的。然而,项目的背景是正确的。但是在我取得任何进展之前,需要清除标记选项卡中显示的错误(它可能不会停止作为服务器运行的尝试)。

After resolving obvious code, jar,path errors, I then check if I can export a war file correctly. If not, it is usually an issue in the DEPLOYMENT ASSEMBLY portion of the projects properties (at least in my Java project). Specifying the class files and jars from required projects is needed to get the correct war file structure. Once accomplished, bye bye 404s

在解决了明显的代码、jar、路径错误之后,我检查是否可以正确导出war文件。如果不是,它通常是项目属性(至少在我的Java项目中)的部署程序集部分中的一个问题。为了获得正确的war文件结构,需要指定所需项目的类文件和jar。一旦完成,再见。