{"id":1673,"date":"2016-09-21T07:47:37","date_gmt":"2016-09-21T07:47:37","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=1673"},"modified":"2016-09-21T07:47:37","modified_gmt":"2016-09-21T07:47:37","slug":"adding-resources-to-jsp-spring-sp1","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/adding-resources-to-jsp-spring-sp1\/","title":{"rendered":"Adding resources to JSP Spring (sp1)"},"content":{"rendered":"<p><strong>dispatcher-servlet.xml<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n &lt;mvc:resources location=&quot;\/resources\/&quot; mapping=&quot;\/resources\/**&quot;&gt;&lt;\/mvc:resources&gt;\r\n<\/pre>\n<p><strong>HomeController.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npackage com.mugil.controls;\r\n\r\nimport org.springframework.stereotype.Controller;\r\nimport org.springframework.web.bind.annotation.RequestMapping;\r\nimport org.springframework.web.bind.annotation.ResponseBody;\r\n\r\n@Controller\r\npublic class HomeController {\t\r\n\t@RequestMapping(&quot;\/home&quot;)\t\r\n\tpublic String testMethod()\r\n\t{\r\n\t\treturn &quot;home&quot;;\r\n\t}\r\n}\r\n<\/pre>\n<p><strong>style.css<\/strong><\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\nh1\r\n{\r\n  color : red;\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>dispatcher-servlet.xml &lt;mvc:resources location=&quot;\/resources\/&quot; mapping=&quot;\/resources\/**&quot;&gt;&lt;\/mvc:resources&gt; HomeController.java package com.mugil.controls; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class HomeController { @RequestMapping(&quot;\/home&quot;) public String testMethod() { return &quot;home&quot;; } } style.css h1 { color : red; }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[199],"tags":[],"class_list":["post-1673","post","type-post","status-publish","format-standard","hentry","category-resources"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=1673"}],"version-history":[{"count":1,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1673\/revisions"}],"predecessor-version":[{"id":1674,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1673\/revisions\/1674"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=1673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=1673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=1673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}