我正在使用Tomcat 6来运行用Java编写的支付脚本。这涉及运行基本.jsp
文件并导入一些.class
文件,然后将用户重定向到付款平台。容易。
问题是..试试我可能,我只是无法让导入位工作(或者看起来似乎)。
目录结构(参考目录= /usr/share/tomcat6/webapps/benefit/
):
/index.jsp
/WEB-INF/classes/com/aciworldwide/commerce/gateway/plugins/e24PaymentPipe.class
...
我的 index.jsp 文件如下所示:
<%@ page import="com.aciworldwide.commerce.gateway.plugins.*" %>
<%
try {
/*
* Request the transaction details first so that the payment can be tracked
*/
String paymentid=request.getParameter("pid");
String amount=request.getParameter("amount");
String manual=request.getParameter("manual");
e24PaymentPipe pipe = new e24PaymentPipe();
pipe.setResourcePath("/var/lib/tomcat6/webapps/");
// ... stuff
} catch (Exception e) {
//Report the error using the appropriate name and ID.
e.printStackTrace();
}
%>
这是我在尝试运行时遇到的错误:
An error occurred at line: 12 in the jsp file: /index.jsp
e24PaymentPipe cannot be resolved to a type
9: String amount=request.getParameter("amount");
10: String manual=request.getParameter("manual");
11:
12: e24PaymentPipe pipe = new e24PaymentPipe();
13: pipe.setResourcePath("/usr/share/tomcat6/webapps/");
14: pipe.setAction("4");
15: pipe.setCurrency("048");
编辑:如果您想查看文件权限,我已将其粘贴here。