Validator.xml not working

hi
I am using the struts framework1.1.I have developed a login page with username and password.i want to write a validator.xml for it in accordance with validator-rules.xml as defined by struts1.1.and i have a welcome page that i want to direct this login page to if all validations are successful i.e the username should not be blank or password should not contain any invalid or special characters.please help me out with the code with the actionform and avtion classes alongwith validator.xml.i require it urgently .
thanks in advance.

Struts 1.1 comes with default validators. There are some contained into validation-rules.xml. The first validator is called "required" which you can use to validate your username field for example. Implementing Struts validation is done in several steps.
1. Add
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml"/>
</plug-in>
into your struts-config.xml file. This will point to your validation files.
2. Create a validation.xml file
add the elements you need,
<form-validation>
<formset>
<form name="MembreForm">
<field property="login"
     depends="required">
     <arg0 key="MembreForm.login.displayname"/>
</field>
... more lines
- depends attribute points to validator name in validation-rules.xml
- arg0 attribute points to your ApplicationResources.properties (fill that file with appropriate resources)
3. Create your Form beans so they extend ValidatorForm
ex : public class userForm extends ValidatorForm {
4. Create your JSP + Struts HTML and Logic tags (to render errors) pointing to your action classes and test.
Validation.xml will link form beans, rules and errors messages.
I think that's it. Validation-rules.xml doesn't have everything, if you need to make a database access validator, then you would have to create a helper class and declare it's method into the validation-rules.xml.
Hope that helps.
ER
hi
I am using the struts framework1.1.I have developed a
login page with username and password.i want to write
a validator.xml for it in accordance with
validator-rules.xml as defined by struts1.1.and i have
a welcome page that i want to direct this login page
to if all validations are successful i.e the username
should not be blank or password should not contain any
invalid or special characters.please help me out with
the code with the actionform and avtion classes
alongwith validator.xml.i require it urgently .
thanks in advance.

Similar Messages

  • Why Strict validation is not working

    Hi,
    Why the Strict validation is not working in the XMLDB. I validated successfully the same file from XML Spy. The error in Oracle is:
    begin
    for x in (select warehouse_spec from xml_validate where warehouse_id=51) loop
    x.warehouse_spec.schemaValidate();
    end loop;
    end;
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00011: internal error: LsxvPushCandidate array overflow
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at line 3
    Thanks in advance
    Rizly

    The error is LSX-00011: internal error: LsxvPushCandidate array overflow
    This might be helpfull
    Error in STRICT Validation
    Regards,
    Remy

  • Sidecar.xml not working with smoothScrolling

    Hi everybody!
    I am struggling with a big problem with the sidecar.xml file because it does not load the <smoothScrolling>always</smooothScolling> instruction.
    I have created a very simple "test" folio with only two articles each made of two pages either in horizontal and vertical, so I have the followinf structure:
    <FOLIO> (main folder)
    sidecar.xml
    <001> (first stack)
    001_v.indd (an indesign file with 1 page 768x1024)
    001_h.indd (an indesign file with 1 page 1024x768)
    <002> (second stack)
    002_v.indd (an indesign file with 2 pages 768x1024)
    002_h.indd (an indesign file with 2 pages 1024x768)
    I have created the sidecar using the utility of Johannes Henseler so I am sure it is correct and here it is (I have just removed the link section which was very long):
    <?xml version="1.0" encoding="UTF-8" standalone="true" ?>
    <sidecar>
              <!--
    sidecar.xml generator by Johannes Henseler
    http://projects.nordsueddesign.de/sidecarxml
    -->
              <!-- article #0 -->
              <entry>
                        <folderName>001</folderName>
                        <articleTitle>Test</articleTitle>
                        <author>Puzzle</author>
                        <kicker>Pilly</kicker>
                        <description>Cover</description>
                        <tags></tags>
                        <isAd>false</isAd>
                        <smoothScrolling>never</smoothScrolling>
                        <isFlattenedStack>false</isFlattenedStack>
              </entry>
              <!-- article #1 -->
              <entry>
                        <folderName>002</folderName>
                        <articleTitle>Test</articleTitle>
                        <author>Puzzle</author>
                        <kicker>Pilly</kicker>
                        <description>First Article</description>
                        <tags></tags>
                        <isAd>false</isAd>
                        <smoothScrolling>always</smoothScrolling>
                        <isFlattenedStack>false</isFlattenedStack>
              </entry>
    </sidecar>
    Well.. what it happens now is that I create a new folio with the Folio Builder Panel and then I import using the multiple article option. Everything seems ok (the two articles are imported and the description, article title, author, kicker are correct) but the "smoothScrolling" results to be deactivated! (in my Italian version I have the following text "Scorrimento uniforme: disattivato (allinea a pagina)" (that I translate as "never") instead I was expecting to have "Scorrimento uniforme: entrambe le direzioni" (that I translate as "always").
    And what is worse is that if I try to modify the property in Indesign using the Folio Builder Panel I get this error message:
    Errore di generazione contenuto.
    [Errore: Gli articoli con scorrimento uniforme devono contenere almeno una pagina singola. Aprite la finestra di dialogo Proprietà per modificare le opzioni di scorrimento uniforme.]
    I try to translate:
    Generating content error.
    Error: the articles with smoothScrolling must contains at least a single page. Open the dialogue window Property to modify the options for the smoothScrolling.
    Actually the Indesign source files 002_v.indd and 002_h.indd have already two pages so I do not understand what the error means. It just says to modify the property, but this means I can not have the smoothScrolling on "always" and I do not understand why!
    I just would like to have a "smoothScrolling" effect between two pages of various articles using the sidecar.xml file!
    Please someone can help me?

    Smooth scrolling and flattenig does not work in combination. I think there
    is no way to enable that.
    —Johannes
    (mobil gesendet)
    Am 01.03.2012 17:19 schrieb "Bob Levine" <[email protected]>:
       Re: Sidecar.xml not working with smoothScrolling  created by Bob Levine<http://forums.adobe.com/people/BobLevine>in
    Digital Publishing Suite - View the full discussion<http://forums.adobe.com/message/4239654#4239654>

  • Publishing HTML(Page content) field required field validation is not working

    The required field validation is not working on Site Column of type "Full HTML content with formatting and constraints for publishing". I found a link i.e.
    https://social.msdn.microsoft.com/Forums/office/en-US/7b544aae-2562-4b8e-8e5b-36a1d47a4d14/publishing-htmlpage-content-field-required-field-validation-is-not-working?forum=sharepointdevelopment
    which tells this is a hot fix in July 2014 CU . Can anyone help me with what all Fixes are there in July 2014 CU. So that I can update only if it required!
    Or any other alternative where I can use the required field validator on "Full HTML content with formatting and constraints for publishing" column type?

    You could add a scripteditor webpart on the newform.aspx page and add client side validation using jQuery.
    $(document).ready(function()
     var fname = document.getElementById('fname').val();
     var lname = document.getElementById('lname').val();
     var age = document.getElementById('age').val();
     /*Do not know how to get element by class and that too, two different type. Have to check if user chose anything or not*/
      $("#submit").click(function()
       if(fname.length === 0)
        alert("Please input a first name");
       else if(lname.length === 0)
        alert("Please input a last name");
       else if(age.length === 0)
        alert("Please input an age");

  • Validation is not working for F-28 and F-53

    Hi,
    I wrote a validation for Transaction Code F-28 and F-53 and F-44 and F-54. But it is not working. Kindly help me where i went wrong. please do the needful.
    Pre-Requisite : Company Code and Transaction Code
    Check : Business Area 4000
    Requirement is - In the above transaction if i give the other business area like 3000, system should throw error. System should only accept the Business Area 4000
    But i am not able to succeed to full fill the requirement.. Kindly Help me
    Thanks
    Sunil

    Hi,
    Please pass some transactions using mentioned t-codes in testing server. After passing transactions please check the accounting document header for checking T-code for the same.
    Use that t-code for validations . also check whether Validation - call p point is activated or not in t-code OB28
    Rgds,
    Saurabh

  • Import metadata xml not working

    Import metadata as Xml Datasource with network files(using url) not working and giving a message cannot connect - invalid url.
    but the same url can be run from a browser.
    What can be the problem?

    Hi Radosla,
    Yep, thx for the hint.
    Looks like i put it on th test server in compatibility mode, but not on the real server.
    Changing this with F12 to IE 8 did the trick!
    Regards
    Frederik

  • Validation sequencing not working

    hi
    I have found that my item level validations on a page are not working as I expected. I validate a field (P74_change_id) to 'must be numeric', then I have another validation with a much higher sequence number that checks whether the value already exists in the database, but this is causing an error if the value if not numeric. The following text is taken from my debug mode, what surprises me is the second line that clearly states the first 'not numeric' validation is functioning correctly and returning a fail, but it still carries on with the other validations.
    0.28: ...Item is numeric validation: P74_CHANGE_ID
    *0.28: ...Validation did NOT pass*
    0.28: ...Item Not Null or zero Validation: P74_CHANGE_ID
    0.28: ...Item Not Null Validation: P74_RAISED_DATE
    0.29: ...Item is date validation: P74_RAISED_DATE
    *0.29: ...Validation did NOT pass*
    0.29: ...Item Not Null Validation: P74_APPROVED
    0.29: ...Item Not Null Validation: P74_TYPE
    0.29: ...Item is date validation: P74_APPROVED_DATE
    0.30: ...Exists Validation: type="NOT_EXISTS" select * from budget_ct_header where (change_ID = :P74_change_Id) and (change_ID_rev = :P74_change_id_rev) and (project = :P74_project) and (type = :P74_TYPE)
    0.30: Show ERROR page...
    I get a 'ORA-01722: invalid number' and 'Error ERR-1006 Error in validation routine' referring to 'Exists Validation: type="NOT_EXISTS" select * from' etc the on the page below the debug.
    Any ideas/thoughts??
    Thanks
    -Marc

    Marc
    Apex will check all validations before the error page - hence the 'X errors have occured' message. This is a good thing, there's nothing worse for a user to get an error, fix it, re-submit the page only to get another error etc etc.
    Looks like you need to check you NOT EXISTS validation so make all the other validation conditional never and then get that one working.
    I think the problem is probably with one of the bind variable predicates where you reference the page items. Have you tried wrapping them in TO_NUMBER() where appropriate?
    By the way you don't need brackets round your predicates in the WHERE clause of your not exists query.
    Let me know if you need further help.
    Cheers
    Ben
    Sorry forgot to mention that your ORA error seems to relate to your NOT EXISTS query - not your IS NUMERIC validations
    Edited by: Munky on Apr 8, 2009 11:37 AM

  • Apache proxypass and crossdomain.xml not working

    Hi everyone,
    I have the following problem. I have set up jboss on a Linux server connecting to local port 8080 (localhost:8080).
    I have opened the application on port 80 with Apache ( www.myDomain.com) and set up a virtual host that proxies
    this connection to localhost:8080 where jboss is listening.
    <VirtualHost *:80>
        DocumentRoot /var/www/nyDomain
        ServerName myDomain.com
        Alias /crossdomain.xml /var/www/html/crossdomain.xml
        # proxy pass to the jboss server
        <IfModule mod_proxy.c>
        ProxyRequests Off
        <Proxy *>
            Order deny,allow
            Deny from all
            Allow from all
        </Proxy>
        ProxyPass /Stylect http://127.0.0.1:8081/Stylect
        ProxyPassReverse /Stylect http://127.0.0.1:8081/Stylect
        # ProxyPreserveHost on
        </IfModule>
    </VirtualHost>
    The crossdomain.xml file is at the root of the server and can be accessed with www.mydomain.com/crossdomain.xml
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-access-from domain="*" to-ports="*" secure="false"/>
    <allow-http-request-headers-from domain="*" headers="*"/>
    </cross-domain-policy>
    I can see in firebug that it's being downloaded when I first request the page - this is the response:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
      <title>Software as a Service Development. </title>
      <META name="description" content="Description here"><META name="keywords" content="Saas, fashion design, plm, production, nutrition, food, orders">
    </head>
    <frameset rows="100%,*" border="0">
      <frame src="http://xxx.xxx.xxx.xx/crossdomain.xml" frameborder="0" />
      <frame frameborder="0" noresize />
    </frameset>
    <!-- pageok -->
    <!-- 04 -->
    <!-- -->
    </html>
    Yet I still get a 2048 sandbox violation error.
    The crossdomain is needed because the proxied request
    appears to be coming from the public ip while jboss
    is bound to the local host.
    If I expose Jboss directly to the web all works well but there
    are too many security issues in that setup. Apache as a front is
    much better.
    The question is: is this the correct response I should be getting
    (or should it be directly the xml file) and why is it not working?
    How can I fix this?
    Any help much appreciated. I'm stuck.
    Dahn 

    Try adding security="false" inside the next line:
    <allow-access-from domain="*"/>
    so it would look something like
    <allow-access-from domain="*" security="false" />
    It fixed the problem for me.

  • Request Data Validator is not working

    Hi Guys,
    I am trying to invoke a plugin while submitting a request through CATALOG in OIM 11gR2. The user case i am trying to achieve is - (1) User/Admin login to OIM and go to CATALOG option (2) Select an Application instance, fill the values in the form and checkout (3) While submitting this validator should invoke which will validate the request data and throw exception if any.
    For this i was thinking to utilize the plugin for oracle.iam.request.plugins.RequestDataValidator "This is used for custom validation of request data after submission"
    My plugin.xml looks like
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.request.plugins.RequestDataValidator">
    <plugin pluginclass="com.test.oim.TestRequestValidator" version="1.0" name="TestReqValidator">
    </plugin>
    </plugins>
    </oimplugins>
    And i am using simple code as below
    package com.test.oim;
    import oracle.iam.request.exception.InvalidRequestDataException;
    import oracle.iam.request.plugins.RequestDataValidator;
    import oracle.iam.request.vo.RequestData;
    +public class TestRequestValidator implements RequestDataValidator {+
    +public TestRequestValidator() {+
    super();
    +}+
    +public void validate (RequestData reqDta) throws InvalidRequestDataException{+
    System.out.println("************************************************");
    System.out.println("***Justification***" reqDta.getJustification());+
    throw new InvalidRequestDataException(new Exception("Invalid User"));
    +}+
    +}+
    My plugin directory contains the plugin.xml file and the jar file (with above class) under lib directory. I placed the zip file under OIM_HOME/Plugin directory and even restarted the servers.
    However this code is not invoking and i can successfully create the request (i tried from user and admin both). Please advise if anyone has any idea. Thanks

    Hi Duncan,
    I have mapped the DataSet validator element in my plugin.xml file
    +<?xml version="1.0" encoding="UTF-8"?>+
    +<oimplugins>+
    +<plugins pluginpoint="oracle.iam.request.plugins.RequestDataValidator">+
    +<plugin pluginclass="com.test.oim.OIMREQValidate" version="1.2" name="OIMREQValidate">+
    +<metadata name="Data Validator">+
    +<value>AssignRolesDataSet|ModifyUserDataset</value>+
    +</metadata>+
    +</plugin>+
    +</plugins>+
    +</oimplugins>+
    Still my request data validator is not getting invoked. I can successfully create the request. (Per this validator every request should fail and logs should getting logged). My validate method code is below
    +public void validate (RequestData reqDta) throws InvalidRequestDataException{+
    RequestLogger.LOGGER.logp(Level.WARNING, "OIMREQValidate", "validate", "CALLING THE CUSTOM PLUGIN");
    System.out.println("***Justification***" reqDta.getJustification());+
    throw new InvalidRequestDataException(new Exception("Invalid User"));
    +}+

  • Premiere Markers export and import: Roundtrip via FCP XML not working

    The objective of my project is to create a sports app that records markers and saves it in different formats of XML / CSV that I can then import in different NLE packages.
    I have already succeeded with Vegas Pro but also want to support NLEs for MAC-OS.
    In order to approach this analytically I have exported a very simple project with 1 sequence including 1 clip and 3 markers (with length zero and length > 0) and exported it
    in FCP XML from Adobe Premiere CC and do a round-trip import it via FCP import into Adobe Premiere CC.
    This round-trip does not work. Any insight why or any support what other mechanism will work?
    Thanks
    Thomas

    let's go back to the purpose:
    I have written a mobile app on which people can during a sports match capture the time of the important moments by pressing buttons.
    I then convert the time information into an XML or CSV file that can be read by the different NLE. Given that Sony Vegas allows to import
    markers independently from a sequence. Now I look at the same things for Premiere. This allows to edit the highlights very quickly vs watching
    the entire match coverage again.
    I try to replicate that on Premiere through the FCP XML, but now that the roundtrip works, the issue is that FCP XML in its structure wants a sequence.
    I could imagine to provide a dummy sequence that can be overlayed by the real content just to preserve the markers. Any ideas?
    Regards,
    TK

  • Orion.edit.validator example not working

    The example mentioned in the below link for orion.edit.validator does not seem to work.
    https://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor
    Please help with the proper code snippet or example for orion.edit.validator

    The code on that page was outdated, I fixed it.
    Here's a gist showing a complete working example: https://gist.github.com/mamacdon/cb1e20fd8f967e97cfb4

  • , Finger print validity sensor not working probook 450 g2

    i have downloaded the finger print validity sensor and intalled it ..till now it's not working and i cant even find it in sign in options 

    Hello @ess_elgiendii ,
    To get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial product. You can do this at Commercial Forums.
    Even though this is a Commercial product, I would check is it enable biometric support.
    Here is a link to troubleshoot the Fingerprint Reader software.
    You have installed the incorrect version of software for your system. You will have to uninstall it and install this version.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Selection-Screen validation is not working

    Dear Gurus,
    I did one report in that,selelction screen is not working properly.
    if i give input by F4 searching,selection condition not working.
    it does not retrive the particular result instead of that it retrive the all values what can i do for this.
    Regards,
    Rajkumar.A

    Hi Rajkumar,
    What do you mean by selection-screen not working?
    Does not it give values on clicking execute or doesnot it move to the output screen or does it throw an error?
    Please explain

  • Struts validation framework not working

    Hi
    I created a very simple webapp and using struts validation framework. But, it always give me validation errors even i filled out all the required firled information. i have my struts-config included the plug-in, points to the location of validation.xml & validation-rule.xml, and i have the validate set to true, and an input point to the page when validation fails, plus my formbean to extend the validatorForm. But, no matter what, it always pass the validation. in other words, the validate method in the validator always returns 0 errors. Any ideas what might be wrong? or any suggestions of how i can debug it?
    Thanks a lot.
    cc

    There is an bug in Sun One App Server
    U need to add permission for delete in the server policy file
    please refer to
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4803631

  • Xml not working on CSS11500

    We previously used CSS 11000 series and made some scripts with xml files to perform some actions on it.
    This was working fine.
    No we replaced these Css'es with CSS11500 series.
    When i now run these scripts on the CSS11500 i get the message:
    AUG 8 13:58:30 1/1 6039 NETMAN-4: httpRpmPut: Not a well-formed XML document
    I checked the Xml file with a validator and it is OK. I also used other apps to send it to the CSS but still the same result. The scripts are still working on the 11000's.
    It's just a simple file also defined on these Cisco site:
    The XML file:
    <?xml version="1.0" standalone="yes" ?>
    <config>
    <action>interface 2/1</action>
    <action>admin-shutdown</action>
    </config>

    I am not sure if this is supported on the CSS 11503 and 11506 . Please check the documentation to verify. http://www.cisco.com/univercd/cc/td/doc/product/webscale/css/css_720/index.htm

Maybe you are looking for