Monlystar's profileMyonlystar的共享空间BlogGuestbookNetwork Tools Help

Blog


    September 18

    在一个jsp页面中嵌套另一个jsp页面

         扎堆实验室已经好几天了,一直在学习jsp,javascript来构建动态网站,还好自己有些java基础,也希望自己能一点一点慢慢的进步,以前一直不明白,页面的布局是怎么实现的,今天才明白原来是依靠一个一个<table>中的<td>镶嵌来实现的。今天终于弄明白了一件事就是:在一个jsp页面中显示另一个页面,原来是依靠<iframe>来实现的。
         自己现在知道的在一个jsp页面中嵌套另外一个jsp页面,有三种方法:
         1、通过<%@ include file="header.jsp"%>这种方法只能实现静态页面的加载,最常用是在一个项目中实现通用页头header.jsp和footer.jsp的加载。
         2、通过<%@ include="tt.jsp"%>这种做法可以实现动态页面的加载,但其需要向页面传递参数;
         3、通过<iframe src="jsp的路径">来向页面加载另一个jsp页面,是一个内联框架。
         1
    页面处理较仓促,未来的及美工,实例演示在一个jsp页面中嵌套另一个页面。
    ps:最近越来越明白一个问题就是,编程学习,犹如逆水行舟,不进则退。上半年还写过自定义标签,现在却有点儿忘了,明天争取一天复习一下自定义标签。
     
     

    Comments (2)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    yuwrote:
    你好,我用的是第一种方法,可是我的几个嵌套页面用到了相同的变量,在其中一个页面中定义了此变量,主页面也定义了此变量,嵌套到主页面后说此变量重复定义,怎么解决
    Apr. 16
    yuwrote:
    jk
    Apr. 16

    Trackbacks

    The trackback URL for this entry is:
    http://cid-b02da37102052119.spaces.live.com/blog/cns!B02DA37102052119!146.trak
    Weblogs that reference this entry
    • None