开发者

Spring MVC and URL generation to a specific controller

开发者 https://www.devze.com 2023-01-31 03:16 出处:网络
Well let me try to explain what I need: once upon a time I have been contracted by a company to work for six months. The company was using an internal MVC framework, which was really outdated and bloa

Well let me try to explain what I need: once upon a time I have been contracted by a company to work for six months. The company was using an internal MVC framework, which was really outdated and bloated. Anyway I miss one great thing about it. It had JSP tags that you would fill with a controller name (as configured in xml files) and the "Action" (yeah was struts开发者_JS百科 based), so that the resulting URL would be correctly pointing there (and I didn't have to worry about writing it by hand).

I was wondering if there is something similar in Spring MVC? It would be great


With spring-mvc - no. But grails, which is built ontop of spring-mvc, has this exact functionality:

<g:createLink controller="yourController" action="yourAction" />
0

精彩评论

暂无评论...
验证码 换一张
取 消