• 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

MVC

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I am implementing MVC for my project...Controller servlet directs the requests to appropriate beans by command pattern...
My problem is after the request is processed by bean the control comes back to servlet which then redirects to JSP for displaying the values..
But i am not able to access the object returned to servlet by bean..
It gives only null when i access the bean using <jsp:useBean> tag..
I also put the object in session and in request objects but still it gives null value...
Whats wrong...
Guidence please;;
Rajee
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you paste your code here?
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am implementing MVC for my project...Controller servlet directs the requests to appropriate beans by command pattern...

Are these "beans" EJBs or just plain old beans? Is the bean actually returning
an object to the servlet? Or is the problem between the servlet and the JSP (in which case you may find a better answer in the servlets forum or the JSP forum)?
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if the bean is in the request when you redirect you lose the request hence losing all the information in the bean. what you might want to do is use a forward to the jsp instead of a redirect. hope this helps. also if i could see the code it would help tons. Thanks...
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Servlets Forum...
reply
    Bookmark Topic Watch Topic
  • New Topic