B
B
Boris Khripko2017-05-05 15:23:19
Java
Boris Khripko, 2017-05-05 15:23:19

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:
ef45405e58c54ca0b16b31153499b801.png

6ee5ea4ac07b44518c26190240038e95.png
fcefbe4359884af481e55b1c6119c9d9.png

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

2 answer(s)
B
Boris Khripko, 2017-05-10
@BariSovich

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.

E
Eugene Khrustalev, 2017-05-05
@eugenehr

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 question

Ask a Question

731 491 924 answers to any question