暮花纵0E 尼普敦的心
忧郁是我的天性
关注数: 10 粉丝数: 5 发帖数: 70 关注贴吧数: 5
【求助】javaee新手求助 我是J2EE的初学者,刚开始学,就按着书上的小例子运用myeclipse10.6和tomcat6.0(郑阿奇版的javaee 使用教程)来验证struts2的使用。。。结果在运行时网页总是显示404错误,把tomcat里的web.xml中的false改成ture也没用。想求高手来帮忙看看ORZ。。。。不然暑假作业交不出会很惨的。。。(我用的struts包是struts2.3.14.3版本的) 我建立的项目名叫struts 我的web.xml配置: <?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fjava.sun.com%2Fxml%2Fns%2Fjavaee&urlrefer=7ee1e5e3944943b0064fb68ba3626c4c" xmlns:xsi="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&urlrefer=8c31805956ebb9a7292762c26181562e" xsi:schemaLocation="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fjava.sun.com%2Fxml%2Fns%2Fjavaee&urlrefer=7ee1e5e3944943b0064fb68ba3626c4c http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fjava.sun.com%2Fxml%2Fns%2Fjavaee%2Fweb-app_2_5.xsd&urlrefer=25763cb015b12e6d461b318d213af2bb"> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list> <filter> <filter-name>struts</filter-name> <filter-class>org.apache.struts.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> 我的struts.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation //DTD Struts Configuration 2.3//EN " "http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fstruts.apache.org%2Fdtds%2Fstruts-2.3.dtd&urlrefer=8fe6d0c22b885796036081f462713c96"> <struts> <package name="default" extends="struts-default"> <action name="login" class="org.action.LoginAction"> <result name="success">/welcome.jsp</result> </action> </package> </struts> 剩下还有Loginjsp、welcome.jsp、LoginAction.java 3个文件。。问题应该不是3个文件。。 在运行时,我输入 http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Flocalhost%3A8080%2FStruts%2Flogin.jsp&urlrefer=0f6b058409fc78d184e8ee514346b723 但是总是出现404错误,如图:如果按书上输入http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Flocalhost%3A8080%2FStruts%2Flogin.jsp&urlrefer=0f6b058409fc78d184e8ee514346b723,就会出现:。。。。。求解~~~~~~~~万分感谢了
1 下一页