Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <blc:form th:action="@{/search}" th:object="${searchForm}" method="POST">
  2. <input type="search" class="search" name="q" th:value="${originalQuery}" />
  3. <span th:if="${#fields.hasErrors('searchText')}" th:errors="*{searchText}">dddd</span>
  4. <input type="submit" id="search_button" value="go" />
  5. </blc:form>
  6.  
  7. @Controller
  8. @RequestMapping("/search")
  9. public class SearchController extends Mysearchcontroller {
  10. @RequestMapping("")
  11. public String search(HttpServletRequest request, HttpServletResponse response,
  12. @RequestParam(required = false) String q,@ModelAttribute("mysearchForm") Mysearchform mysearchForm,BindingResult errors,Model model) throws ServletException, IOException, ServiceException {
  13. return search3(model, request,response, q ,errors);
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement