How do I pass parameters to a framed JSP?

Hi,

I have a servlet from which I'm calling a framed JSP consisting of 3 JSPs - say, main.jsp, left.jsp, and center.jsp. I want to pass parameters from my servlet to the framed JSP targetting to left.jsp.

1) How do I do it using a query string?

2) How do I do it using RequestDispatcher's forward method (as I also need to pass some attributes)?

Any help (especially some sample code) is highly appreciated.

Thanks a lot.

[462 byte] By [DhananjeyunRa] at [2007-11-27 6:15:36]
# 1

1) you target the left frame from with the link or form using the "target=" property. You give the name of your frame and the query will be sent to that frame.

2) each JSP or servlet has those parameters, the HttpServletRequest and HttpServletResponse. Normally you would call forward like this:

rd.forward(request, response);

return;

gimbal2a at 2007-7-12 17:26:27 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...