{"id":75,"date":"2016-10-29T02:36:02","date_gmt":"2016-10-29T02:36:02","guid":{"rendered":"http:\/\/codeinsightacademy.com\/cprogramming\/?p=75"},"modified":"2017-05-13T06:25:45","modified_gmt":"2017-05-13T06:25:45","slug":"spring-web-mvc-hello-world","status":"publish","type":"post","link":"https:\/\/codeinsightacademy.com\/blog\/java\/spring-web-mvc-hello-world\/","title":{"rendered":"Spring Web MVC Hello World"},"content":{"rendered":"<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/bR2r3AhBBhs\" width=\"750\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>Git Clone Link:\u00a0https:\/\/gitlab.com\/shaileshsonare\/spring_helloworld.git<\/p>\n<p>Step 1. Create new Project<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/1_chose_project-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-291 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/1_chose_project-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/1_chose_project-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/1_chose_project-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/1_chose_project-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Step 2. Name the Project and select location<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/2_name_location_project-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-292 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/2_name_location_project-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/2_name_location_project-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/2_name_location_project-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/2_name_location_project-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Step 3. Select Server and Settings<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/3_server_and_settings-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-293 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/3_server_and_settings-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/3_server_and_settings-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/3_server_and_settings-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/3_server_and_settings-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Step 4. Select Framework to include in Project&#8217;s library and include JSTL (Java Server Pages Tag Library)<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/4_framework_and_jstl-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-294 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/4_framework_and_jstl-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/4_framework_and_jstl-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/4_framework_and_jstl-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/4_framework_and_jstl-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Step 5. Project Created Successfully<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/5_dispatcher_servlet-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-295 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/5_dispatcher_servlet-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/5_dispatcher_servlet-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/5_dispatcher_servlet-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/5_dispatcher_servlet-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Step 6. Check Welcome file. This file will display on browser if we enter only Project name in url.<\/p>\n<p>e.g. http:\/\/localhost:8080\/ProjectName\/<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/6_welcome_page-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-296 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/6_welcome_page-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/6_welcome_page-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/6_welcome_page-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/6_welcome_page-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Step 7. This section will decide which url pattern will be consider as Spring Requests and which url is not a part of Spring Framework.<\/p>\n<p>Here all *.htm (URL ending with .htm from browser) will be consider as Spring request.<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/7_spring_url_request-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-297 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/7_spring_url_request-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/7_spring_url_request-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/7_spring_url_request-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/7_spring_url_request-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Step 8. You can run normal jsp pages also from browser which will not be part of Spring framework.<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/8_jsp_request-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-298 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/8_jsp_request-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/8_jsp_request-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/8_jsp_request-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/8_jsp_request-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Step 9. Create new jsp file as<\/p>\n<p>Right Click on WebPages &gt;&gt; New &gt;&gt; Jsp File<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/9_hello_jsp-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-299 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/9_hello_jsp-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/9_hello_jsp-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/9_hello_jsp-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/9_hello_jsp-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Step 10. Run on Browser it will run as old traditional jsp project file.<\/p>\n<p><a href=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/10_hello_jsp_working-1024x819.png\"><img loading=\"lazy\" class=\"alignnone wp-image-300 size-full\" src=\"http:\/\/www.codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/10_hello_jsp_working-1024x819.png\" alt=\"\" width=\"1024\" height=\"819\" srcset=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/10_hello_jsp_working-1024x819.png 1024w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/10_hello_jsp_working-1024x819-300x240.png 300w, https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2016\/10\/10_hello_jsp_working-1024x819-768x614.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Git Clone Link:\u00a0https:\/\/gitlab.com\/shaileshsonare\/spring_helloworld.git Step 1. Create new Project Step 2. Name the Project and select location &nbsp; Step 3. Select Server and Settings &nbsp; Step 4. Select Framework to include in Project&#8217;s library and include JSTL (Java Server Pages Tag Library) &nbsp; Step 5. Project Created Successfully Step 6. Check Welcome file. This file [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/75"}],"collection":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":14,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":302,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions\/302"}],"wp:attachment":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}