Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Passing Javabean from Servlet to JSP

servlet

  • Please log in to reply
1 reply to this topic

#1 reachpradeep

reachpradeep

    CC Regular

  • Just Joined
  • PipPipPip
  • 41 posts

Posted 07 March 2007 - 10:07 AM

I'm missing something fundamentally simple I'm sure, but I want a servlet controller to create and populate a Javabean, then forward to JSP page for display via RequestDispatcher.forward (req, resp)

Then in the JSP, I
<jsp:useBean id="name" class="com.etc...." scope="request">

The result is my Javabean is created and populated in the servlet as I want, but then is re-created when it gets to the JSP. I'm looking for some method call or something to attach the javabean to the request object so it gets passed into the JSP without being recreated.

Seems pretty basic to me, but can't find references or searches to
help me out.

Thanks,
  • 0

#2 rameshkumar

rameshkumar

    CC Newcomer

  • Just Joined
  • PipPip
  • 19 posts

Posted 01 June 2007 - 09:56 PM

I'm missing something fundamentally simple I'm sure, but I want a servlet controller to create and populate a Javabean, then forward to JSP page for display via RequestDispatcher.forward (req, resp)

Then in the JSP, I
<jsp:useBean id="name" class="com.etc...." scope="request">

The result is my Javabean is created and populated in the servlet as I want, but then is re-created when it gets to the JSP. I'm looking for some method call or something to attach the javabean to the request object so it gets passed into the JSP without being recreated.

Seems pretty basic to me, but can't find references or searches to
help me out.

Thanks,

:)
Know if you forward to jsp cantainers pls right down to this method <jsp:useBean>
<scope="session">
either
<scope="forward">
main diffrence between session and forward it request to jsp caintenars and represents to next page
  • 0





Also tagged with one or more of these keywords: servlet

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download