2

i have some of the run time generated html files which are placed in the

/WEB-INF/Static folder

in my context file i have added the below view resolver

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
    <property name="prefix" value="/WEB-INF/static/"/>
    <property name="suffix" value=".html"/>
    <property name="order" value="0"></property>
</bean>

and other JSP are resolved by the tiles

But problem is when is give the name of the generated html file Dispatcher servlets gives Warning and view is not resolved

08:39:03,389  WARN PageNotFound:1110 - No mapping found for HTTP request with URI [/configserver/WEB-INF/static/page_1.html] in DispatcherServlet with name 'config'
chiranjeevigk
  • 1,636
  • 1
  • 23
  • 43

1 Answers1

4

i followed this post How to serve .html files with Spring

these are static content so added

<mvc:resources mapping="/static/**" location="/WEB-INF/static/" />

and i return the name of the file from the controller method

Community
  • 1
  • 1
chiranjeevigk
  • 1,636
  • 1
  • 23
  • 43