Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page contentType="text/html;charset=UTF-8" language="java" %>
- <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <html>
- <head>
- <!-- authentication.jsp -->
- <!-- this works
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
- integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
- crossorigin="anonymous"> -->
- <!--this doesn't work-->
- <link href="<c:url value="/webapp/resources/styles/bootstrap.min.css"/>" rel="stylesheet" media="screen"/>
- <title>Title</title>
- </head>
- <body>
- <!--................-->
- </body>
- </html>
- @Configuration
- @EnableWebMvc
- @ComponentScan(basePackages = {"com.gtu.gtesting"})
- public class AppConfig extends WebMvcConfigurationSupport {
- @Bean
- public InternalResourceViewResolver viewResolver(){
- InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
- viewResolver.setViewClass(JstlView.class);
- viewResolver.setPrefix("/WEB-INF/views/");
- viewResolver.setSuffix(".jsp");
- return viewResolver;
- }
- @Override
- protected void addResourceHandlers(ResourceHandlerRegistry registry) {
- registry.addResourceHandler("/resources/**")
- .addResourceLocations("/resources/");
- }
- }
- <link href="resources/styles/bootstrap.min.css" rel="stylesheet"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement