You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by 白鹏 <bi...@gmail.com> on 2009/03/22 12:25:23 UTC

[HELP] why is this configuration file(struts.xml) faulty????

========================================================================================
<?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>
<!-- Define all the page-communication,relation between jsp-page and
action-->
    <constant name="struts.objectFactory"
value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
    <constant name="struts.enable.DynamicMethodInvocation"
value="true"></constant> <!-- baipeng add permit dynamic-method-invocation
-->

    <package name="learndata" extends="struts-default"> <!-- The eclipse
told me error is here. -->
        <global-results>
            <result name="login">login.jsp</result>
        </global-results>
        <interceptors>
            <interceptor name="loginInterceptor"
class="shengpeng.interceptor.LoginInterceptor">
            </interceptor>
            <interceptor-stack name="authorityStack">
                <interceptor-ref name="loginInterceptor"/>
                <interceptor-ref name="defaultStack" />
            </interceptor-stack>
        </interceptors>
    </package>


    <include file="struts-logreg.xml" />
</struts>

Re: [HELP] why is this configuration file(struts.xml) faulty????

Posted by Dale Newfield <da...@newfield.org>.
白鹏 wrote:
> wow, I got it.
> If we place the  <global-results>  after <interceptors>, it will be OK!

D'oh!  The "order doesn't match the DTD" problem is something you'll 
only encounter once per project, so the fact I didn't notice it is 
clearly a sign I've been working on the same project for far too long.

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [HELP] why is this configuration file(struts.xml) faulty????

Posted by 白鹏 <bi...@gmail.com>.
wow, I got it.
If we place the  <global-results>  after <interceptors>, it will be OK!

2009/3/23 白鹏 <bi...@gmail.com>

> The error is not here.
> I change it to <constant name="struts.enable.DynamicMethodInvocation"
> value="true" /> , but the
> <package name="learndata" extends="struts-default"> <!-- The eclipse told
> me *error is here.* -->
>
> is still there.
>
> 2009/3/22 Dale Newfield <da...@newfield.org>
>
> 白鹏 wrote:
>>
>>> <constant name="struts.enable.DynamicMethodInvocation"
>>> value="true"></constant>
>>>
>>
>> Is it valid to have both a value attribute and a tag body?
>>
>> Try replacing that with:
>>
>> <constant name="struts.enable.DynamicMethodInvocation" value="true" />
>>
>> And see if you get any farther.
>>
>> -Dale
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

Re: [HELP] why is this configuration file(struts.xml) faulty????

Posted by 白鹏 <bi...@gmail.com>.
The error is not here.
I change it to <constant name="struts.enable.DynamicMethodInvocation"
value="true" /> , but the
<package name="learndata" extends="struts-default"> <!-- The eclipse told me
*error is here.* -->

is still there.

2009/3/22 Dale Newfield <da...@newfield.org>

> 白鹏 wrote:
>
>> <constant name="struts.enable.DynamicMethodInvocation"
>> value="true"></constant>
>>
>
> Is it valid to have both a value attribute and a tag body?
>
> Try replacing that with:
>
> <constant name="struts.enable.DynamicMethodInvocation" value="true" />
>
> And see if you get any farther.
>
> -Dale
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [HELP] why is this configuration file(struts.xml) faulty????

Posted by Dale Newfield <da...@newfield.org>.
白鹏 wrote:
> <constant name="struts.enable.DynamicMethodInvocation" value="true"></constant>

Is it valid to have both a value attribute and a tag body?

Try replacing that with:

<constant name="struts.enable.DynamicMethodInvocation" value="true" />

And see if you get any farther.

-Dale


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org