Friday, 12 December 2014

constant element


We can override the default settings of struts using constant element.

Syntax
<constant name="name " value="value"/>

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

struts.xml
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

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


    <package name="default" extends="struts-default">
            
        <action name="numberCheck" class="NumberCheckAction">
            <param name="blog">https://self-learning-java-tutorial.blogspot.com</param>
            <result name="success">/success.jsp</result>
            <result name="failure">/failure.jsp</result>
        </action>

    </package>
</struts>


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment