Meu JSP não transoforma a instrução s:mvcUrl em html.
View:
<!-- TagLibs -->
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
<!DOCTYPE html>
<html>
<body>
<nav>
<ul>
<li><a href="${s:mvcUrl('AHC#HandleArticle').arg(0, Programacao de Computadores).build()}">Programacao de Computadores</a></li>
</ul>
</nav>
</body>
</html>
Controller:
package com.filipecanattodev.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.filipecanattodev.model.Discipline;
@Controller
public class ArticlesHandlerController {
@RequestMapping("/HandleArticle")
public ModelAndView HandleArticle(Discipline discipline){
ModelAndView view = new ModelAndView("ListOfArticles");
return view;
}
}
Configuração:
@EnableWebMvc
@ComponentScan(basePackageClasses = { HomeController.class })
public class AppWebConfiguration {
@Bean
public InternalResourceViewResolver InternalResourceViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
return
}
Ao acessar a view e clickar no link o browser exibe: HTTP Status 404 -The requested resource is not available.
Minha url fica suja da seguinte maneira: http://localhost:8080/mysistem/$%7Bs:mvcUrl('AHC#HandleArticle').arg(0, Programacao de Computadores).build()}