Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

struts-config.xml

Thread view: 
pradeepsarathy@gmail.com - 03 Apr 2006 12:16 GMT
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.
Aj-India - 03 Apr 2006 13:19 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.