• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ResourceURL类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.portlet.ResourceURL的典型用法代码示例。如果您正苦于以下问题:Java ResourceURL类的具体用法?Java ResourceURL怎么用?Java ResourceURL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ResourceURL类属于javax.portlet包,在下文中一共展示了ResourceURL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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=\"SigTestsURL_BaseURL_SIGResourceResurl\">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_BaseURL_SIGResourceResurl\").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,代码行数:27,代码来源:SigTestsURL_BaseURL_SIGResourceResurl.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=\"SigTestsURL_BaseURL_SIGResourceRenurl\">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_BaseURL_SIGResourceRenurl\").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,代码行数:27,代码来源:SigTestsURL_BaseURL_SIGResourceRenurl.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=\"SigTestsURL_BaseURL_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_BaseURL_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");
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:27,代码来源:SigTestsURL_BaseURL_SIGResourceActurl.java


示例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=\"DispatcherReqRespTests1_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(\"DispatcherReqRespTests1_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,代码来源:DispatcherReqRespTests1_SPEC2_19_ForwardJSPResourceResponse.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=\"DispatcherTests6_SPEC2_19_FwdThenForwardServletResource\">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(\"DispatcherTests6_SPEC2_19_FwdThenForwardServletResource\").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,代码来源:DispatcherTests6_SPEC2_19_FwdThenForwardServletResource.java


示例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=\"DispatcherTests6_SPEC2_19_FwdThenIncludeServletResource\">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(\"DispatcherTests6_SPEC2_19_FwdThenIncludeServletResource\").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,代码来源:DispatcherTests6_SPEC2_19_FwdThenIncludeServletResource.java


示例8: render

import javax.portlet.ResourceURL; //导入依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {

   PrintWriter writer = portletResp.getWriter();    
   
   writer.write(
         "<div id=\"AnnotationPortletConfigTests_SPEC2_28_AsynchronousSupport\">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(\"AnnotationPortletConfigTests_SPEC2_28_AsynchronousSupport\").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,代码来源:AnnotationPortletConfigTests_SPEC2_28_AsynchronousSupport.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=\"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");
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:25,代码来源:DispatcherTests_SPEC2_19_DispatchServletResource.java


示例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_ForwardServletResource\">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_ForwardServletResource\").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,代码来源:DispatcherTests_SPEC2_19_ForwardServletResource.java


示例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");
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:25,代码来源:DispatcherTests_SPEC2_19_IncludeServletResource.java


示例12: 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=\"ResponseTests_MimeResponse_ApiResource\">no resource output.</div>\n");
   ResourceURL resurl = portletResp.createResourceURL();
   resurl.setCacheability(ResourceURL.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(\"ResponseTests_MimeResponse_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");
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:26,代码来源:ResponseTests_MimeResponse_ApiResource.java


示例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=\"DispatcherReqRespTests4_SPEC2_19_IncludeServletResourceResponse\">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(\"DispatcherReqRespTests4_SPEC2_19_IncludeServletResourceResponse\").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,代码来源:DispatcherReqRespTests4_SPEC2_19_IncludeServletResourceResponse.java


示例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=\"DispatcherReqRespTests3_SPEC2_19_IncludeJSPResourceResponse\">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(\"DispatcherReqRespTests3_SPEC2_19_IncludeJSPResourceResponse\").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,代码来源:DispatcherReqRespTests3_SPEC2_19_IncludeJSPResourceResponse.java


示例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=\"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


示例16: 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=\"DispatcherTests2_SPEC2_19_IncludeJSPResource\">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(\"DispatcherTests2_SPEC2_19_IncludeJSPResource\").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,代码来源:DispatcherTests2_SPEC2_19_IncludeJSPResource.java


示例17: 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=\"DispatcherTests2_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(\"DispatcherTests2_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");
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:25,代码来源:DispatcherTests2_SPEC2_19_ForwardJSPResource.java


示例18: render

import javax.portlet.ResourceURL; //导入依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
    throws PortletException, IOException {
  ResourceURL resurl = portletResp.createResourceURL();
  resurl.setCacheability(FULL);
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);
  PrintWriter writer = portletResp.getWriter();
  
  writer.write("<div id=\"PortletTagLibraryTests3_SPEC2_26_IncludeJSPResource_tr39\">no resource output.</div>\n");
  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(\"PortletTagLibraryTests3_SPEC2_26_IncludeJSPResource_tr39\").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,代码行数:24,代码来源:PortletTagLibraryTests3_SPEC2_26_IncludeJSPResource_tr39.java


示例19: render

import javax.portlet.ResourceURL; //导入依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
    throws PortletException, IOException {
  ResourceURL resurl = portletResp.createResourceURL();
  resurl.setCacheability(PORTLET);
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);
  PrintWriter writer = portletResp.getWriter();
  
  writer.write("<div id=\"PortletTagLibraryTests3_SPEC2_26_IncludeJSPResource_tr40\">no resource output.</div>\n");
  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(\"PortletTagLibraryTests3_SPEC2_26_IncludeJSPResource_tr40\").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,代码行数:24,代码来源:PortletTagLibraryTests3_SPEC2_26_IncludeJSPResource_tr40.java


示例20: 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_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(\"DispatcherTests4_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");
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:25,代码来源:DispatcherTests4_SPEC2_19_IncludeServletResource.java



注:本文中的javax.portlet.ResourceURL类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TupleElement类代码示例发布时间:2022-05-22
下一篇:
Java Value类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap