• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What's wrong with the ModelDriven

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,
I have an issue that I cannot understand what is happening with that cocd



I cannot retrieve any attribute from the object Usuario unless I add a this method to my code



Have anybody before have this issue, plese help!!
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It may be helpful for you to post your jsp code as well (assuming you are using jsp).

If using getUsuario() is working, then it would appear that the problem may be the way you are referencing your object in your jsp.

My guess is that you have something like this in your jsp:



This would work with getUsuario(), but this will not work with getModel(). The reason is that the model object is placed on the top of the ValueStack. So to reference it in your jsp, you would do this:



As a side note, you really shouldn't access the request in the manner that you are using. Instead, you should have your action implement the ServletRequestAware interface.
 
Cheo Gomez
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rees, thankyou very much for answering, my jsp is in that way
I have the application integrated with spring, can it be the problem?



Rees Byars wrote:It may be helpful for you to post your jsp code as well (assuming you are using jsp).

If using getUsuario() is working, then it would appear that the problem may be the way you are referencing your object in your jsp.

My guess is that you have something like this in your jsp:



This would work with getUsuario(), but this will not work with getModel(). The reason is that the model object is placed on the top of the ValueStack. So to reference it in your jsp, you would do this:



As a side note, you really shouldn't access the request in the manner that you are using. Instead, you should have your action implement the ServletRequestAware interface.

 
I didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic