• Post Reply Bookmark Topic Watch Topic
  • New Topic

MVC  RSS feed

 
rajee venkat
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you paste your code here?
 
Marilyn de Queiroz
Sheriff
Posts: 9079
12
  • Mark post as helpful
  • send pies
  • 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)?
 
Stefan Bell
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • 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...
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Servlets Forum...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!