我有一个像http://google.com
. 我需要'http://'
从 URL 中删除。我已经尝试过该方法.replace("http://","")
,但它不起作用。
Web web = org.getWeb();
webUrl = web.getUrl();
out.println("webUrl :"+webUrl ); // here it prints:: http://google.com
webUrl.replace("http://","");
out.println("webUrl :"+webUrl ); // here also it prints:: http://google.com