Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アプリケーションでアプリケーション パスを取得したいのですが、方法が見つかりません。アプリでアプリケーションパスを取得する方法を誰かが知っていれば、それは素晴らしいことです。
どうもありがとう、
アプリケーションの絶対パスを取得したい場合は、このように取得できます。
String applicationPath = request.getSession().getServletContext().getRealPath("")
アプリケーションの絶対パスを提供します。
これをコントローラーにコピーします
print webRequest.baseUrl