Hi there,
Thanks for taking the time to read my post.
I am trying to configure struts validation to my application.
And I keep getting the following stack trace when I startup Weblogic (8.1 SP2). ----
UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1018)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:894)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:873)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:812)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3281)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3226)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3207)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:694)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
at weblogic.Server.main(Server.java:32)
Your help is really appreciated.
Thanks,
PA
==================================================================================================
I am extending my action form with ValidatorForm as follows --
public class SubmitForm extends ValidatorForm {
}
============================================================
Here is part of my struts-config.xml
<struts-config>
<!-- ========== Form Bean Definitions ================= -->
<form-beans>
<form-bean name="submitForm" type="com.emergis.onlinereporting.struts.SubmitForm" />
</form-beans>
<!-- Global forwards -->
<global-forwards>
<forward name="error" path="/error.jsp" />
</global-forwards>
<!-- ========== Action Mapping Definitions ============ -->
<action-mappings>
<action path="/submitAction" type="com.emergis.onlinereporting.struts.action.SubmitAction"
name="submitForm"
input="/Submit.jsp"
scope="request"
validate="true">
<forward name="success" path="/DisplaySubmit.jsp" />
<forward name="failure" path="/Submit.jsp" />
</action>
</action-mappings>
<!-- message resources -->
<message-resources parameter="com.ApplicationResources" null="false" />
<!-- Validator plug-in-->
<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>
============================================================
Here is my validation.xml file --
<form-validation>
<!-- ========== Default Language Form Definitions ===================== -->
<formset>
<form name="submitForm">
<field property="lastName"
depends="required">
<arg0 key="validateform.lastname"/>
</field>
<field property="address"
depends="required">
<arg0 key="validateform.address"/>
</field>
<field property="sex"
depends="required">
<arg0 key="validateform.sex"/>
</field>
<field property="age"
depends="required">
<arg0 key="validateform.age"/>
</field>
</form>
</formset>
</form-validation>
============================================================
I am using Struts Version 1.2.4.
Struts DTD --
Validator DTD --
Thanks for taking the time to read my post.
I am trying to configure struts validation to my application.
And I keep getting the following stack trace when I startup Weblogic (8.1 SP2). ----
UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1018)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:894)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:873)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:812)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3281)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3226)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3207)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:694)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
at weblogic.Server.main(Server.java:32)
Your help is really appreciated.
Thanks,
PA
==================================================================================================
I am extending my action form with ValidatorForm as follows --
public class SubmitForm extends ValidatorForm {
}
============================================================
Here is part of my struts-config.xml
<struts-config>
<!-- ========== Form Bean Definitions ================= -->
<form-beans>
<form-bean name="submitForm" type="com.emergis.onlinereporting.struts.SubmitForm" />
</form-beans>
<!-- Global forwards -->
<global-forwards>
<forward name="error" path="/error.jsp" />
</global-forwards>
<!-- ========== Action Mapping Definitions ============ -->
<action-mappings>
<action path="/submitAction" type="com.emergis.onlinereporting.struts.action.SubmitAction"
name="submitForm"
input="/Submit.jsp"
scope="request"
validate="true">
<forward name="success" path="/DisplaySubmit.jsp" />
<forward name="failure" path="/Submit.jsp" />
</action>
</action-mappings>
<!-- message resources -->
<message-resources parameter="com.ApplicationResources" null="false" />
<!-- Validator plug-in-->
<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>
============================================================
Here is my validation.xml file --
<form-validation>
<!-- ========== Default Language Form Definitions ===================== -->
<formset>
<form name="submitForm">
<field property="lastName"
depends="required">
<arg0 key="validateform.lastname"/>
</field>
<field property="address"
depends="required">
<arg0 key="validateform.address"/>
</field>
<field property="sex"
depends="required">
<arg0 key="validateform.sex"/>
</field>
<field property="age"
depends="required">
<arg0 key="validateform.age"/>
</field>
</form>
</formset>
</form-validation>
============================================================
I am using Struts Version 1.2.4.
Struts DTD --
Validator DTD --