struts-config.xml

P

pradeepsarathy

Hi all,
I am new to developing applications in struts.I ve added the following
validator plugin entry in my struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"

"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>

<data-sources></data-sources>

<form-beans>

<form-bean name="IndexForm"
type="pradeep.poc.strutsExample.form.IndexForm"/>

</form-beans>

<global-exceptions></global-exceptions>

<global-forwards></global-forwards>

<action-mappings type="org.apache.struts.action.ActionMapping">

<action path="/logon"
type="pradeep.poc.strutsExample.Action.IndexAction"
name="IndexForm"
scope="request"
validate="true"
input="/jsp/main/index.jsp">
<forward name="success" path="/jsp/main/nextpage.jsp"/>
<forward name="failed" path="/jsp/main/index.jsp"/>
</action>

</action-mappings>

<message-resources parameter="ApplicationResources" null="false" />

<plug-in classname="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/xml/validator-rules.xml,/xml/validation.xml"/>
</plug-in>

</struts-config>

I am able to hit my index jsp.From there i am directing it to
result.jsp through the action class as given in the mapping above.

My problem is that,when i include the validator plugin in the config
file,i get a 404 on hitting submit from the index page(viz i am not ble
to navigate to the result page).If i exclude the entry from the config
file,then i am able to navigate.

I am not sure if this is due to some configuration mismatch in the
action mapping.

Please help me rectify this problem.

Thanks in advance.
 
A

Aj-India

Try

<plug-in classname="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"

value="/WEB-INF/xml/validator-rules.xml,/WEB-INF/xml/validation.xml"/>
</plug-in>

Cheers,
Aj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top