I recently got some files from a vendor and the code is inform of an eclipse project. I opened the project in eclipse and the code executes expected. This is project screenshot:
I now want to use the project in my jsp web page. Basically i want to receive post values from my users using the url http://localhost:8080/post.jsp
In the eclipse project, this is where my code is getting executed and getting the response
package pdslipay;
public class ATestClass {
public static void main(String[] args) {
RequestsManager req = new RequestsManager();
try {
req.payBillPrePaid("88559966", "0", "OZONE", "00001");
} catch (Exception e) {
e.printStackTrace();
}
}
}
I want to integrate the code above and be able to call
<%
RequestsManager req = new RequestsManager();
out.println("Get Response " + req.payBillPrePaid("88559966", "0", "OZONE", "00001"));
%>
How do i use my eclipse code in jsp keeping in mind that my main class utlises package pdslipay;
P.s - I have not done something like this before and i am not a java expert.
Thanks.