布衣王子

Email:roose2008@gmail.com QQ:79212131

tomcat6.0上部署struts2.x老是出问题,大家都进来看看啊

使用IDE是netbeans6.1,
tomcat6.0
struts-2.0.11.2最新版的。
部署不成功,部署不成功部署不成功部署不成功部署不成功部署不成功部署不成功部署不成功部署不成功



这是我的部署文件:



web.xml文件:

 1<?xml version="1.0" encoding="UTF-8"?>
 2
 3<!DOCTYPE web-app
 4    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 5    "http://java.sun.com/dtd/web-app_2_3.dtd">
 6
 7<web-app>
 8    
 9    <filter >
10        <filter-name>Struts2</filter-name>
11        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
12    </filter>
13    
14    <filter-mapping>
15        <filter-name>Struts2</filter-name>
16        <url-pattern>/*</url-pattern>
17    </filter-mapping>
18    
19</web-app>


 

struts.xml代码:

 1<?xml version="1.0" encoding="UTF-8" ?>
 2<!DOCTYPE struts PUBLIC
 3    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
 4    "http://struts.apache.org/dtds/struts-2.0.dtd">
 5
 6<struts>
 7       <package name="struts2" extends="struts-default">
 8              <action name="login" class="com.struts.Action.StrutsAction">
 9              <result>/result.jsp</result>
10              </action>
11       </package>           
12
13</struts>
14

 

StrutsAction.java代码

 1package com.struts.Action;
 2
 3public class StrutsAction {
 4
 5    String username;
 6    String password;
 7    
 8    public String getUsername(){
 9        return username;
10    }

11    public String getPssword(){
12        return password;
13    }

14    public void setUsername(String username){
15        this.username = username;
16    }

17    public void setPssword(String password){
18        this.password = password;
19    }

20    public String execute() throws Exception{
21        
22        return "success";
23    }

24    
25}

26

-----------------------------------------------部署错误:---------------------------------------------------------------
部署错误:
尚未部署该模块。
有关详细信息,请参见服务器日志。
        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:166)
        at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: 尚未部署该模块。
        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:160)
        ... 16 more
生成失败(总时间:9 秒)
--------------------------------------------------------------------------------------------------------------
--------------------------------------------tomcat错误信息------------------------------------------------
sing CATALINA_BASE:   E:\Websever
Using CATALINA_HOME:   D:\Apache Tomcat 6.0.16
Using CATALINA_TMPDIR: E:\Websever\temp
Using JRE_HOME:        D:\jdk1.6.0_07
2008-10-15 22:53:30 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\jdk1.6.0_07\bin;.;C:\WINDOWS.0\Sun\Java\bin;C:\WINDOWS.0\system32;C:\WINDOWS.0;D:\oracle\product\11.1.0\db_1\bin;C:\WINDOWS.0\system32;C:\WINDOWS.0;C:\WINDOWS.0\System32\Wbem;C:\Program Files\Common Files\Adobe\AGL;D:\jdk1.6.0_07\bin;D:\MySQL Server 5.1\bin;D:\StormII\Codec;D:\StormII
2008-10-15 22:53:30 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2008-10-15 22:53:30 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1278 ms
2008-10-15 22:53:30 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2008-10-15 22:53:30 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.16
2008-10-15 22:53:31 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "com.bjsxt.shopping.util.listener.LoggedUserCounter" is already configured for this context. The duplicate definition has been ignored.
IPFilter init
authfilter init
2008-10-15 22:53:32 org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
信息: Tiles definition factory loaded for module ''.
2008-10-15 22:53:32 org.apache.struts.validator.ValidatorPlugIn initResources
信息: Loading validation rules file from '/WEB-INF/validator-rules.xml'
2008-10-15 22:53:32 org.apache.struts.validator.ValidatorPlugIn initResources
信息: Loading validation rules file from '/WEB-INF/validation.xml'
2008-10-15 22:53:33 org.apache.tomcat.util.digester.Digester fatalError
严重: Parse Fatal Error at line 22 column 1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1058)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
        at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-10-15 22:53:33 org.apache.catalina.startup.ContextConfig applicationWebConfig
严重: Parse error in application web.xml file at jndi:/localhost/Struts2.x/WEB-INF/web.xml
org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
        at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-10-15 22:53:33 org.apache.catalina.startup.ContextConfig applicationWebConfig
严重: Occurred at line 22 column 1
2008-10-15 22:53:33 org.apache.catalina.startup.ContextConfig start
严重: Marking this application unavailable due to previous error(s)
2008-10-15 22:53:33 org.apache.catalina.core.StandardContext start
严重: Error getConfigured
2008-10-15 22:53:33 org.apache.catalina.core.StandardContext start
严重: Context [/Struts2.x] startup failed due to previous errors
2008-10-15 22:53:33 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2008-10-15 22:53:34 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2008-10-15 22:53:34 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/109  config=null
2008-10-15 22:53:34 org.apache.catalina.startup.Catalina start
信息: Server startup in 3741 ms
2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log
信息: Manager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log
信息: Manager: init: Global resources are available
2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log
信息: Manager: list: Listing contexts for virtual host 'localhost'
2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log
信息: Manager: list: Listing contexts for virtual host 'localhost'
2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log
信息: Manager: stop: Stopping web application at '/Struts2.x'
2008-10-15 22:53:34 org.apache.catalina.core.StandardContext stop
信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Struts2.x] has not been started
2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log
信息: Manager: start: Starting web application at '/Struts2.x'
2008-10-15 22:53:34 org.apache.tomcat.util.digester.Digester fatalError
严重: Parse Fatal Error at line 22 column 1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1058)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
        at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1244)
        at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:374)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
2008-10-15 22:53:34 org.apache.catalina.startup.ContextConfig applicationWebConfig
严重: Parse error in application web.xml file at jndi:/localhost/Struts2.x/WEB-INF/web.xml
org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
        at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1244)
        at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:374)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
2008-10-15 22:53:34 org.apache.catalina.startup.ContextConfig applicationWebConfig
严重: Occurred at line 22 column 1
2008-10-15 22:53:34 org.apache.catalina.startup.ContextConfig start
严重: Marking this application unavailable due to previous error(s)
2008-10-15 22:53:34 org.apache.catalina.core.StandardContext start
严重: Error getConfigured
2008-10-15 22:53:34 org.apache.catalina.core.StandardContext start
严重: Context [/Struts2.x] startup failed due to previous errors
------------------------------------------------------------------------------------------------------------------
 部署了一天,也没部署出一个结果来。
希望那为高手能教教小生,必将很感谢!
最好能帮我部署一个实例项目。
一刚学struts2就不能入门,部署出第一个项目出来。简直太打击人了。都想放弃了。

posted on 2008-10-15 22:38 草包书生 阅读(5604) 评论(7)  编辑  收藏

评论

# re: tomcat6.0上部署struts2.x老是出问题,大家都进来看看啊 2008-10-16 08:56 ky

信息: Loading validation rules file from '/WEB-INF/validation.xml'
2008-10-15 22:53:33 org.apache.tomcat.util.digester.Digester fatalError
严重: Parse Fatal Error at line 22 column 1: Premature end of file.

应该是某个xml文件格式有错...   回复  更多评论   

# re: tomcat6.0上部署struts2.x老是出问题,大家都进来看看啊[未登录] 2008-10-16 09:14 conjs

晕死,错误很明显啊。
严重: Parse error in application web.xml file at jndi:/localhost/Struts2.x/WEB-INF/web.xml
这个错误在多处都有,肯定是WEB.XML配置有问题。  回复  更多评论   

# re: tomcat6.0上部署struts2.x老是出问题,大家都进来看看啊 2008-10-16 16:31 ∪∩BUG

 1<?xml version="1.0" encoding="UTF-8"?>
 2<web-app id="WebApp_ID" version="2.4"
 3    xmlns="http://java.sun.com/xml/ns/j2ee"
 4    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 5    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 6    <display-name>Struts2Hello</display-name>
 7    <filter>
 8        <filter-name>struts2</filter-name>
 9        <filter-class>
10            org.apache.struts2.dispatcher.FilterDispatcher
11        </filter-class><!-- 以过虑器的形式出现 -->
12    </filter>
13    <filter-mapping>
14        <filter-name>struts2</filter-name>
15        <url-pattern>/*</url-pattern><!-- 过虑所有内容 -->
16    </filter-mapping>
17    <welcome-file-list>
18        <welcome-file>index.html</welcome-file>
19        <welcome-file>index.htm</welcome-file>
20        <welcome-file>index.jsp</welcome-file>
21        <welcome-file>default.html</welcome-file>
22        <welcome-file>default.htm</welcome-file>
23        <welcome-file>default.jsp</welcome-file>
24    </welcome-file-list>
25</web-app>
26
  回复  更多评论   

# re: tomcat6.0上部署struts2.x老是出问题,大家都进来看看啊 2008-10-16 21:57 lyshyhaungli

不要用最新的struts2的架包,有点不稳定啊,
我有一次就是用了最新的struts2的架包,出现了类似的情况。
  回复  更多评论   

# re: tomcat6.0上部署struts2.x老是出问题,大家都进来看看啊 2008-10-17 08:50 草包书生

问题已解决!基础毛病,类还没被编译就把它添加到了struts.xml中。
另一个问题:在没有用到struts2所有jar包的时候不要把所有jar包全部放到我们的lib下,要不然很有可能出错!  回复  更多评论   

# re: tomcat6.0上部署struts2.x老是出问题,大家都进来看看啊 2008-10-17 08:50 草包书生

谢谢你!  回复  更多评论   

# re: tomcat6.0上部署struts2.x老是出问题,大家都进来看看啊 2009-08-18 22:08 刘叶

<package name="com.struts.Action" extends="struts-default">
<action name="login" class="com.struts.Action.StrutsAction">
  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 

导航

常用链接

相册

java的相关连接

最新评论