Signature validation using signatureValidate

Hi,
We have designed a form where we use signatureValidate to check the validity of a signature. It has been working fine until recently where we all of a sudden get this error when calling the function:
          TypeError: oField.signatureValidate is not a function
This is the code that we use when validating the signature:
          function validateSignatur(){
               var iResultat;
               var sBesked = "";
               var felt1 = form1.side1.sub_Underskrift.fld_Underskrift.somExpression;
               var oField = event.target.getField(felt1);
               var iStatus = oField.signatureValidate();
               var oSigInfo = oField.signatureInfo();
               sBesked = oSigInfo.statusText;
               iResultat = iStatus;
               return iResultat;
As I said earlier this has worked fine for some time now, but recently is has stopped working. Is the signatureValidate function no longer supported or what could the problem be??
/Caspar

I think you need to make felt1 a string. I've tried using somExpression as the argument to getField as well and it just doesn't work. Try something like this:
var felt1 = "form1[0].side1[0].sub_Underskrift[0].fld_Underskrift[0]";
Hope this helps.
Christopher Allen

Similar Messages

  • Digital Signature validation

    I have been using digital certificates to sign pdf documents for approximately a year.  The signatures can be checked against  a CRL which is provided on the internet.  So far Adobe Acrobat Reader has worked fine, retreiving CRLS and validating certificates.
    Today I found out that since renewing expired certificates ( the default lifetime was set to 1 year) the  signatures on old signed documents are unverified .  The local time of the computer was stored in the signature not a timestamp. 
    I found that reader defaults to using the local time of the computer to validate an old signature when a timestamp is not used, this has been rectified in 9.1 so that it uses to date that the signature was generated (why on earth would it use anything else!).  I now have the signatures validated by changing this setting providing the date range of the CRL in the reader encompases the end date of the certificate.
    However, when the reader updates the CRL in the cache and the new CRL date range does not include that of the original signature the reader throws up an error stating that the CRL is invalid or expired.
    How can I get it to agree pass the validation without turning off revocation checking?  I have the CRLs that were in force at the time of the signing but there is no way I can provide them to the reader.  How can I make the reader apply the current and valid CRL to the old documents.  The expiry date of the old certificates are still in there?
    I always thought that not having to keep a CRL history for expired certificates was a dumb idea when I read the documents, but I didn't imagine that old signatures would become invalid when the certificate expired (mine have become invalid less thant 5 days after the documents were signed.  What were the developers thinking.
    This is pushing toward creating certificates with lifetimes of 100's or thousands of years so that they can always be validated.
    Anybody have a working solution.

    I have found a solution.to this
    Using a virtual machine I set the date on the system back to a point in time when the certificates were all valid.  I then create a new crl with a lifetime which makes it valid for one month from the real date (today).  I then set the date back and copy the crl to the distrubution point.
    Hey presto, acrobat reader loads the crl and is quite happy to accept it even though it has events recorded in it that happened after the date on which it was created!.
    Problem solved, but for how long?

  • Digital Signature validation issue in Adapter Module

    Hi guys,
    we have developed an adapter module for digital signature validation, unfortunately, it simetimes work, sometimes doesnt. Strange is, that the same adapter module works for one customer, while for another one doesn't.
    We have sent through some "invalid" messages, which should have been valid at the client, where the module works and theu were flagged as valid. It seems the problem is caused by "special" spanish characters, because validation works for the messages where are only standard chars.
    Any idea, what to check? Java version, system encoding?
    Any help appreciated,
    Olian

    Hi,
    Not really sure about what causes such issues, but if your module coding uses String and byte[] manipulation, are you using explicite encoding when declaring such types ? I remember facing strange issues with XML field values, and "forcing" encoding to "UTF-8" when appropriate, it solved all my errors (string typed object, when converted internally by the JVM, were not always represented by the same bytes object)
    Hope this helps
    Chris

  • Bug with Overall Signature Validity Icon

    I am finding that there are inconsistencies in the way Adobe Acrobat 9.0.0 and Adobe Reader 9.0.0 indicate Overall Signature Validity states for digitally signed documents. Adobe's white paper on this issue at http://www.adobe.com/devnet/reader/articles/reader_compatibility/readercomp_digitalsignat ures.pdf clearly states when/how both these applications should indicate "Unsigned changes since last valid signature", being the icon of a signature with triangle containing an exclamation mark.
    I performed the following steps:
    1. Open a document already containing blank digital signature fields and Extended Features / Reader Rights enabled, in Adobe Reader.
    2. Sign and save the document.
    3. In the signatures panel, select "Validate All".
    4. The overall signature validity icon of a signature and tick (indicating all is valid) is displayed, as expected.
    5. Open the "Comment and Markup" toolbar, and place either a "sticky note" or "stamp" in the document.
    6. In the signatures panel, select "Validate All".
    7. The overall signature validity icon of a signature with yellow triangle symbol with exclamation mark (meaning unsigned changes since last signature) is displayed, as expected.
    However, if at step 5 above I place any of the OTHER options (Text Edit, Text Highlight, Callout, Text Box, Cloud, Arrow, Line or Rectangle), and again "validate all", the overall signature validity icon still shows a signature and tick (i.e. it has not recognised the changes). In such cases, the "Annotations Created" entry also does not appear under the signed revision in the signatures panel.
    8. Furthermore, if I sign the document again after adding any of the "Comment and Markup" options, and then "Validate All", the overall signature validity icon of a signature with tick and blue 'i' symbol (meaning all is valid but document was updated since initial signature) is displayed, as expected.
    9. Then add ANY of the "Comment and Markup" options, and then "Validate All", and the overall signature validity icon of a signature with tick and blue 'i' symbol is STILL displayed. At this point I would expect the signature with yellow triangle symbol with exclamation mark to be displayed. Again in this case the "Annotations Created" entry also does not appear under the last signed revision in the signatures panel.
    Can anyone else repeat this behaviour? It appears to be the same in Adobe Acrobat and Adobe Reader. Am I missing something or is it a bug?
    Thanks,
    David.
    Canberra, Australia.

    Philip,
    The PDF file I was testing with originated from a Word document, created by Acrobat Professional v9.0.0. The document was created using the 'Convert to Adobe PDF' option that is embedded within the Word menus when Acrobat Professional was installed. From there I added the digital signature fields, text fields, check box etc, then 'Extended Features in Adobe Reader', and saved the document (replacing the original file) as prompted when extending the features to Adobe Reader. I don't have the LiveCycle Designer application.
    The bug I am experiencing is not effected by saving or not saving. Today I started with the document created some time ago that I describe above. It contains several blank signature fields, no certification, a blank text field and a check box, and extended features in Adobe Reader were enabled. Today I opened that document, signed the first signature field and saved as a different file name when prompted. I then added a 'text box' annotation. I then selected validate all from the signature panel, and no changes are listed under Rev 1, just the remaining unsigned signature fields are listed. The overall signature validity icon shows a signature and tick. I then saved the document, and again selected validate all. No change to either rev status or icon. I then closed Acrobat Pro and reopened the document, and selected validate all. Still no change to rev status or icon. I then checked the check box field in the document, and selected validate all. The icon now shows signature with triangle containing exclamation mark, with comments regarding unsigned changes since last signature etc. There are also two entries under Rev 1 in the signature panel, the first labelled 'Annotations' which describes the text box, and the second labelled 'Form Fields Filled In' which describes the checking of the check box. In my mind, the 'Annotation' entry should have showed up (along with an icon change to show unsigned changes since last signature) when I selected validate all after adding the text box originally.
    I am happy to email the document to you if you're able to provide an address.
    Regards,
    David.

  • Certificate signature validation failed

    Hi!
    I'm getting nuts over how to get Acitve Directory to work with java.
    I have a root-certificate for the domain (supposed to work for everything according to our networking expert) but when using it I get: "Certificate signature validation failed".
    When looking in C:\ on the ADS I find another certificate but then my javaprogram says: "No trusted certificate found".
    So, now after much searching where I seems to find everything but what I'm looking for I have to ask: What should I be looking for? Hopefully when looking for the right thing I will find the answers. :-)
    Thanks you very much in advance
    Roland Carlsson

    Please! Anyone? How can I get a correct certificate from our ADS? The certificate-server on is on our Exchange-server. I have a certificate that is supposed to work all over the domain and I have check several other certificate that I found on our servers but I still havn't found anything that works.
    I'd would really like to get some ideas about where how to find the working one.
    Thanks in advance
    Roland

  • Signature Validation Failed

    Hi,
    While performing cross domain SSO using SAML2.0 between the Oracel Identity Federation(IdP) and Novell Access Manager(SP). The connection between the both is in open mode and havent enabled SSO between the two. In the Idp end and the SP end, metadata of the other end is imported successfully.
    Artifact is send from the Idp to the SP and simillarly SP sends the ArtifactResolve SAML message to the Idp. From the Idp end, the ArtifactResponse Message is also send to the SP end.
    When the SP receive the Assertion in ArifactResponse message, "Signature Validation Failed" message is thrown by the SP side. Customer is signing the assertion in the Idp side. Also the signing certificate of the Idp is place in the trusted certificate store of the SP side. Also, there isnt any error message in the idp side.
    Any help on this would be appreciated.
    Thanks in advance,
    Anisha

    Please! Anyone? How can I get a correct certificate from our ADS? The certificate-server on is on our Exchange-server. I have a certificate that is supposed to work all over the domain and I have check several other certificate that I found on our servers but I still havn't found anything that works.
    I'd would really like to get some ideas about where how to find the working one.
    Thanks in advance
    Roland

  • Can't get Verisign Signature validated in Acrobat

    For the past six monhts I have been unable to get my Verisign digital signature validated in Adobe Acrobat. Just today, I renewed my Verisign certificate for another year. I saved the certificate on my hard drive using a password to secure it. When I certifiy a my signature on a document, the resulting signature icon says "...persona not valid" and the icon in the upper left corner (the head and shoulders of a person) has a question mark on it.
    I am getting frustrated trying to figure out what's gone wrong. Any suggestions would be greatly appreciated.

    Hi Mike,
    In order for a signature to be valid one of the things that must occur is the person validating the signature (in this case you) trust's the signer, or one of the certificates in the signing chain. From the Signature Properties dialog (where you found the text) click on the Show Certificate button. On the left side of the Certificate Viewer dialog you can see the signing chain. At the least it includes your certificate, and if Acrobat could build the chain it will display each issuing certificate up to the self-signed root CA. It usually best if you select the top most certificate in the listbox. Once you highlight the top most certificate click on the Trust tab. Click the Add to Trusted Identities button and then click the OK button on the confirmation dialog, followed by the OK button on the Import Contact Settings dialog. Finally you can click the OK button on the Certificate Viewer dialog and then the Validate Signature on the Signature Properties dialog. At this point you should get a valid signature, but it all depends on whether or not Acrobat could get valid revocation information. Before we go down that path let's see what you get when you revalidate the signature.
    Steve

  • License signature validation error! with NodeManager

    Hi,
    I downloaded the WebLogic Server 6.1 eval from the BEA website and started up a
    NodeManager on the same machine as my
    Administration Console. I am trying to use
    it to start up difference servers on my test machine. For some reason when I try to start up any of my defined server instances I get:
    $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    Unable to start WebLogic Server !!
    WebLogic: license signature validation error!
    $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    If I manually startup the servers using the startManagedWebLogic.sh everything works.
    I'm running on Solaris 8.
    What could I be doing wrong? Does the eval license not cover this scenario?
    Thanks,
    Andrea Rosso

    Hi.
    If you aren't already doing so I suggest downloading and using WLS with service pack 2. If you are then please open a case with support.
    Thanks,
    Michael
    Andrea Rosso wrote:
    Hi,
    I downloaded the WebLogic Server 6.1 eval from the BEA website and started up a
    NodeManager on the same machine as my
    Administration Console. I am trying to use
    it to start up difference servers on my test machine. For some reason when I try to start up any of my defined server instances I get:
    $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    Unable to start WebLogic Server !!
    WebLogic: license signature validation error!
    $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    If I manually startup the servers using the startManagedWebLogic.sh everything works.
    I'm running on Solaris 8.
    What could I be doing wrong? Does the eval license not cover this scenario?
    Thanks,
    Andrea Rosso--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • License signature validation error!

    After installing (solaris 8) I tried to start the examples server and first it could not find java_home (/opt/bea/java13 - I guess the install created teh java13 directory but nothing is installed?). I manually configured java_home=/usr/java1.2 and then tried again.
    Now after using the system password created during installation I get:
    $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    Unable to start WebLogic Server !!
    WebLogic: license signature validation error!
    $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    explain?
    Dave

    JDK 1.2 is a bad choice. I have not seen directories called "java13".
    Where, oh where, was my WLS installed?
    $ cat $HOME/bea/beahomelist
    Which version of WLS are you using?
    Your JDK is most likely parallel to wlserver6.1 (?) in jdk131/jre/bin .
    Happy Hunting,
    Wayne Scott
    dave robern wrote:
    > After installing (solaris 8) I tried to start the examples server and first
    > it could not find java_home (/opt/bea/java13 - I guess the install created
    > teh java13 directory but nothing is installed?). I manually configured
    > java_home=/usr/java1.2 and then tried again.
    >
    > Now after using the system password created during installation I get:
    >
    > $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    >
    > Unable to start WebLogic Server !! WebLogic: license signature validation
    > error!
    >
    > $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    >
    > explain?
    >
    > Dave

  • Clustered JMS: license signature validation error

    I have encountered the following error when I tried to send JMS message to a queue. Can anyone help to point out what license has been expired and where is it located? Please help
              weblogic.jms.common.InvalidDestinationException: Error creating producer: License exception prevents access to destination ImportFileQueue
              weblogic.jms.common.JMSException: Clustered JMS: license signature validation error!

    JDK 1.2 is a bad choice. I have not seen directories called "java13".
    Where, oh where, was my WLS installed?
    $ cat $HOME/bea/beahomelist
    Which version of WLS are you using?
    Your JDK is most likely parallel to wlserver6.1 (?) in jdk131/jre/bin .
    Happy Hunting,
    Wayne Scott
    dave robern wrote:
    > After installing (solaris 8) I tried to start the examples server and first
    > it could not find java_home (/opt/bea/java13 - I guess the install created
    > teh java13 directory but nothing is installed?). I manually configured
    > java_home=/usr/java1.2 and then tried again.
    >
    > Now after using the system password created during installation I get:
    >
    > $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    >
    > Unable to start WebLogic Server !! WebLogic: license signature validation
    > error!
    >
    > $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
    >
    > explain?
    >
    > Dave

  • JDriver/MSSQLServer4: License signature validation error

    I have a valid WLS license. When I try to make a jdbc connection(MSSQL7). I got
    the following exception sometime.
    java.sql.SQLException: $$$$$$$$$$$$$$License Exception $$$$$$$
    jDriver/MSSQLServer4:license signature validation errot!
    $$$$$$$$$$$$$$$$ License Exception $$$$$$$$
    Does anyone has any idea about this problem ?
    Thanks,
    Taohe

    How did you obtain the license? Is it the eval license? Of all things the license
    signature could have been corrupted or you are using license of one version
    with a server of another version.
    Shiva.
    taohe wrote:
    I have a valid WLS license. When I try to make a jdbc connection(MSSQL7). I got
    the following exception sometime.
    java.sql.SQLException: $$$$$$$$$$$$$$License Exception $$$$$$$
    jDriver/MSSQLServer4:license signature validation errot!
    $$$$$$$$$$$$$$$$ License Exception $$$$$$$$
    Does anyone has any idea about this problem ?
    Thanks,
    Taohe

  • How do I control the certificate chain construction performed by Acrobat Reader during digital signature validation?

    I work in the federal government where there are many certificate authorities and cross certified certificate authorities. Acrobat Reader is building hundreds of certificate chains in attempting to find a trusted root for the signers certificate. It is taking 4 minutes to validate the signature!
    The image is the 15th screen shot showing three chains per screen shot. The window elevator has barely moved!

    I am now using Adobe Acrobat Reader 11. Signature validation is much better! Perhaps 10 seconds. The only issue I see that the detail pages have misleading messages. The Signature Properties window has no complaints about the signature but the Show Signer's Certificate page still complains about not valid trust anchor.

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • How do I do validation using SDK.

    How do I do validation using SDK.
    We have created different warehouses for the client business operations.
    For eg:
    1. Inspection Stores
    2. Rejection Stores
    3. Main Stores
    In Goods Return & A/P Credit Memo, other than RejectionStores is
    selected, we want to generate a warning message.
    How do I do this through SDK.
    I need the code sample for the following activity:
    1. Reading the data available at each row of the current form (Goods
    Return/ A/P Credit memo)
    2. Validate the data with a paricular warehouse
    3. Generate warning message.
    I could not find any samples related to this.

    There is a method called MessageBox for the Application object. Have a look at
    the documentation, everything is there.

Maybe you are looking for