The problem is that when you open the page opens the explorer to download it, the problem appeared unexpectedly and rolling back to the old point did not help web.xml

<context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/config/application-context.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/config/mvc-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 

mvc-config.xml:

 <mvc:annotation-driven/> <context:annotation-config/> <context:component-scan base-package="project.controller"/> <mvc:resources mapping="/resources/**" location="/resources/"/> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> </bean> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="defaultEncoding" value="UTF-8"/> <property name="maxUploadSize" value="1000000"/> </bean> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver"> <property name="defaultLocale" value="en" /> </bean> <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basename" value="WEB-INF/il8n/messages"/> <property name="defaultEncoding" value="UTF-8"/> <property name="fallbackToSystemLocale" value="false"/> </bean> <mvc:interceptors> <mvc:interceptor> <mvc:mapping path="/*"/> <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> <property name="paramName" value="locale"/> <!--?locale=en для смены локали--> </bean> </mvc:interceptor> </mvc:interceptors> 

The page itself that previously opened and in the IDE everything that is in the style attribute has become gray and the idea does not perceive it. Login page

 <style> .form-width {max-width: 25rem;} .has-float-label { position: relative; } .has-float-label label { position: absolute; left: 0; top: 0; cursor: name; font-size: 75%; opacity: 1; -webkit-transition: all .2s; transition: all .2s; top: -.5em; left: 0.75rem; z-index: 3; line-height: 1; padding: 0 1px; } .has-float-label label::after { content: " "; display: block; position: absolute; background: white; height: 2px; top: 50%; left: -.2em; right: -.2em; z-index: -1; } .has-float-label .form-control::-webkit-input-placeholder { opacity: 1; -webkit-transition: all .2s; transition: all .2s; } .has-float-label .form-control:placeholder-shown:not(:focus)::-webkit-input-placeholder { opacity: 0; } .has-float-label .form-control:placeholder-shown:not(:focus) + label { font-size: 150%; opacity: .5; top: .3em; } .input-group .has-float-label { display: table-cell; } .input-group .has-float-label .form-control { border-radius: 0.25rem; } .input-group .has-float-label:not(:last-child) .form-control { border-bottom-right-radius: 0; border-top-right-radius: 0; } .input-group .has-float-label:not(:first-child) .form-control { border-bottom-left-radius: 0; border-top-left-radius: 0; margin-left: -1px; } </style> </head> <body> <div class="px-1 py-3"> <form method="post" action="<c:url value="/login"/>" class="card card-block mx-auto bg-faded form-width"> <legend class="mb-1 name-xs-center">Login in</legend> <span>${message}</span> <div class="form-group has-float-label"> <input id="login" name="login" type="name" placeholder="Login" class="form-control"/> <label for="login">Login</label> </div> <div class="form-group has-float-label"> <input id="password" name="password" type="password" class="form-control" placeholder="Password"/> <label for="password">Password</label> </div> <span>${error}</span> <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/> <div class="name-xs-center"> <button class="btn btn-block btn-primary" type="submit">Log In</button> </div> <h4 class="name-center"><a href="<c:url value="/registration"/>">Create new account</a></h4> </form> </div> </body> 
  • Maybe not enough headline? - Olexiy Morenets
  • @ OleksiyMorenets everything is there, it’s just to spread a full page - Andrey
  • Try specifying class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="jspViewResolver" - user320999
  • @SpringNewbie did not help - Andrey

0