iT邦幫忙

0

請問spring mvc,怎麼讓controller跳轉到我指定的網址頁面!

  • 分享至 

  • xImage

想請教各位!
查了很多資訊,但大部分寫法都是跳轉到其他jsp頁面。

但我是已知網址,想讓我的controller可以跳到我指定的網址的頁面,想請問該怎麼寫比較好!
我有查到這個感覺跟我最接近,但試了目前還沒成功!這種的資訊也最少
想請教各位><謝謝

https://ithelp.ithome.com.tw/upload/images/20230712/20160999CZFA0D8umA.png

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

0
win895564
iT邦新手 1 級 ‧ 2023-07-12 08:28:43
window.location.href = "http://srip.cpu.edu.cn/#/admins";
0
厚厚
iT邦新手 1 級 ‧ 2023-07-12 09:56:08

String url ="https://www.google.com/";
return "redirect:" + url;

zoeyyyy iT邦新手 5 級 ‧ 2023-07-12 23:42:31 檢舉

但我網址不固定 不能這樣寫><
我發現我這樣寫 他會一直寫說對這網址要request/images/emoticon/emoticon02.gif

我要發表回答

立即登入回答