⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 static.xtp

📁 解压在c盘
💻 XTP
字号:
<title css='default.css'>The Static Statement</title><macro name=isolation><a href='isolation.html'>isolation</a></macro><p>JSP files and the files they import execute in isolation from allother requests to the same files.  In addition, their statementsare reevaluated for each request.  The static statement lets thedeveloper execute a statement only once or to share informationbetween requests</p><def>static <var>statement</var>;</def><var>statement</var> is executed as soon as the file is parsed.During subsequent requests, the statement is not reevaluated.<p>Requests are still <a href='isolation.html'>isolated</a> fromeach other.  All JavaScript objects created or modified in a<code>static</code> statement are copied for each request.  Since<a href="wrap.html">wrapped</a> Java objects are not copied,developers can use <code>static</code> statements in combination with<a href="wrap.html">wrapped</a> Java objects to create applicationobjects.</p><p>In general, Java used as application objects will need <ahref='synchronization.html'>synchronization</a> to keep the stateconsistent between request threads</p><example>&lt;%static {  application = new caucho.vfs.MemoryFilesystem();  application.object = 3;}synchronize (application) {  value = application.object++;}%&gt;&lt;h1&gt;You are visitor &lt;%= value %&gt; &lt;h1&gt;</example>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -