昨天写的文章使项目自动部署到tomcat下。但是很繁琐的是需要先启动tomcat,然后还发现不能debug。太扯淡了。今天弄了jetty试 了一下,照着http://www.blogjava.net/alwayscy/archive/2007/06/01/118584.html这篇帖 子说的弄了一下,一开始老是报503错误,后来发现是在windows任务管理器里多了N个java.exe的线程。全部杀死就OK了。主要是每启动一次 那个外部的jetty:run时候,系统就会启动一个java.exe线程。导致后来负载太多。
但是搞定这个问题,又出现一个怪问题。居然在web.xml里面我写的
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
没有生效~~~
nnd,firefox里面写成http://localhost:8080/SSHMJ-FRANK/index.jsp就OK。写成http://localhost:8080/SSHMJ-FRANK/就报错。报错信息如下:
Struts Problem Report
Struts has detected an unhandled exception:
# Messages: There is no Action mapped for namespace / and action name .
Stacktraces
There is no Action mapped for namespace / and action name . - [unknown location]
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
org.mortbay.jetty.Server.handle(Server.java:326)
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)