私の JSF アプリケーションでは、Web フィルターを実装して、使用されているデバイスの関数で要求されたビューを変更したいと考えています (Spring-Mobile デバイス リゾルバーを使用しています)。
フィルターにこれがあります:
String requestURI = request.getRequestURI();
Device device = DeviceUtils.getCurrentDevice(request);
if (!requestURI.contains("/mobile") && device.isMobile()) {
String newUri = requestURI.replace("/contextroot/faces/html/", "/contextroot/faces/html/mobile/");
request.getRequestDispatcher(newUri).forward(request, response);
}
else {
filterChain.doFilter(request, response);
}
しかし、私は例外を取得します
/contextroot/faces/html/mobile/consult/consult.xhtml Not Found in ExternalContext as a Resource
私は何を間違っていますか?