Hi,
We're working with RSA IG&L 7.0.1.134339 P04.
We have a text field in a form that will be used to manually enter the name of a new account.
We need to validate said text field to make sure that the name of the new account does not already exist in Active Directory, in which case we'll alert the user so he/she can change the name accordingly until a new unique account name is found.
We tried to add the following code in the JSP Validation URI attribute of the text field:
<%@page contentType="text/html;charset=UTF-8" language="java"%>
<%@page import="com.aveksa.db.workflow.*"%>
<%
Utils myUtils = new Utils();
out.println(myUtils.getCurrentDate());
%>
This sample code is just a test to verify we can call a Java class within the JSP, so next we can create the appropriate method that will query the database, and the Active Directory server to search for the name of the account. The test class we're using was developed for a custom workflow, and the JAR is copied to the following path: /tmp/customizeACM/aveksa.war/WEB-INF/plug-ins/JavaNode/lib. The compiled classed are then extracted to this path: /tmp/customizeACM/aveksa.war/WEB-INF/plug-ins/JavaNode/classes/. So far we've worked successfully in our custom workflows with these classes.
When testing the form we're expecting to see the current date above the text field, but nothing happens, and the logs show the following error messages:
- Only a type can be imported. com.aveksa.db.workflow.Utils resolves to a package
- com.aveksa.db.workflow.Utils cannot be resolved to a type
Do you know how can we call a Java class within the JSP used for text field validation? Thank you for your help.
Regards,
Raul
P.S. We found the following answers and used them as guides in our development:
Form Level Validation Not working while linking Form to Button
Could you try placing the class file under WEB-INF and customize the ear (make sure the folder structure are correct as per package name used in the java class file) and redeploy again.
I have not tested though, but seems like the class file present in java node package cant be used in jsp.