2
Google App Engineでこれ(SomeActionBean.javaの追加メソッド)が動作しない理由を知らないのですか? Localyは完璧に動作します。ソリューションを探す場所は何ですか? Stringは比較Stripes、GAE:他のメソッド処理(POST)を実装する方法
/**
* @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;
}
あなたが得るエラーは何ですか?:Javaの文字列はプリミティブではありません
ので、彼らはで比較すべき equalsメソッドをあなたはスタックトレースを投稿できますか? – Kdeveloper
ちょっと分かりました。そのifと==の問題は比較します。あなたが答えを書くなら、私はそれを受け入れるだろう、Kdeveloper、コメントのおかげで、 – Solata