Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Struts validator status 404 action not avaliable

Posted on 2006-07-20
Medium Priority
Last Modified: 2008-02-01
i am using struts Actionerror was working fine but validator is not working

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>


  <body >

    <html:form action="/valviji" onsubmit="return validateLookupform(this)" >

     <table width="45%" border=0>
       <td> Symbol </td>
            <td> <html:text property="symbol"/></td>
            <td><bean:message key="Lookupform.symbol" />
                 <td> <html:submit property="submit" value="submit"/></td>


<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"


     This is a minimal Validator form file with a couple of examples.


        <!-- A-->
     <!--    example-->



        <!-- An example form -->
        <form name="Lookupform">
                    <arg0 key="Lookupform.symbol"/>

                              <!--  mask change -->



<!-- <?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"

     <form name="Lookupform">
            <field property="symbol" depends="required,mask">
            <arg0 key="Lookupform.symbol"/>


<validator name="required"
.Object, org.apache.commons.validator
.ValidatorAction, org.apache.commons
.validator.Field, org.apache.struts
.action.ActionErrors, javax.servlet
      title = Welcome to Struts Application
heading= Example for Internationalization
error.lookup.symbol.required=A Valid Symbol is Required
errors.lookup.unknown=An UnKnown Symbol {0}.Enter a Proper Symbol.
errors.header=<h3><font color="red"> Error List </font></h3>
errors.footer=<br>End of Error Message

Lookupform.symbol.proplem=the blank areaname
symbol.error=Correct Symbol
errors.required={0} is required.
sym.err={0}Invalid symbol
errors.invalid={0} is invalid.

plz send details about my above program ana what i did wrong
Question by:saravananvg
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 30

Accepted Solution

Mayank S earned 100 total points
ID: 17144839
>> classname="org.apache
>> .struts.validator.FieldChecks"

Is there a new-line there in the file? I'm not sure if it would work but I'll prefer being on the safer side with:


so on....


Assisted Solution

orhanbaba earned 100 total points
ID: 17152636
you will put this in your validator.xml
<!-- Tast form Validation-->
<form name="TestForm">
    <field  property="username"
         <arg key="username.name"/>

in jsp page
html stuff...

<html:form action="/TestValidation" method="post" onsubmit="return validateTestForm(this);">
<html:text property="username" size="25" maxlength="25"/>
<!-- Begin Attention Here-->
<html:javascript formName="TestForm"/><!-- you didnt put this in your code -->
<!-- End Attention Here :) -->

html stuff...

If you are working with eclipse sometimes you need to restart tomcat when you change the xml files.

Expert Comment

ID: 17152670
and put validate="true" in your struts action configuration.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question