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.
+を%2bに置き換える方法、一部の検索では+をスペースとして使用していますが、Javaサーブレットでは実行できません
org.apache.commons.lang.StringEscapeUtils.replaceEach(str, new String[]{"+", "=", ...}, new String[]{"%2b", "%3D", ...})
使用するjava.net.URLEncoder
java.net.URLEncoder
例:URLEncoder.encode( "one+two space", "UTF-8" )文字列を取得しますone%2Btwo+space
URLEncoder.encode( "one+two space", "UTF-8" )
one%2Btwo+space