| 发表于:2008-01-10 16:37:48 楼主 |
我比着例子做的,却无法执行,报error 404--not found错误, action: package com.test.action; import com.opensymphony.xwork2.actionsupport; public class loginaction extends actionsupport { private string username; private string password; public string getusername() { return username; } public void setusername(string username) { this.username = username; } public string getpassword() { return password; } public void setpassword(string password) { this.password = password; } public string EXECute() throws exception{ return success; } } 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"> <display-name> struts blank </display-name> <filter> <filter-name> struts2 </filter-name> <filter-class> org.apache.struts2.dispatcher.filterdispatcher </filter-class> </filter> <filter-mapping> <filter-name> struts2 </filter-name> <url-pattern> /* </url-pattern> </filter-mapping> <welcome-file-list> <welcome-file> index.jsp </welcome-file> </welcome-file-list> </web-app> struts.xml <!doctype struts public "-//apache software foundation//dtd struts configuration 2.0//en" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="abc" namespace="/abc" extends="struts-default"> <action name="loginaction" class="com.text.action.loginaction"> <result> /success.jsp </result> </action> </package> </struts> 用的myeclipse6.0+weblogic9+jdk5.0 struts.xml文件放在webroot\web-inf\classes\下 麻烦请指教!!! |
|
|
|
|