Well, no, you need to follow the DTD.

Dave

On Mon, Sep 27, 2010 at 7:52 PM, Ken <ken.mcwilli...@aerose.com> wrote:

>
> This has been driving me nuts...
>
> The following works in my code (typed by hand not copied from source):
> <struts>
>    <!-- If I add the missing content (found below) HERE, then this does
> NOT work -->
>    <package namespace="/secure" name="secure" extends="struts-default">
>        <result-types>
>            <result-type name="tiles"
> class="org.apache.struts2.views.tiles.TilesResult"/>
>        </result-types>
>        <global-results>
>            <result name="login" type="redirectAction">login</result>
>        </global-results>
>        <action name="test">
>            <result name="success" type="tiles">/secure/welcome</result>
>        </action>
>    </package>
> </struts>
>
>
> *** This breaks the otherwise working struts.xml if inserted where the
> commented line is above ***
>
> <interceptors>
>    <interceptor name="authenticationInterceptor"
>            class="interceptors.Authentication"/>
>    <interceptor-stack name="secureStack">
>        <interceptor-ref name="authenticationInterceptor"/>
>        <interceptor-ref name="defaultStack"/>
>    </interceptor-stack>
> </interceptors>
> <default-interceptor-ref name="secureStack"/>
>
> *** End content ***
>
> Error states that there is a parsing error in the file included into
> struts.xml... Need fresh eyes...
>
> Oh at the top of each document for completeness:
>
> <?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";>
>
> Thank you.
>

Reply via email to