MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » 学习struts遇到的简单有关问题

学习struts遇到的简单有关问题(2)

www.MyException.Cn  网友分享于:2013-02-12  浏览:11次

        <taglib-location> /WEB-INF/struts-bean.tld </taglib-location>
    </taglib>
    <taglib>
        <taglib-uri> /tags/struts-html </taglib-uri>
        <taglib-location> /WEB-INF/struts-html.tld </taglib-location>
    </taglib>
    <taglib>
        <taglib-uri> /tags/struts-logic </taglib-uri>
        <taglib-location> /WEB-INF/struts-logic.tld </taglib-location>
    </taglib>
</web-app>

struts-config.xml文件内容:
<struts-config>
        <action-mappings>
<action   path= "/HelloWorld "   type= "hello.HelloAction "
scope= "request "   validate= "true ">
<forward   name= "Hello_1 "   path= "/HelloWorld_1.jsp "   />
<forward   name= "Hello_2 "   path= "/HelloWorld_2.jsp "   />
</action>
        </action-mappings>
        <message-resources   parameter= "hello.application "   />
</struts-config>

错误描述:
The   requested   resource   (/HelloWorld.do)   is   not   available.




------解决方案--------------------
<servlet>
<servlet-name> action_tmp </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>
删掉

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有