更新时间:2023-12-04 14:19:22
在您的servlet中,在do[Get,Post]()
方法中执行以下操作
In your servlet, do the following in the do[Get,Post]()
method
JSONObject jsonObject = JSONObject.fromObject( request.getQueryString() );
String username= jsonObject.get( "username" );
String password= jsonObject.get( "password" );
String type= jsonObject.get( "type" );
您还需要从JS中删除以下行.
You also need the remove the following line from your JS.
request = JSON.parse(data);