我在eclipse中写了一个javaweb项目,运行没有问题。传到了阿里云上之后,在其tomcat下运行,
登录时发现出现以下错误:
Failed to load resource: the server responded with a status of 500 ()
然后打开错误代码(jquery.min.js里的):
错的是这句:a.send(n.hasContent && n.data || null),
我的登录ajax:
$("#submitBtn").click(function(){
var data = $("#form").serialize();
$.ajax({
type: "post",
url: "LoginServlet?method=Login",
data: data,
dataType: "text", //返回数据类型
success: function(msg){
if("vcodeError" == msg){
$.messager.alert("消息提醒", "验证码错误!", "warning");
$("#vcodeImg").click();//切换验证码
$("input[name='vcode']").val("");//清空验证码输入框
} else if("loginError" == msg){
$.messager.alert("消息提醒", "用户名或密码错误!", "warning");
$("#vcodeImg").click();//切换验证码
$("input[name='vcode']").val("");//清空验证码输入框
} else if("loginSuccess" == msg){
window.location.href = "SystemServlet?method=toAdminView";
} else{
alert(msg);
}
}
});
});
项目在本地运行没有问题,项目是打包war然后加到服务器Tomcat里面去了,在服务器运行就这样了,DL们有没有什么好的解决办法。。
我在网上翻过相关资料,说是调用日期时日期分秒字段为空,我也没有调用日期啊 😭