日期:2014-05-17  浏览次数:20664 次

webwork+spring+hibernate,404错误
webwork+spring+hibernate做了个简单的用户 注册程序,但输入http://127.0.0.1:7777/bookstore/地址后出现

type Status report

message /bookstore/

description The requested resource (/bookstore/) is not available
这个错误,后面加上相应的页面也一样:
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>webwork</filter-name>
<filter-class>
com.opensymphony.webwork.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>webwork</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
</web-app>
xwork.xml:
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd">
<xwork>
  <include file="webwork-default.xml"></include>
  <package name="default" extends="webwork-default">
  <action name="register" class="userAction">
  <result name="success">/register_success.jsp</result>
  </action>
   
  </package>
   
</xwork>
求高手指点

------解决方案--------------------
http://127.0.0.1:7777/bookstore
这个bookstore是什么东西? 项目的上下文吗?如果是在myeclipse下面,是这个工程名吗?
------解决方案--------------------
http://127.0.0.1:7777/bookstore/
拼写无误?
------解决方案--------------------
在web.xml中配置
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
------解决方案--------------------
用到了spring,配置文件当然少不了,必须得引入。