JSPs not displaying objects from model in Spring

后端 未结 3 2131
太阳男子
太阳男子 2020-12-07 01:42

I have what should be an easy issue to solve, but I\'m having no luck.

In my servlet-servlet.xml file, I have the following beans (in addition to others):

         


        
3条回答
  •  Happy的楠姐
    2020-12-07 02:08

    I ran into the same problem, and after comparing 2 similar apps (one with EL working fine and the other not), noticed that the problem on my tomcat 7 depended on the webapp version specified in the web.xml of the application.

    The same jsp using Web App 2.3 displays ${someMessage}. (BTW, this is what you get using maven archetype:generate with archetypeArtifactId=maven-archetype-webapp).

    
    
    
    ...
    

    The same jsp using Web App 2.4 displays the model object properly:

    
    
    ...
    

    Hope that it helps!

提交回复
热议问题