-1

I have a jsp file, in which I need to use to methods of class Base64. one method is present in java.util :

java.util.Base64.getEncoder().encodeToString().

and another method is present in

    org.apache.commons.codec.binary package :
    org.apache.commons.codec.binary.Base64.encodeBase64String()

so to achieve this I used fully classified names but still it is givng error.

org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 59 in the jsp file: /ProcessDetails.jsp org.apache.commons.codec.binary.Base64 cannot be resolved to a type 56: String signature = java.util.Base64.getEncoder().encodeToString(sha256_HMAC.doF‌​inal(data.getBytes()‌​)); 59: String paymentToken = org.apache.commons.codec.binary.Base64.encodeBase64String(sh‌​a256_HMAC.doFinal(da‌​ta.getBytes()));

JimHawkins
  • 4,843
  • 8
  • 35
  • 55

1 Answers1

0

Sounds like you might be missing either the apache commons jar in your WEB-INF/lib see jsp "unable to compile" and "cannot be resolved to a type"

or perhaps a missing import statement in your JSP see Unable to compile class for JSP: cannot be resolved to a type

Hope that helps

Community
  • 1
  • 1
Stewart Evans
  • 1,416
  • 1
  • 12
  • 17