最近公司要添加支付银行,用的银联接口。
银行给的有DEMO,但是在测试提交订单的时候提示x-forward-for is null,数据提交不成功,各位给个思路啊。支付银联测试行业数据
银行给的有DEMO,但是在测试提交订单的时候提示x-forward-for is null,数据提交不成功,各位给个思路啊。支付银联测试行业数据
解决方案 »
- 高分!谁有传智播客11年或者12年的就业班视频啊
- 关于OPENJPA的问题.
- jsp中如何取spring3的注解@value中的值
- 为什么在struts2官方源码中没有ActionSupport
- 我猜我猜我猜猜猜
- 一个灵异的问题,取数据库中的数据打印在控制台会自动换行,求解。
- 打包问题
- 请问Turbine的action中怎样取得JSP中的pageContext啊?谢谢啦,问了很久的啊!
- 请教一个jsp小问题,谢谢大家了!!!!!!!!
- Jbuilder5.0中ejb deployment 为灰(不能用)的问题,论者有分。
- 为啥又会迷茫了?大家来说说吧。
- jsp里面table有行数据怎么上传给action 求高手指点!!!
没有,是JAVA开发的,公司生产环境是tomcat+nginx,银联给的DEMO应该不会强制负载均衡的吧?基本上稍微修改下就能运行,但是这个x-forward-for很头疼。
代码里有个getremoteaddress.jsp<%
String remoteIP; if(request.getHeader("X-Forwarded-For") == null){
System.out.println("X-Forwarded-For is null");
remoteIP = request.getRemoteAddr();
out.println(remoteIP);
}else {
System.out.println("X-Forwarded-For is not null");
remoteIP = request.getHeader("X-Forwarded-For");
}
%>有这部分代码。
代码里有个getremoteaddress.jsp<%
String remoteIP; if(request.getHeader("X-Forwarded-For") == null){
System.out.println("X-Forwarded-For is null");
remoteIP = request.getRemoteAddr();
out.println(remoteIP);
}else {
System.out.println("X-Forwarded-For is not null");
remoteIP = request.getHeader("X-Forwarded-For");
}
%>有这部分代码。然后createOrderServlet.java里也有
if(req.getHeader("X-Forwarded-For")==null){
System.out.println("X-Forward-For is null");
ClientIp=req.getRemoteAddr();
System.out.println(ClientIp);
}else{
System.out.println("X-Forwarded-For is not null");
ClientIp=req.getHeader("X-Forwarded-For");
这部分代码。