Jimmery_z 2017-04-06 14:30 采纳率: 80%
浏览 922
已采纳

刚用不知道问题出在哪里 netbeans写的

person.jsp.java代码

package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class people_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {

int count;
StringBuffer personList;
public void judge(){
if(count==0)
personList=new StringBuffer();
}
public void addPerson(String p){
if(count==0)
personList.append(p);
else
personList.append(","+p);
count++;
}

private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

private static java.util.List _jspx_dependants;

private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector;

public java.util.List getDependants() {
return _jspx_dependants;
}

public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {

PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;

try {
  response.setContentType("text/html;charset=GB2312");
  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;
  _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");

  out.write("\n");
  out.write("\n");
  out.write("<html>\n");
  out.write("    <body bgcolor=\"yellow\"><font Size=\"3\">\n");
  out.write("        ");
  out.write("\n");
  out.write("        ");}

String name=request.getParameter("name");
byte bb[]=name.getBytes("iso-8859-1");
name=new String(bb);
if(name.length()==0||name.length()>10)
{
out.write("\n");
out.write("judge();\n");
out.write("addPerson(name);\n");
out.write("%>\n");
out.write("
目前共有");
out.print(count);
out.write("人浏览了该页面,他们的名字是:\n");
out.write("
");
out.print(personList);
out.write("\n");
out.write("\n");
out.write("

  • 写回答

2条回答 默认 最新

  • devmiao 2017-04-06 15:53
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 对于知识的学以致用的解释
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败