I am integrating ccAvenue payment gateway in spring mvc project where I add following 3 files 1. dataForm.html 2. ccavRequestHandler.jsp 3. ccavResponseHandler.jsp
I have pay button in my project when I click on pay button then it redirects to dataForm.html page after filling all detail's I click checkout button then it redirects to ccavRequestHandler.jsp page where I got following error
HTTP Status 500 - Unable to compile class for JSP:
type Exception report
message Unable to compile class for JSP:
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 25 in the jsp file: /ccavRequestHandler.jsp
AesCryptUtil cannot be resolved to a type
22: pvalue = request.getParameter(pname);
23: ccaRequest = ccaRequest + pname + "=" + URLEncoder.encode(pvalue,"UTF-8") + "&";
24: }
25: AesCryptUtil aesUtil=new AesCryptUtil(workingKey);
26: String encRequest = aesUtil.encrypt(ccaRequest);
27: %>
28:
An error occurred at line: 25 in the jsp file: /ccavRequestHandler.jsp
AesCryptUtil cannot be resolved to a type
22: pvalue = request.getParameter(pname);
23: ccaRequest = ccaRequest + pname + "=" + URLEncoder.encode(pvalue,"UTF-8") + "&";
24: }
25: AesCryptUtil aesUtil=new AesCryptUtil(workingKey);
26: String encRequest = aesUtil.encrypt(ccaRequest);
27: %>
28:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.54 logs.
My ccavRequestHandler.jsp file :
<%@page import="java.net.URLEncoder"%>
<%
/*
This is the sample Checkout Page JSP script. It can be directly used for integration with CCAvenue if your application is developed in JSP. You need to simply change the variables to match your variables as well as insert routines (if any) for handling a successful or unsuccessful transaction.
*/
%>
<%@ page import = "java.io.*,java.util.*,com.ccavenue.security.*" %>
<html>
<head>
<title>Sub-merchant checkout page</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<%
String accessCode= ""; //Put in the Access Code in quotes provided by CCAVENUES.
String workingKey = ""; //Put in the 32 Bit Working Key provided by CCAVENUES.
Enumeration enumeration=request.getParameterNames();
String ccaRequest="", pname="", pvalue="";
while(enumeration.hasMoreElements()) {
pname = ""+enumeration.nextElement();
pvalue = request.getParameter(pname);
ccaRequest = ccaRequest + pname + "=" + URLEncoder.encode(pvalue,"UTF-8") + "&";
}
AesCryptUtil aesUtil=new AesCryptUtil(workingKey);
String encRequest = aesUtil.encrypt(ccaRequest);
%>
<form id="nonseamless" method="post" name="redirect" action="https://secure.ccavenue.com/transaction.do?command=initiateTransaction"/>
<input type="hidden" id="encRequest" name="encRequest" value="<%= encRequest %>">
<input type="hidden" name="access_code" id="access_code" value="<%= accessCode %>">
<script language='javascript'>document.redirect.submit();</script>
</form>
</body>
</html>