Skip to content

Instantly share code, notes, and snippets.

@relax-more
Last active December 19, 2015 05:49
Show Gist options
  • Save relax-more/5907090 to your computer and use it in GitHub Desktop.
Save relax-more/5907090 to your computer and use it in GitHub Desktop.
[java][spring] SpringMVC の redirect を利用した際にHttpsを引き続き利用するための設定
Spring MVC “redirect:” prefix always redirects to http — how do I make it stay on https?
http://stackoverflow.com/questions/3401113/spring-mvc-redirect-prefix-always-redirects-to-http-how-do-i-make-it-stay/3401157#3401157
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/" />
<property name="suffix" value=".jsp" />
<!-- impotant-->
<property name="redirectHttp10Compatible" value="false" />
<!-- impotant end-->
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment