最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

intellij idea 使用struts2访问action时出现404错误

旗下网站admin66浏览0评论

intellij idea 使用struts2访问action时出现404错误

intellij idea 使用struts2访问action时出现404错误

错误如图,

struts.xml配置没错:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
        ".5.dtd">


        <!-- 指定Struts 2配置文件的根元素 -->
<struts>
<!-- 指定全局国际化资源文件 -->
<constant name="struts.custom.i18n.resources" value="mess"/>
<!-- 指定国际化编码所使用的字符集 -->
<constant name="struts.i18n.encoding" value="GBK"/>
<!--指定constant的name为devMode表示处于开发模式,value=true修改配置文件内容自动热替换而不需要每次重新发布-->
<constant name="struts.devMode" value="true"/>
<!-- 所有的Action定义都应该放在package下,Struts2中通过package来管理action,这里的包名name并不对应java类中的包 -->
<package name="hello" extends="struts-default" >

    <action
发布评论

评论列表(0)

  1. 暂无评论