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'

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.