ok, im still having some problems this is my xwork.xml file:

<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" "http://www.opensymphony.com/xwork/xwork-1.0.dtd";>

<xwork>
<package name="default">
<result-types>
<result-type name="dispatcher" class="com.opensymphony.webwork.dispatcher.ServletDispatcherResult"/>
<result-type name="redirect" class="com.opensymphony.webwork.dispatcher.ServletRedirectResult"/>
<result-type name="velocity" class="com.opensymphony.webwork.dispatcher.VelocityResult"/>
<result-type name="chain" class="com.opensymphony.xwork.ActionChainResult"/>
</result-types>


<interceptors>
<interceptor name="timer" class="com.opensymphony.xwork.interceptor.TimerInterceptor"/>
<interceptor name="logger" class="com.opensymphony.xwork.interceptor.LoggingInterceptor"/>
<interceptor name="chain" class="com.opensymphony.xwork.interceptor.ChainingInterceptor"/>
<interceptor name="static-params" class="com.opensymphony.xwork.interceptor.StaticParametersInterceptor"/>
<interceptor name="params" class="com.opensymphony.xwork.interceptor.ParametersInterceptor"/>
<interceptor name="model-driven" class="com.opensymphony.xwork.interceptor.ModelDrivenInterceptor"/>
<interceptor name="component" class="com.opensymphony.xwork.interceptor.component.ComponentInterceptor"/>
<interceptor name="token" class="com.opensymphony.webwork.interceptor.TokenInterceptor"/>
<interceptor name="token-session" class="com.opensymphony.webwork.interceptor.TokenSessionStoreInterceptor"/>
<interceptor name="validation" class="com.opensymphony.xwork.validator.ValidationInterceptor"/>
<interceptor name="workflow" class="com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor"/>



<interceptor-stack name="defaultStack"> <interceptor-ref name="timer"/> <interceptor-ref name="logger"/> <interceptor-ref name="params"/> <interceptor-ref name="validation"/> <interceptor-ref name="workflow"/> </interceptor-stack> </interceptors>


<include file="testAction.xml"/>


    </package>
</xwork>


======================



and this is my testAction.xml:


<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" "http://www.opensymphony.com/xwork/xwork-1.0.dtd";>
<xwork>
<package name="default">


<action name="test" class="com.lagcisco.cart.action.TestAction">
<result name="success" type="velocity">/WEB-INF/views/test.vm</result>
<interceptor-ref name="defaultStack"/>
</action>


    </package>
</xwork>

============

I have both my xwork.xml and testAction.xml files in the root of my classpath.



Jason Carreira wrote:

You're correct, but there's more. The included files need to be the complete same format as the main xwork.xml file with the DTD declaration and <xwork> element as the root element. It needs to have this structure:
<!DOCTYPE xwork PUBLIC
"-//OpenSymphony Group//XWork 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-1.0.dtd";
>
<xwork>
<package>
...
</package>
</xwork>
You can also put other includes in your included file, etc...


    -----Original Message-----
    *From:* Rick Slasa [mailto:[EMAIL PROTECTED]
    *Sent:* Wednesday, September 03, 2003 9:36 PM
    *To:* [EMAIL PROTECTED]
    *Subject:* Re: [OS-webwork] example using xwork's <include> tag

    I believe all actions need to belong to a package, because the the
    tie to the namespace. If there is no namespace, then it should be in
    the default package. Someone correct me if I'm working.

    HTH,
    rick

Francisco Hernandez wrote:

    can someone put an example on how to use the include tag in
    xwork.xml?

    i have my xwork.xml file that defines interceptors results and
    result stacks, then right after that i've got <include
    file="myActions.xml"/>

    in my myActions.xml i've got:
    <action name="test" class="actions.TestAction">
                <result name="success"
    type="velocity">/WEB-INF/views/test.vm</result>
                <interceptor-ref name="defaultStack"/>
    </action>

it doesnt work though, can someone tell me what im doing wrong here?




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork







------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to