JBoss AS7.1.1.Final with Spring 3.1.0
Spring Roo によって生成された Spring MVC フレームワークを使用しています。
リダイレクト URL に問題があります。
次のリダイレクト コードは Roo によって生成され、AspectJ ファイルに存在します。これは、「作成」ページでのデータの保存が完了した後に「表示」ページにリダイレクトする例です。
@RequestMapping(method = RequestMethod.POST)
public String RequestorController.create(@Valid Requestor requestor, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("requestor", requestor);
addDateTimeFormatPatterns(uiModel);
return "requestors/create";
}
uiModel.asMap().clear();
requestor.persist();
return "redirect:/requestors/" + encodeUrlPathSegment(requestor.getId().toString(), httpServletRequest);
}
JBoss AS7 の standalone.xml コネクタの設定は次のとおりです。
<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp"/>
--> The URL Spring created was: ajp://servername/context/path
次にこれを試しました:
<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" scheme="https">
--> The URL Spring created was: https://servername:80/context/path (Notice how the :80 is appended. So this was ALMOST RIGHT.)
もう一度試して、リダイレクト ポートを 443 として追加しました…</p>
<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" scheme="https" redirect-port="443">
--> Generated same thing, https://servername:80/context/path
その :80 が追加されるとどうなりますか?
注: JBoss 4 および 5 では、Tomcat コネクタに基づいているため、これは正常に機能しました。