您的位置:程序门 -> java -> 框架、开源



用struts2时在控制台打印的警告信息。谁知道怎么回事啊??


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


用struts2时在控制台打印的警告信息。谁知道怎么回事啊??
发表于:2008-01-06 22:25:03 楼主
用sruts2时控制台打印了如下警告,谁知道具体是怎么回事啊。怎么可以避免这个警告。谢谢了!

2008-1-6   22:08:45   org.apache.struts2.components.form   evaluateextraparamsservletrequest
警告:   no   configuration   found   for   the   specified   action:   'test/login.action'   in   namespace:   '/test'.   form   action   defaulting   to   'action'   attribute's   literal   value.
发表于:2008-01-07 11:07:141楼 得分:0
你做的东西可以正常用吗??

看看stuts的配置``
发表于:2008-01-07 17:25:562楼 得分:0
代码   配置拿出来看一下   应该是配置问题
发表于:2008-01-08 12:08:413楼 得分:0
谢谢,楼上2位朋友回复。可以正常运行。但是打印的这个警告一大堆,我刷新一下页面都会打印这个警告。下面是我的struts.xml配置文件:


<?xml   version="1.0"   encoding="utf-8"   ?>
<!doctype   struts   public
                "-//apache   software   foundation//dtd   struts   configuration   2.0//en"
                "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
        <package   name="sc.test.struts.actions"   extends="struts-default">

                <action   name="login"       class="sc.test.struts.actions.login">
                        <result   > /hello.jsp </result>
                <result   name="error"> /error.jsp </result>
                <result   name="input"> /index.jsp </result>
                </action>
            </package>
</struts>
不知道有什么错误啊。
发表于:2008-01-08 12:14:204楼 得分:0
你在某个页面会请求
'test/login.action',但实际上你没有配置这样的一个action.应该是login.atcion,而没有test/吧      

问题应该出现在某个jsp上(登录的页面吧).
发表于:2008-01-08 12:41:505楼 得分:0
你好,我重新发下警告:

2008-1-8   12:36:28   org.apache.struts2.components.form   evaluateextraparamsservletrequest
警告:   no   configuration   found   for   the   specified   action:   'login.action'   in   namespace:   ''.   form   action   defaulting   to   'action'   attribute's   literal   value.

--------------------------------------------------------------
下面是我的struts.xml配置文件:

<?xml       version="1.0"       encoding="utf-8"       ?>
<!doctype       struts       public
                                "-//apache       software       foundation//dtd       struts       configuration       2.0//en"
                                "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
                <package       name="sc.test.struts.actions"       extends="struts-default">

                                <action       name="login"               class="sc.test.struts.actions.login">
                                                <result       >   /hello.jsp   </result>
                                <result       name="error">   /error.jsp   </result>
                                <result       name="input">   /index.jsp   </result>
                                </action>
                        </package>
</struts>  
----------------------------------
下面是我的页面请求:
                                                            -----   -|
<s:form   action="login.action"> |
                                                        -   -   ----   |
发表于:2008-01-08 16:01:346楼 得分:0
<?xml       version="1.0"       encoding="utf-8"       ?>
<!doctype       struts       public
                                "-//apache       software       foundation//dtd       struts       configuration       2.0//en"
                                "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
                <package       name="sc.test.struts.actions"       extends="struts-default"   namespace="/test">
                                <action       name="login"     class="sc.test.struts.actions.login">
                                    <result       >   /hello.jsp   </result>
                                    <result       name="error">   /error.jsp   </result>
                                    <result       name="input">   /index.jsp   </result>
                                </action>
                        </package>
</struts>  
发表于:2008-01-08 21:37:047楼 得分:0
应该没有问题的吧?
发表于:2008-01-10 21:28:488楼 得分:0
这不是错误!


快速检索

热门点击