base Tag

WARNING :If you are an experienced designer of web applications, you might have
used the HTML <base> tag. This tag allows you to specify a location that
all tags like <a> and <img> will use as their base. That is, if you specify a
new base with
<base href="http://www.jstlbook.com/"/>
then a tag like <img src="image.jpg"/> will cause the browser to try to
load http://www.jstlbook.com/image.jpg, not the local image.jpg file in
the same directory as the web page.
The <base> tag, however, does not affect the way that JSP tags like
<jsp:include> operate. To a JSP engine, the <base> tag is arbitrary HTML. <base> has its effect because the browser interprets it and uses it to
modify the way the rest of the page loads. But JSP engines do not interpret
HTML tags; they simply pass them through to the browser. Therefore, although it makes sense to think of <jsp:include> as finding files in a
manner similar to <a> and <img>, the analogy is not perfect. <jsp:include> always looks for files on the local server.

posted @ 2015-06-15 01:13  hephec  阅读(255)  评论(0编辑  收藏  举报