Send request into src of a frame in a JSP.

Discussions

Web tier: servlets, JSP, Web frameworks: Send request into src of a frame in a JSP.

  1. Send request into src of a frame in a JSP. (2 messages)

    I have the following question:

    There is a frame in a JSP, call it A.jsp. The src of the frame is another JSP, call it B.jsp. My servlet access the A.jsp and send request to it. But when I use the request inside B.jsp, it is a null. How can I pass the request to B.jsp?

    Thank you.

    Di He
  2. Unfortunately, you can't. Once the HTML for A.jsp is written, it is set to the client. When the client (the browser) parses the HTML and sees that it contains a frame, it makes a subsequent request to the server. It is this request that is for B.jsp. Since it is a completely different request. There are a couple of solutions:

    1. Place what ever stateful data you need in the session instead of the request.

    2. Don't use frames. Instead, consider tables and JSP includes. For more on this, see the FAQ Why do Frames suck? on jGuru.

    Cheers.

    Ryan
  3. By using "include" in a JSP, how can I put the included JSP anywhere inside its caller?

    Di