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

📄 include03c.jsp

📁 精通tomcat书籍原代码,希望大家共同学习
💻 JSP
字号:
<%@ page contentType="text/plain" %><%
  // Duplicate logic from "Include03.java"
  StringBuffer sb = new StringBuffer();
  String path = request.getParameter("path");
  if (path == null)
    path = "/Include03a";
  RequestDispatcher rd =
    getServletContext().getRequestDispatcher(path);
  if (rd == null) {
    sb.append(" No RequestDispatcher returned/");
  } else {
    rd.include(request, response);
  }
  response.resetBuffer();
  String value = null;
  try {
    value = (String) request.getAttribute(path.substring(1));
  } catch (ClassCastException e) {
      sb.append(" Returned attribute not of type String/");
  }
  if ((sb.length() < 1) && (value == null)) {
      sb.append(" No includee-created attribute was returned/");
  }
  if (sb.length() < 1)
    out.println("Include03c.jsp PASSED");
  else {
    out.print("Include03c.jsp FAILED -");
    out.println(sb.toString());
  }
%>

⌨️ 快捷键说明

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