Strut2Demo应用程序运行问题,还望大神指教

笨笨熊32 2015-08-14 04:47:46
刚开始学习Struts2,书是李刚最新版的《轻量级JavaEE》,在用eclipse运行第一个stucts程序的时候老是出现404,不管是直接导入工程,还是直接手动一个一个写,该有的错误都解决了,但就是没法运行。报错为:

HTTP Status 404 - /Struts2Demo/WEB-INF/content/.jsp


type Status report

message /Struts2Demo/WEB-INF/content/.jsp

description The requested resource is not available.

--------------------------------------------------------------------------------

Apache Tomcat/8.0.24

控制台输出信息是:

八月 14, 2015 4:22:49 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
八月 14, 2015 4:22:49 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-8.0.24\endorsed
八月 14, 2015 4:22:49 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
八月 14, 2015 4:22:49 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jdk1.8.0_51\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/Java/jdk1.8.0_51/bin/../jre/bin/client;D:/Java/jdk1.8.0_51/bin/../jre/bin;D:/Java/jdk1.8.0_51/bin/../jre/lib/i386;D:\Python27\;D:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Java\jdk1.8.0_51\bin;C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\MySQL\MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5\;C:\Program Files\MySQL\MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5\Doctrine extensions for PHP\;C:\Program Files\MySQL\MySQL Server 5.6\bin;D:\apache-ant-1.9.6\bin;D:\apache-maven-3.3.3\bin;D:\Subversion\bin;D:\eclipse;;.
八月 14, 2015 4:22:49 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
八月 14, 2015 4:22:50 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
八月 14, 2015 4:22:50 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
八月 14, 2015 4:22:50 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
八月 14, 2015 4:22:50 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 575 ms
八月 14, 2015 4:22:50 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
八月 14, 2015 4:22:50 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.24
八月 14, 2015 4:22:50 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 14, 2015 4:22:50 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor D:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\Struts2Demo.xml
八月 14, 2015 4:22:50 下午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2Demo' did not find a matching property.
八月 14, 2015 4:22:51 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 14, 2015 4:22:51 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Parsing configuration file [struts-default.xml]
八月 14, 2015 4:22:51 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
八月 14, 2015 4:22:51 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Parsing configuration file [struts-plugin.xml]
八月 14, 2015 4:22:51 下午 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Parsing configuration file [struts.xml]
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.ObjectFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ActionFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ResultFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ConverterFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.InterceptorFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ValidatorFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionFileProcessor)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterCreator)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterHolder)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider)
八月 14, 2015 4:22:51 下午 org.apache.struts2.config.AbstractBeanSelectionProvider info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)


...全文
107 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
HTTP Status 404 - /Struts2Demo/WEB-INF/content/.jsp表示找不到对应的资源文件,打开您的struts.xml文件看一下是怎么配置的,最好把处理请求的action中的后台方法代码也贴出来。
sunshiwu1984 2015-08-18
  • 打赏
  • 举报
回复
可能路径不对,/Struts2Demo/WEB-INF/content/welcome.jsp试试访问这个页面
大数据小白 2015-08-18
  • 打赏
  • 举报
回复
楼主,你查看一下strut.xml文件,”/Struts2Demo/WEB-INF/content/.jsp”有这么一个文件的路径配置不对,看着好像是多了一个/。
笨笨熊32 2015-08-14
  • 打赏
  • 举报
回复
笨笨熊32 2015-08-14
  • 打赏
  • 举报
回复
因为字数限制,控制台还有其他一些信息就没贴出来了。但是都是信息啊

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧