on 11-15-2011 7:25 AM
Hi Experts,
I had downloaded common validator from http://www.java2s.com/Code/Jar/ABC/Downloadcommonsvalidator131jar.htm and imported to my project library.
private boolean ValidateUrl(){
IWDMessageManager manager = wdComponentAPI.getMessageManager();
UrlValidator urlValidator = new UrlValidator();
boolean urlOK;
//valid URL
if (urlValidator.isValid("http://www.mkyong.com")) {
manager.reportSuccess("url is valid");
urlOK = true;
} else {
manager.reportException("url is invalid", true);
urlOK = false;
}
return urlOK;
}
However at runtime, i get the error:
The initial exception that caused the request to fail, was:
java.lang.NoClassDefFoundError: org/apache/commons/validator/UrlValidator
at com.emi.AddNewItemView.ValidateUrl(AddNewItemView.java:878)
What could it be the cause of error? Is the common validator supported by SAP NetWeaver?
Thanks & Regards,
Lai
Hi,
It's best practice to store external jars in an External Library which can be referenced in your Web Dynpro application.
See http://help.sap.com/saphelp_nw70/helpdata/en/5a/2e2f4234135433e10000000a155106/frameset.htm for more info
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Did you imported files into lib folder under project folder and added jars from project settings?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.