0
我得到一個錯誤得到錯誤在JSP作爲 - 令牌語法錯誤「‘刪除此令牌
語法令牌錯誤’,」刪除此令牌
排隊編號4後的參數。
<%@ page import="java.util.*" %>
<%@ page import="java.security.*" %>
<%!
public boolean verifyChecksum(params, checksumReceived_from_Payu)
{
String hashSequence = "udf10|udf9|udf8|udf7|udf6|udf5|udf4|udf3|udf2|udf1|email|firstname|productinfo|amount|txnid";
String[] hashVarSeq=hashSequence.split("\\|");
String hashString="";
String hash="";
String merchant_key="";
String salt="";
hashString=hashString.concat(salt);
hashString=hashString.concat("|");
hashString=hashString.concat(params.get(status));
hashString=hashString.concat("|");
for(String part : hashVarSeq)
{
hashString= (empty(params.get(part)))?hashString.concat(""):hashString.concat(params.get(part));
hashString=hashString.concat("|");
}
hashString=hashString.concat(merchant_key);
hash=hashCal("SHA-512",hashString);
if(hash.equals(checksumReceived_from_Payu))
return true;
else
return false;
}
}
%>
我已更新我的代碼。但仍然存在錯誤。我錯過了什麼?
非常感謝你的時間。我試過你的解決方案,但仍面臨同樣的問題。我用最新的代碼更新了我的問題。 – sudarsan
只需停止在JSP中添加Java代碼即可。將Java代碼放在它所屬的Java類中。您尚未在方法的參數中添加任何類型。 –
應該定義變量'status'。 –