欢迎光临
我们一直在努力

jsp源码实例1(输出)-JSP教程,Jsp/Servlet

建站超值云服务器,限时71元/月

package coreservlets;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

/** simple servlet that generates html.
*  <p>
*  taken from core servlets and javaserver pages
*  from prentice hall and sun microsystems press,
*  http://www.coreservlets.com/.
*  © 2000 marty hall; may be freely used or adapted.
*/

public class hellowww2 extends httpservlet {
  public void doget(httpservletrequest request,
                    httpservletresponse response)
      throws servletexception, ioexception {
    response.setcontenttype("text/html");
    printwriter out = response.getwriter();
    string doctype =
      "<!doctype html public \"-//w3c//dtd html 4.0 " +
      "transitional//en\">\n";
    out.println(doctype +
                "<html>\n" +
                "<head><title>hello www</title></head>\n" +
                "<body>\n" +
                "<h1>hello www</h1>\n" +
                "</body></html>");
  }
}

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » jsp源码实例1(输出)-JSP教程,Jsp/Servlet
分享到: 更多 (0)

相关推荐

  • 暂无文章