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
-
Send request into src of a frame in a JSP. (2 messages)
- Posted by: Di He
- Posted on: July 25 2001 16:47 EDT
Threaded Messages (2)
- Send request into src of a frame in a JSP. by Ryan Breidenbach on July 25 2001 23:17 EDT
- Send request into src of a frame in a JSP. by Di He on July 26 2001 15:26 EDT
-
Send request into src of a frame in a JSP.[ Go to top ]
- Posted by: Ryan Breidenbach
- Posted on: July 25 2001 23:17 EDT
- in response to Di He
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 -
Send request into src of a frame in a JSP.[ Go to top ]
- Posted by: Di He
- Posted on: July 26 2001 15:26 EDT
- in response to Ryan Breidenbach
By using "include" in a JSP, how can I put the included JSP anywhere inside its caller?
Di