url_抜き出し

以下のソースが問題ありそうで引っかかったので(実際は問題なかった)
メモする。

String url = request.getServletRequestPath().substring(1);
帰ってくるパラメータに”/”が入ってくるので、”/”を消したいのだと思われる。

サーブレットパスの構成要素を取得する

“https://www.atmarkit.co.jp/ait/articles/0407/27/news105.html”

substring

“https://eng-entrance.com/java-string-substring”

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny