Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  2. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <html>
  5. <head>
  6. <!-- authentication.jsp -->
  7. <!-- this works
  8. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
  9. integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
  10. crossorigin="anonymous"> -->
  11.  
  12. <!--this doesn't work-->
  13. <link href="<c:url value="/webapp/resources/styles/bootstrap.min.css"/>" rel="stylesheet" media="screen"/>
  14.  
  15. <title>Title</title>
  16. </head>
  17. <body>
  18. <!--................-->
  19. </body>
  20. </html>
  21.  
  22. @Configuration
  23. @EnableWebMvc
  24. @ComponentScan(basePackages = {"com.gtu.gtesting"})
  25. public class AppConfig extends WebMvcConfigurationSupport {
  26.  
  27. @Bean
  28. public InternalResourceViewResolver viewResolver(){
  29.  
  30. InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
  31.  
  32. viewResolver.setViewClass(JstlView.class);
  33. viewResolver.setPrefix("/WEB-INF/views/");
  34. viewResolver.setSuffix(".jsp");
  35.  
  36. return viewResolver;
  37. }
  38.  
  39. @Override
  40. protected void addResourceHandlers(ResourceHandlerRegistry registry) {
  41. registry.addResourceHandler("/resources/**")
  42. .addResourceLocations("/resources/");
  43. }
  44. }
  45.  
  46. <link href="resources/styles/bootstrap.min.css" rel="stylesheet"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement