JspSourceDependent 源代码JSP java源码

本文介绍了JspSourceDependent接口,它是Apache Jasper包中的一个抽象接口,用于标识依赖源代码的JSP类。内容展示了login_jsp类如何实现此接口,并提供了页面初始化、销毁方法以及获取依赖项的示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

JspSourceDependent(Jsp基本类)属于jasper

 

packageorg.apache.jasper.runtime;

 

importjava.util.Map;

 

public abstractinterface JspSourceDependent

{

  public abstractMap<String, Long> getDependants();//基本抽象键值对

}



//----------------------------------------------------------------------------------------


/*

 * Generated by the Jasper component of ApacheTomcat

 * Version: Apache Tomcat/8.0.5

 * Generated at: 2014-10-09 01:41:00 UTC

 * Note: The last modified time of this filewas set to

 *      the last modified time of the source file after

 *      generation to assist with modification tracking.

 */

 

 

importjavax.servlet.*;

importjavax.servlet.http.*;

importjavax.servlet.jsp.*;

import java.util.*;

 

public final classlogin_jsp extends org.apache.jasper.runtime.HttpJspBase

    implementsorg.apache.jasper.runtime.JspSourceDependent{//继承HttpJspBase类和实现了JspSourceDependent接口

 

  private static finaljavax.servlet.jsp.JspFactory _jspxFactory =

         javax.servlet.jsp.JspFactory.getDefaultFactory();

 

  private staticjava.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

 

  private javax.el.ExpressionFactory_el_expressionfactory;//el表达式语言对象

  private org.apache.tomcat.InstanceManager_jsp_instancemanager;

 

  publicjava.util.Map<java.lang.String,java.lang.Long> getDependants() {

    return _jspx_dependants;

  }

 

  public void _jspInit() {

    _el_expressionfactory =_jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();

    _jsp_instancemanager =org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());

  }

 

  public void _jspDestroy() {

  }

 

  public void _jspService(finaljavax.servlet.http.HttpServletRequest request, finaljavax.servlet.http.HttpServletResponse response)

        throws java.io.IOException,javax.servlet.ServletException {

 

    finaljavax.servlet.jsp.PageContext pageContext;//隐式9对象之一

   javax.servlet.http.HttpSession session = null;//隐式9对象之一

    finaljavax.servlet.ServletContext application;//隐式9对象之一

    finaljavax.servlet.ServletConfig config;//隐式9对象之一

   javax.servlet.jsp.JspWriter out = null;//隐式9对象之一

    final java.lang.Objectpage = this;//隐式9对象之一

    javax.servlet.jsp.JspWriter _jspx_out =null;

    javax.servlet.jsp.PageContext_jspx_page_context = null;

 

 

    try {

     response.setContentType("text/html;charset=UTF-8");

      pageContext =_jspxFactory.getPageContext(this, request, response,

                             null,true, 8192, true);

      _jspx_page_context = pageContext;

      application =pageContext.getServletContext();

      config = pageContext.getServletConfig();

      session = pageContext.getSession();

      out = pageContext.getOut();

      _jspx_out = out;

 

      out.write('\r');

      out.write('\n');

 

String path =request.getContextPath();

String basePath =request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

 

      out.write("\r\n");

      out.write("\r\n");

      out.write("<!DOCTYPE HTML PUBLIC\"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");

      out.write("<html>\r\n");

      out.write("  <head>\r\n");

      out.write("    <base href=\"");

      out.print(basePath);

      out.write("\">\r\n");

      out.write("    \r\n");

      out.write("    <title>My JSP 'login.jsp' startingpage</title>\r\n");

      out.write("    \r\n");

      out.write("\t<metahttp-equiv=\"pragma\" content=\"no-cache\">\r\n");

      out.write("\t<metahttp-equiv=\"cache-control\"content=\"no-cache\">\r\n");

      out.write("\t<metahttp-equiv=\"expires\" content=\"0\">    \r\n");

      out.write("\t<metahttp-equiv=\"keywords\"content=\"keyword1,keyword2,keyword3\">\r\n");

      out.write("\t<metahttp-equiv=\"description\" content=\"This is mypage\">\r\n");

      out.write("\t<!--\r\n");

      out.write("\t<linkrel=\"stylesheet\" type=\"text/css\"href=\"styles.css\">\r\n");

      out.write("\t-->\r\n");

      out.write("\r\n");

      out.write("  </head>\r\n");

      out.write("  \r\n");

      out.write("  <body>\r\n");

      out.write("    \r\n");

      out.write("  </body>\r\n");

      out.write("</html>\r\n");

    } catch (java.lang.Throwable t) {

      if (!(t instanceofjavax.servlet.jsp.SkipPageException)){

        out = _jspx_out;

        if (out != null &&out.getBufferSize() != 0)

          try { out.clearBuffer(); } catch(java.io.IOException e) {}

        if (_jspx_page_context != null)_jspx_page_context.handlePageException(t);

        else throw new ServletException(t);

      }

    } finally {

     _jspxFactory.releasePageContext(_jspx_page_context);

    }

  }

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值