Replace VisionUnsHSBC.jsp

parent 630cca2e
......@@ -10,7 +10,7 @@ UserInfoBean userInfo = null;
String message = "";
try
{
String url = "/ibase/jsp/VisionUnsHSBC.jsp";
String url = "/ibase/webitm/jsp/VisionUnsHSBC.jsp";
userInfo = (UserInfoBean)session.getAttribute("USER_INFO");
BaseLogger.log("3",null,null,"In VisionUnsHSBC.jsp userInfo:["+userInfo+"]");
if( userInfo == null )
......@@ -27,6 +27,16 @@ try
%>
<%
String baseUrl = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();
String processPaymentServletURL = baseUrl + "/ibase/ScheduledSftpUploaderServlet";
BaseLogger.log("3", userInfo, null, "processPaymentServletURL [" + processPaymentServletURL + "]");
%>
<!DOCTYPE html>
<html>
<head>
......@@ -51,7 +61,7 @@ div {
.container {
max-width: 800px;
max-width: 800px;
margin: 0 auto;
padding: 20px;
display: flex;
......@@ -60,6 +70,7 @@ div {
align-items: center;
justify-content: center;
}
}
h1 {
......@@ -96,30 +107,37 @@ button:hover {
<!-- Add any necessary styles or scripts here -->
<script>
function scheduleSFTP()
{
// Create an XMLHttpRequest object
var xhttp = new XMLHttpRequest();
// Define the function to handle the response
xhttp.onreadystatechange = function()
{
if (this.readyState == 4 && this.status == 200) {
<script>
function scheduleSFTP() {
// Display "Generating..." message
document.getElementById("result").innerHTML = "Processing....";
// Create an XMLHttpRequest object
var xhttp = new XMLHttpRequest();
// Define the function to handle the response
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {
// Update the HTML content with the response
document.getElementById("result").innerHTML = this.responseText;
document.getElementById("result").innerHTML = "Processing complete: " + this.responseText;
} else {
// Handle errors or show an appropriate message
document.getElementById("result").innerHTML = "Error occurred during processing.";
}
};
// Open a POST request to the server-side servlet
xhttp.open("POST", "ScheduledSftpUploaderServlet", true);
// Set the Content-Type header for a POST request
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// You can add data to be sent with the request if needed
// For example, xhttp.send("param1=value1&param2=value2");
// Send the request
xhttp.send();
}
</script>
}
};
// Open a POST request to the server-side servlet
xhttp.open("POST", "<%= processPaymentServletURL %>", true);
// Set the Content-Type header for a POST request
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// You can add data to be sent with the request if needed
// For example, xhttp.send("param1=value1&param2=value2");
// Send the request
xhttp.send();
}
</script>
......@@ -127,7 +145,7 @@ button:hover {
<body>
<div class="container">
<h1>UNS-HSBC Integration</h1>
<h2>Schedule SFTP</h2>
<!-- Add a button that triggers the scheduleSFTP function on click -->
<button onclick="scheduleSFTP()">Process Payment</button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment