How can I create a URL based on controller and action method in Spring MVC?

后端 未结 4 1526
情歌与酒
情歌与酒 2020-12-17 17:38

I am using Spring MVC 3.0

I have a guestbook.jsp page where I want to create a link that points to GuestBookController\'s login method.

This is a simple task

4条回答
  •  春和景丽
    2020-12-17 17:53

    Spring MVC uses the standard JSTL tags in JSPs so:

    
    Guest Book
    

    In your controller:

    @RequestMapping(value = "/guestBook")
    public String handleGuestBook() { ... }
    

提交回复
热议问题