Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Passing Javabean from Servlet to JSP


  • Please log in to reply
No replies to this topic

#1 reachpradeep


    CC Regular

  • Just Joined
  • PipPipPip
  • 41 posts

Posted 05 March 2007 - 11:47 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.

  • 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