-1

I am developing an application with Spring MVC, What is the best way to serve the Static pages (fow which I don't need a Model and Controller). Since All the request go to dispatcher servlet first.

I understand that following tag will help to get my resources js,css and images from the resource directory.

<mvc:resources mapping="resources/**" location="resources/" />

But what if I have pages for eg (registration.jsp) that does not need a controller. Do I need to map every page using mvc:resources tag. If yes, will it be able to handle my tiles configuration?

Tushar
  • 1,166
  • 4
  • 14
  • 31
  • 1
    possible duplicate of [Spring MVC 3 and handling static content - am I missing something?](http://stackoverflow.com/questions/1483063/spring-mvc-3-and-handling-static-content-am-i-missing-something) – Alex Barnes Nov 08 '13 at 19:38
  • @Alex, I understand your point, can you please refer to the updated question? – Tushar Nov 09 '13 at 07:40

1 Answers1

0

Static pages can be served same as the static resources

Keep your pages in some folder (say pages) under WEB-INF. and have this line in your dispatcher servlet

<mvc:resources mapping="pages/**" location="pages/" />
Tushar
  • 1,166
  • 4
  • 14
  • 31