2013-04-08 93 views
0

我有一個像http://google.com這樣的字符串url。我需要從網址中刪除'http://'。我已經嘗試了方法.replace("http://",""),但它不起作用。如何替換jsp中的字符串

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 

回答