アプリの絶対パスを取得したいのですが、以下のコードを使用しています。
String pathToSave = FacesContext.getCurrentInstance()
.getExternalContext().getRealPath("/");
結果は次のとおりです。
/home/ronaldo/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Odontonew/
しかし、私は次のようなものを待っています:/home/ronaldo/workspace/Odontonew/
なにが問題ですか ?