不知道为什么这个(来自 SomeActionBean.java 的附加方法)在 Google 应用引擎上不起作用?Localy 一切运行完美。知道在哪里寻找解决方案吗?
/**
* @return Page to display, filled with correct data
*/
@DefaultHandler
public Resolution welcome() {
Resolution fd = new ForwardResolution(VIEW);
HttpServletRequest request = this.ctx.getRequest();
if(request.getMethod() == "POST") {
String content = getRequestContent(request);
updateData(content);
}else if (request.getMethod() == "GET"){
String ct = request.getContentType();
if(("application/json").equals(ct))
try {
getNotesJson(); //fill returnJson global variable
fd = new JSONResolution(returnJson);
//TODO Spread to other entities
} catch (JSONException e) {
e.printStackTrace();
}
}
return fd;
}