This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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.
 
He got surgery to replace his foot with a pig. He said it was because of this 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!