本文整理汇总了Java中javax.portlet.ResourceURL.setCacheability方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceURL.setCacheability方法的具体用法?Java ResourceURL.setCacheability怎么用?Java ResourceURL.setCacheability使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.portlet.ResourceURL
的用法示例。
在下文中一共展示了ResourceURL.setCacheability方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherTests5_SPEC2_19_IncThenForwardServletResource\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherTests5_SPEC2_19_IncThenForwardServletResource\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
开发者ID:apache,项目名称:portals-pluto,代码行数:25,代码来源:DispatcherTests5_SPEC2_19_IncThenForwardServletResource.java
示例2: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherReqRespTests5S_SPEC2_19_ForwardJSPResourceRequest\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherReqRespTests5S_SPEC2_19_ForwardJSPResourceRequest\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
开发者ID:apache,项目名称:portals-pluto,代码行数:26,代码来源:DispatcherReqRespTests5S_SPEC2_19_ForwardJSPResourceRequest.java
示例3: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
开发者ID:apache,项目名称:portals-pluto,代码行数:26,代码来源:DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest.java
示例4: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherTests3S_SPEC2_19_IncludeServletResource\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherTests3S_SPEC2_19_IncludeServletResource\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
示例5: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherTests5_SPEC2_19_IncThenIncludeServletResource\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherTests5_SPEC2_19_IncThenIncludeServletResource\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
开发者ID:apache,项目名称:portals-pluto,代码行数:25,代码来源:DispatcherTests5_SPEC2_19_IncThenIncludeServletResource.java
示例6: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherTests4_SPEC2_19_ForwardJSPResource\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherTests4_SPEC2_19_ForwardJSPResource\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
示例7: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherReqRespTests5S_SPEC2_19_ForwardJSPResourceResponse\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherReqRespTests5S_SPEC2_19_ForwardJSPResourceResponse\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
开发者ID:apache,项目名称:portals-pluto,代码行数:26,代码来源:DispatcherReqRespTests5S_SPEC2_19_ForwardJSPResourceResponse.java
示例8: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
开发者ID:apache,项目名称:portals-pluto,代码行数:26,代码来源:DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest.java
示例9: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"AddlRequestTests_SPEC2_11_ResourceReq\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(
" document.getElementById(\"AddlRequestTests_SPEC2_11_ResourceReq\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
示例10: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherTests_SPEC2_19_DispatchServletResource\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherTests_SPEC2_19_DispatchServletResource\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
示例11: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"DispatcherTests_SPEC2_19_IncludeServletResource\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"DispatcherTests_SPEC2_19_IncludeServletResource\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
示例12: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
LOGGER.trace("main portlet render entry");
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write("<div id=\"RequestTests_ResourceRequest_ApiResource\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(" document.getElementById(\"RequestTests_ResourceRequest_ApiResource\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
示例13: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer
.write("<div id=\"FilterTests_FilterChain_ApiResourceFilter\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(
" document.getElementById(\"FilterTests_FilterChain_ApiResourceFilter\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
示例14: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer
.write("<div id=\"SigTestsURL_PortletURL_SIGResourceActurl\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(
" document.getElementById(\"SigTestsURL_PortletURL_SIGResourceActurl\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}
示例15: render
import javax.portlet.ResourceURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
long tid = Thread.currentThread().getId();
portletReq.setAttribute(THREADID_ATTR, tid);
PrintWriter writer = portletResp.getWriter();
writer.write(
"<div id=\"FilterTests_PortletFilter_ApiResourceFilter\">no resource output.</div>\n");
ResourceURL resurl = portletResp.createResourceURL();
resurl.setCacheability(PAGE);
writer.write("<script>\n");
writer.write("(function () {\n");
writer.write(" var xhr = new XMLHttpRequest();\n");
writer.write(" xhr.onreadystatechange=function() {\n");
writer.write(" if (xhr.readyState==4 && xhr.status==200) {\n");
writer.write(
" document.getElementById(\"FilterTests_PortletFilter_ApiResourceFilter\").innerHTML=xhr.responseText;\n");
writer.write(" }\n");
writer.write(" };\n");
writer.write(" xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
writer.write(" xhr.send();\n");
writer.write("})();\n");
writer.write("</script>\n");
}