BasePath
String Path == request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/" ;
<base href= "<%=basePath%>" > /<base> tags Specify default addresses or default targets for all links on the page.
Request.getscheme () returns the protocol used by the current link;
Request.getservername () can return the name of the server on which the current page is located;
Request.getserverport () can return the port used by the server on which the current page is located;
Request.getcontextpath () can return the name of the app where the current page is located;
Meta Tag's Http-equiv property
Function: The Http-equiv property provides an HTTP header for the information/value of the Content property, which can be used to simulate an HTTP response header
1.Expires (term)
<meta http-equiv= "Expires" content= "Wed, June 22:33:00 GMT" >
Used to set the expiration time of the page, once the page expires, must be retransmitted to the server, the time format must be used GMT;
2.Pragma (Cache mode)
<meta http-equiv= "Pragma" content= "No-cache" >
Used to set the browser from the local cache to access the content of the page, set once left the page can not be recalled from the cache, visitors will not be able to browse offline;
3.Refresh (Refresh)
<meta http-equiv= "Refresh" content= "2;url=http://www.net.cn/" >
After the number of seconds to stay, automatically refresh and point to the new page;
4.set-cookie (Cookie setting)
<meta http-equiv= "Set-cookie" content= "Cookievalue=xxx;expires=wednesday, 20-jun-2007 22:33:00 GMT; path=/" >
5.window-target (display window settings)
<meta http-equiv= "Window-target" content= "_top" >
Force the page to appear on a separate page in the current window
6.content-type (Displays the settings of the character set)
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
7.pics-label (Web level rating)
<meta http-equiv= "Pics-label" contect= "" >
8. Set the entry Exit page effect
<meta http-equiv= "Page-enter" contect= "Revealtrans (duration=1.0,transtion= )" ><meta http-equiv= "Page-exit" contect= "Revealtrans (duration=1.0,transtion= )" >
The value of duration is the duration of the dynamic transition of the Web page, in seconds;
Transition is the transition mode, it has a value of 0 to 23, respectively, corresponding to 24 transition modes;
9. Clear the Cache
<meta http-equiv= "Cache-control" content= "No-cache" >
10. Set the expiry time of the Web page
11. Keywords for use by search engines
<meta http-equiv= "keywords" content= "keyword1,keyword2,keyword3" >
12. Page description
<meta http-equiv= "description" content= "This is my page" >
Web Development Related