What should I fill out in a JSP page, such as SRC, of an IFRAME? Can it be HTML, JSP, servlet, action? How is it loaded?

Source: Internet
Author: User

What should I fill out in a JSP page, such as SRC, of an IFRAME? Can it be HTML, JSP, servlet, action? How is it loaded?

If there is a test project, there is an IFRAME in one of its jsps, the code is as follows:

<div class= "TC1" style= "padding-left:10px" >
<iframe src= "${contextpath}/main/getiframejsp" width= "Up" height= "120px" marginwidth= "1" marginheight= "1" name= " Test "id=" test "border=" 0 "frameborder=" 0 "></iframe>
</div>

The src of the IFRAME is: ${contextpath}/main, full link to http://127.0.0.1:8080/test/main/getIframeJsp

===1 can be HTML 2 can be a html== of other works

Reference Link: http://www.w3school.com.cn/tags/att_iframe_src.asp

The src attribute specifies the URL of the document to display in the IFRAME.

Specifies the address of the document that is displayed in the IFRAME.

Possible values:

    • Absolute URLs-point to other sites (such as src= "www.example.com/index.html")
    • Relative URL-Points to a file within the site (e.g. src= "index.html")

= = = can be a project or other project, action, servlet==

Reference Link: http://zhidao.baidu.com/link?url=SgvyO2Hj2b9AQbSmRmOPspYLMNqw_ 6xpiqy2vwiylj8yg08dkok-l4hf7a7nb9zesrgsuzdjjmvp5aw4ruavd3yirb0xhqfxuf9vj55sbg7

Q: Can src in an iframe be a servlet, and then the servlet jumps to the JSP appear in the IFRAME? Answer: Yes.
Set the src= ' xxxxx/yyy.do ' of the IFRAME, in the corresponding servlet, similar to the following notation: Request.getrequestdispatcher ("/a/b.jsp"). Forward (Request, Response);

= = = Summary

As can be understood, SRC is a URL request, such as this: <div class= "TC1" style= "padding-left:10px" >
<iframe src= "${contextpath}/main/getiframejsp" width= "Up" height= "120px" marginwidth= "1" marginheight= "1" name= " Test "id=" test "border=" 0 "frameborder=" 0 "></iframe>
</div>

SRC is http://127.0.0.1:8080/test/main/getIframeJsp, and its execution process is followed by input in the browser http://127.0.0.1:8080/test/main/ GETIFRAMEJSP executes the same procedure, executes the getiframejsp method of the test engineering Mainaction class, and displays the execution results in the IFRAME location.

What should I fill out in a JSP page, such as SRC, of an IFRAME? Can it be HTML, JSP, servlet, action? How is it loaded?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.