facebook

Struts Validator [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Comments
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #215856 Reply

    When I add the following code to my struts-config.xml

    
        <!-- 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>
    

    I get a 404 Servlet action not found. Wierd. When I remove the code, the app works again.

    Lee

    #215867 Reply

    Riyad Kalla
    Member

    Lee,
    Where are you adding it? Location matters, and if this is killing your struts-config.xml parsing, then I can see the ActionServlet dying and you getting the 404. Check your console for parse errors or something like that.

    #215881 Reply

    Paul
    Participant

    I think Riyad is right. I have exactly what you do, but at the end of the struts-config file just before the closing </struts-config> tag, and it works fine.

    If you already have it there and it’s not working, then I have no idea.

    #216015 Reply

    @pwoods wrote:

    I think Riyad is right. I have exactly what you do, but at the end of the struts-config file just before the closing </struts-config> tag, and it works fine.

    If you already have it there and it’s not working, then I have no idea.

    Unfortunately, that’s exactly where I have it — right before the </struts-config>

    Lee

    #216020 Reply
    
        <!-- 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>
    

    uh….that’s supposed to be “ValidatorPlugIn” not “ValidatorPlugin” — a case sensitivity issue — I’ll go shoot myself now.

    Lee

    #216049 Reply

    Scott Anderson
    Participant

    I’ll just quietly mark this thread closed and not tell anyone. 😉

    #216057 Reply

    Riyad Kalla
    Member

    haha, poor Lee

    #216059 Reply

    Scott Anderson
    Participant

    Darn. Sorry Lee. It looks like Riyad noticed. 😉

    #216073 Reply

    @support-scott wrote:

    Darn. Sorry Lee. It looks like Riyad noticed. 😉

    😆

    Well, at least I found it myself — cough cough 🙂

    Lee

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Struts Validator [Closed]

You must be logged in to post in the forum log in