# SpringMVC Learning > ## Basic * 網頁匯入、重新導向、URL 處理標籤https://openhome.cc/Gossip/ServletJSP/ImportRedirectUrlTag.html * redirect vs. forward : https://blog.csdn.net/blueheart20/article/details/87935046 * ==在Spring中,redirect預設使用GET,forward預設使用POST,若是在Controller中沒有註明Requested method則預設使用GET== * ==window.location.href預設是用GET== * 傳值: * https://kknews.cc/zh-tw/code/q45kjyb.html * https://blog.csdn.net/yelllowcong/article/details/78526024 * How to include JS or CSS files in a JSP page : https://www.mkyong.com/spring-mvc/spring-mvc-how-to-include-js-or-css-files-in-a-jsp-page/ * **若失敗請看Debug:使用Defaule Handler** > ## CURD * REST: * https://www.viralpatel.net/spring-4-mvc-rest-example-json/ * http://websystique.com/springmvc/spring-4-mvc-rest-service-example-using-restcontroller/ * https://www.technicalkeeda.com/spring-tutorials/complete-spring-mvc-restful-web-services-example > ## Search * https://blog.csdn.net/u013360850/article/details/52672875 * https://blog.csdn.net/bryanmelody/article/details/66969023 * https://blog.csdn.net/hehuicong/article/details/40378217 * https://blog.csdn.net/qq_38263083/article/details/81944370 * https://blog.csdn.net/qq_31247177/article/details/7996641 * https://stackoverflow.com/questions/48092988/dynamic-sql-query-in-java extract data * https://blog.csdn.net/u013174217/article/details/61917721 * https://blog.csdn.net/ununie/article/details/98658227 * JAVA多語句查詢 * https://www.itread01.com/p/288875.html * https://www.itread01.com/p/288875.html * https://www.twblogs.net/a/5b8adc352b71775d1ce98b3a * https://kknews.cc/zh-tw/code/p292mm2.html > ## UploadFile * [ajax + display]https://www.itread01.com/content/1540956123.html * [ajax]https://www.itread01.com/content/1542306963.html * [display]https://www.itread01.com/content/1544765258.html * [success]https://www.itread01.com/content/1545343771.html * <驗證>https://dotblogs.com.tw/topcat/archive/2009/02/20/7250.aspx > ## 30 Days * https://ithelp.ithome.com.tw/users/20107812/ironman/1538?page=1 > ## Form * ==注意path的觀念!(command)==: https://www.iteye.com/blog/elim-1807330 * checkboxes and dropdown: https://www.yiibai.com/spring_mvc/springmvc_dropdown.html * get dropdown box value: ``` var age_max = document.getElementById("age_max"); var ageh_val = age_max.options[age_max.selectedIndex].value; ``` * get radio button value: ``` var gender_value = ""; var gender = document.getElementsByName("gender"); for (var i = 0; i < gender.length; i++) { if (gender[i].checked) { gender_value = gender[i].value; } } ``` > ## Log in * https://codertw.com/%E4%BC%BA%E6%9C%8D%E5%99%A8/170039/ > ## 小細節 ==* 如何在JSTL中接變數再傳給function:== 注意用' '接變數才吃得到值 ``` <c:forEach var="conditions" items="${list}"> <tr> <td>${conditions.name}</td> <td>${conditions.startTime}</td> <td>${conditions.endTime}</td> <td><a href="detailform/${conditions.serialNum}">查詢</a></td> <td><a href="editform/${conditions.serialNum}">編輯</a></td> <td><a href="#" onclick="doFirm('${conditions.serialNum}')">刪除</a></td> </tr> </c:forEach> <script> function doFirm(obj) { if (confirm("確定刪除嗎?")) { window.location.href = 'delete/'+obj; } }; </script> ``` ###### tags: `spring-mvc`