Win a copy of Terraform in Action this week in the Cloud forum!

Richie Young

Greenhorn
+ Follow
since Oct 13, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Richie Young

Upgrade from Struts 1.1 to Struts 1.3.10 java 7

The original Struts used to allow validation of a virtual form concept, where the form called in the validation.xml is not actually defined in the struts-config.
Does anyone know how to fix this issue without having to re-write?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
         "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
         "http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

<!-- FORM BEANS -->
<form-beans>
<form-bean name="juvenilePhysicalCharacteristicsForm" type="ui.juvenilecase.form.JuvenilePhysicalCharacteristicsForm"/>

</form-beans>
<!-- END FORM BEANS -->
<!-- ========== Exception Definitions ========================= -->
<global-exceptions>
<exception key="exception.title" type="java.lang.Exception" handler="ui.exception.StrutsExceptionHandler" />
<exception key="exception.title" type="javax.servlet.jsp.JspException" handler="ui.exception.StrutsExceptionHandler" />
<exception key="exception.title" type="javax.servlet.error.exception" handler="ui.exception.StrutsExceptionHandler" />
<exception key="exception.title" type="org.apache.struts.action.EXCEPTION" handler="ui.exception.StrutsExceptionHandler" />
<exception key="exception.title" type="mojo.km.messaging.exception.ReturnException" handler="ui.exception.ReturnExceptionHandler" />
</global-exceptions>

<!-- Global Forwards -->
<global-forwards>
<forward name="handleException" path="/jsp/error.jsp" />
</global-forwards>


<!-- **ACTION MAPPINGS** -->


   <action-mappings>
<!--  ~~~~~~~~~~~~~~~~~~~~~ GENERIC  MAPPINGS  ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<action path="/globalBack" forward="/jsp/back.jsp"/>
<action path="/globalCancel" forward="/jsp/cancel.htm"/>

<action name="juvenilePhotoForm" path="/getJuvenilePhoto" scope="session" type="ui.juvenilecase.action.GetJuvenilePhotoAction" parameter="submitAction">
<forward name="success" path="/jsp/caseworkCommon/juvenilePhoto.jsp"/>
<!-- GANG TATTOO PHOTO-11051 starts-->
<forward name="tattooSuccess" path="/jsp/caseworkCommon/juvenileTattoo.jsp"/>
<!-- GANG TATTOO PHOTO-11051 ends-->
</action>



<!-- ~~~~~~~~~~~~~~~~~~~~~ JUVENILE Physical Characteristics MAPPINGS ~~~~~~~~~~~~~~~~~~~~~~~ -->
<action name="juvenilePhysicalCharacteristicsForm" path="/displayJuvenilePhysicalCharacteristicsCreate" scope="session" type="ui.juvenilecase.action.DisplayJuvenilePhysicalCharacteristicsCreateAction" parameter="submitAction">
<forward name="success" path="/jsp/juvTabMain/juvenilePhysicalCharacteristicCreate.jsp"/>
<forward name="scarsAndTattoos" path="/jsp/juvTabMain/juvenileScarsAndTatoos.jsp"/>
</action>

<action name="juvenilePhysicalCharacteristicsForm" path="/displayJuvenilePhysicalCharacteristicsCreateSummary" scope="session" type="ui.juvenilecase.action.DisplayJuvenilePhysicalCharacteristicsCreateSummaryAction" parameter="submitAction">
<forward name="back" path="/globalBack.do"/>
<forward name="cancel" path="/displayJuvenileMasterInformation.do"/>
<forward name="success" path="/jsp/juvTabMain/juvenilePhysicalCharacteristicCreateSummary.jsp"/>
</action>

<action name="juvenilePhysicalCharacteristicsForm" path="/displayJuvenileTattooAndScarsCreateSummary" scope="session" type="ui.juvenilecase.action.DisplayJuvenileTattooAndScarsCreateSummaryAction" parameter="submitAction">
<forward name="back" path="/globalBack.do"/>
<forward name="cancel" path="/displayJuvenileMasterInformation.do"/>
<forward name="success" path="/jsp/juvTabMain/juvenileScarsAndTattoosUpdateConfirmation.jsp"/>
<forward name="error" path="/jsp/juvTabMain/juvenileScarsAndTatoos.jsp"/>
</action>

<action name="juvenilePhysicalCharacteristicsForm" path="/saveJuvenileTattooAndScarsCreateSummary" scope="session" type="ui.juvenilecase.action.SaveJuvenileTattooAndScarsCreateSummaryAction" parameter="submitAction">
<forward name="back" path="/globalBack.do"/>
<forward name="cancel" path="/displayJuvenileMasterInformation.do"/>
<forward name="success" path="/jsp/juvTabMain/juvenileScarsAndTattoosUpdateConfirmation.jsp"/>
</action>

<action name="juvenilePhysicalCharacteristicsForm" path="/submitJuvenilePhysicalCharacteristicsCreate" scope="session" type="ui.juvenilecase.action.SubmitJuvenilePhysicalCharacteristicsCreateAction" parameter="submitAction">
<forward name="success" path="/jsp/juvTabMain/juvenilePhysicalCharacteristicCreateSummary.jsp"/>
<forward name="back" path="/globalBack.do"/>
<forward name="cancel" path="/displayJuvenileMasterInformation.do"/>
</action>


</action-mappings>  

<!-- ========== Message Resources ============================= -->
<message-resources parameter="ApplicationResources_JuvCasework"/>

<!-- ========== Plug Ins Configuration ======================== -->
 <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
       <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
                                                 /WEB-INF/validation.xml"/>
  </plug-in>

</struts-config>


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE form-validation PUBLIC
       "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"
       "http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">

<form-validation>

<!-- ========== Default Language Form Definitions ===================== -->
<formset>

<!-- JUVENILE PHYSICAL CHARACTERISTICS -->
<form name="juvenilePhysicalCharacteristicsCreateForm">
<field property="buildId" depends="required">
<arg key="prompt.build" />
</field>
<field property="heightFeet" depends="required,mask,range">
<arg key="prompt.heightFeet" />
<arg name="range" key="${var:min}" resource="false"/>
     <arg name="range" key="${var:max}" resource="false"/>
       <msg name="mask" key="errors.numeric" />
       <var>
<var-name>mask</var-name>
<var-value>^[0-9]*$</var-value>
</var>
<var>
                   <var-name>min</var-name>
                   <var-value>3</var-value>
       </var>
       <var>
                   <var-name>max</var-name>
                   <var-value>8</var-value>
       </var>
</field>

<field property="heightInch" depends="required,mask,range,minlength">
<arg key="prompt.heightInch" />
   <arg name="range" key="${var:min}" resource="false"/>
   <arg name="range" key="${var:max}" resource="false"/>
<arg name="minlength" key="${var:minlength}" resource="false"/>
<msg name="mask" key="errors.numeric" />
<var>
<var-name>mask</var-name>
<var-value>^[0-9]*$</var-value>
</var>
<var>
<var-name>minlength</var-name>
<var-value>1</var-value>
</var>
<var>
               <var-name>min</var-name>
               <var-value>0</var-value>
       </var>
       <var>
               <var-name>max</var-name>
               <var-value>11</var-value>
       </var>
</field>

<field property="weight" depends="required,mask,range">
<arg key="prompt.weight" />
<arg name="range" key="${var:min}" resource="false"/>
<arg name="range" key="${var:max}" resource="false"/>
<msg name="mask" key="errors.numeric" />
<var>
<var-name>mask</var-name>
<var-value>^[0-9]*$</var-value>
</var>
<var>
           <var-name>min</var-name>
           <var-value>50</var-value>
   </var>
   <var>
           <var-name>max</var-name>
           <var-value>499</var-value>
   </var>
</field>

</form>


</formset>
</form-validation>

<%--THESE TWO LINES FOR STRUTS & JAVASCRIPTS VALIDATIONS--%>
<html:javascript formName="juvenilePhysicalCharacteristicsCreateForm" />

<%-- Javascript for emulated navigation --%>
<title><bean:message key="title.heading"/> - juvenilePhysicalCharacteristicsCreate.jsp</title>
<!--JQUERY FRAMEWORK-->
<%@include file="../jQuery.fw"%>
<script type='text/javascript' src="/<msp:webapp/>js/casework.js"></script>
<script type='text/javascript' src="/<msp:webapp/>js/juvenileProfileInfo.js"></script>
<script type='text/javascript' src="/<msp:webapp/>js/casework_util.js"></script>
<script type='text/javascript' src="/<msp:webapp/>js/app.js"></script>
</head>
<%--END HEADER TAG--%>

1 year ago