struts spring + hibernate整合问题 spring与hibernate整合的xml文档哪去了?要以插件的形式在Struts中,或在web.xml文档中以监听器的方式加载,最好选择后者。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对不起,我改一下,说清楚一点. 我的myeclipse6.0整合SSH怎么么都是不成功的啊,用myeclipse5.0就不问题,都是一模一样的整合,怎么就不行呢,别人的就行,我是这样整合的,帮我看看错在哪,它提示的是404错误, HTTP Status 404 - Servlet action is not available The requested resource (Servlet action is not available) is not available. 我的 web.xml 是这样的 <?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <servlet> <servlet-name>action </servlet-name> <servlet-class>org.apache.struts.action.ActionServlet </servlet-class> <init-param> <param-name>config </param-name> <param-value>/WEB-INF/struts-config.xml </param-value> </init-param> <init-param> <param-name>debug </param-name> <param-value>3 </param-value> </init-param> <init-param> <param-name>detail </param-name> <param-value>3 </param-value> </init-param> <load-on-startup>0 </load-on-startup> </servlet> <servlet-mapping> <servlet-name>action </servlet-name> <url-pattern>*.do </url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp </welcome-file> </welcome-file-list></web-app> jsp页面是这样的 test.jsp <%@ page language="java" pageEncoding="ISO-8859-1"%><html> <head> <title>test.jsp </title> </head> <body> <form action="test.do" method="post"> login: <input type="test" name="login"> <br> password: <input type="text" name="password"> <br> <input type="submit"> </form> </body> </html> TestAction.java是这样的 public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) {TestForm testForm = (TestForm) form;// TODO Auto-generated method stubreturn mapping.findForward("success");} struts-config.xml是这样的 <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"><struts-config><data-sources /><form-beans><form-bean name="testForm" type="com.one.struts.form.TestForm" /></form-beans><global-exceptions /><global-forwards /><action-mappings><action attribute="testForm" input="/test.jsp" name="testForm"path="/test" scope="request"parameter="method"type="org.springframework.web.struts.DelegatingActionProxy"><forward name="success" path="/success.jsp" /></action></action-mappings><message-resources parameter="com.one.struts.ApplicationResources" /><plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"><set-property property="contextConfigLocation" value="/WEB-INF/beans.xml" /></plug-in></struts-config> beans.xml是这样的,省略了一部分数据源的配置 <bean name="/test" class="com.one.struts.action.TestAction"> </bean> 应该是这样整合吧,myeclipse5.0一点问题也没有. 了解一下java新技术,问下现在什么框架比较适合处理大量数据量 请教关于泛型类型的转换问题? 读取csv文件 spring 表单绑定问题,请帮帮忙吧 applet或swt的东西可以放到webapp中吗 关于hibernate中两表对应问题,急~~~~~~ 那位高手。用javamail 发送邮件成功过。看一下吧! 什么是企业级应用,以及三层构架的含义 关于EJB的PK类中public 数据成员的疑问 为什么现在找不到j2sdk-1.4.0_02? 奇怪的session问题 如何用同一个表单上传文件和提交非文件性的数据?
我的myeclipse6.0整合SSH怎么么都是不成功的啊,用myeclipse5.0就不问题,都是一模一样的整合,怎么就不行呢,别人的就行,我是这样整合的,帮我看看错在哪,它提示的是404错误, HTTP Status 404 - Servlet action is not available
The requested resource (Servlet action is not available) is not available. 我的 web.xml 是这样的 <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>action </servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet </servlet-class>
<init-param>
<param-name>config </param-name>
<param-value>/WEB-INF/struts-config.xml </param-value>
</init-param>
<init-param>
<param-name>debug </param-name>
<param-value>3 </param-value>
</init-param>
<init-param>
<param-name>detail </param-name>
<param-value>3 </param-value>
</init-param>
<load-on-startup>0 </load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action </servlet-name>
<url-pattern>*.do </url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp </welcome-file>
</welcome-file-list>
</web-app>
jsp页面是这样的 test.jsp <%@ page language="java" pageEncoding="ISO-8859-1"%>
<html>
<head>
<title>test.jsp </title>
</head>
<body>
<form action="test.do" method="post">
login: <input type="test" name="login"> <br>
password: <input type="text" name="password"> <br>
<input type="submit">
</form>
</body>
</html> TestAction.java是这样的
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
TestForm testForm = (TestForm) form;// TODO Auto-generated method stub
return mapping.findForward("success");
} struts-config.xml是这样的 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
<data-sources />
<form-beans>
<form-bean name="testForm" type="com.one.struts.form.TestForm" /></form-beans><global-exceptions />
<global-forwards />
<action-mappings>
<action attribute="testForm"
input="/test.jsp"
name="testForm"
path="/test"
scope="request"
parameter="method"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="success" path="/success.jsp" />
</action></action-mappings><message-resources parameter="com.one.struts.ApplicationResources" /><plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/beans.xml" />
</plug-in>
</struts-config>
beans.xml是这样的,省略了一部分数据源的配置
<bean name="/test" class="com.one.struts.action.TestAction"> </bean>
应该是这样整合吧,myeclipse5.0一点问题也没有.