Answer the question
In order to leave comments, you need to log in
Why doesn't Spring see the jsp?
Hello.
Need help.
In my project, the context is written entirely in java classes. web.xml is also missing, since an initializer class has been made. When deploying the application, I see that it works, and when accessed by a certain URL, it enters the desired controller. Checked with debug. But there is one problem. I am not getting jsp pages.
Registered InternalResourceViewResolver as expected. Suffixes and prefixes - everything is there. But it stubbornly does not pick up jsp.
Tell me please. A bunch already rummaged through everything. Here is the hierarchy and classes:
Please tell me where to look. Because I won't put my mind to it.
Answer the question
In order to leave comments, you need to log in
The issue was resolved.
Left ComponentScan only above the main context and changed the ApplicationInitializer (web.xml as a java class). Changed its implementation by inheriting from another class.
tomcat? I usually add the following to web.xml:
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>/WEB-INF/view/*</url-pattern>
</servlet-mapping>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question