3
我有一個Spring Annonted Controller,用於捕獲表單中的信息並從數據庫中獲取搜索結果列表。Spring MVC(Spring 2.5)關於Post-Redirect的問題獲取
這裏是方法
@RequestMapping(method = RequestMethod.POST, params = {SUBMIT_BTN })
public ModelAndView processForm(@ModelAttribute(COMMAND_NAME){
// 1. Load search results using search parameters from form (Contained in a collection of some sort)
// 2. Create the ModelAndView
// 3. Redirect with RequestView or redirect: to generate a GET.
}
我想我需要重定向到重定向的定義:因爲我已經在會議上收集存放物品的清單。無法將其添加爲網址請求參數。
基本上我試圖防止問題後面的按鈕,它說,該網頁已過期。我想在字符串中實現PRG模式。
我很難把頭轉換成GET。我可以重定向還是需要兩種方法?感謝您的任何幫助,您可以提供。