Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Spring MVC : {beanName.property} not working

 
Ranch Hand
Posts: 275
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
I have posted the same topic on Spring forum earlier, but did not get any response. Hence I am writing it here as well.

I am trying to complete step by step Spring MVC tutorial and am stuck at part 4 where business logic is referred from the Controller.

When I try to print the values present in the objects returned by the controller, the string

${beanName.property}

is displayed on the screen.

My jsp is :



and my controller :



The unit tests for all the beans and controller run successfully :
package test.springapp.web;



The aplication-servlet.xml follows :



Please guide me to a direction following which I can identify my mistake.
 
Aniruddh Joshi
Ranch Hand
Posts: 275
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tested my bean injections. I instantiated the bean "/hello.htm" and the injections are working:

The test follows :


and the values are present in the required beans.
Hence I suspect there's a problem with my jsp .
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not interpreting EL in your JSP pages. Check your WEB-INF/web.xml deployment descriptor - make sure it matches the correct specification to the web app container you are using. And make sure you're using a web app container that supports Servlet spec 2.4 or higher.
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!