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 数学的三元一次方程求解
  • ¥20 iqoo11 如何下载安装工程模式
  • ¥15 本题的答案是不是有问题
  • ¥15 关于#r语言#的问题:(svydesign)为什么在一个大的数据集中抽取了一个小数据集
  • ¥15 C++使用Gunplot
  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 蓝桥杯单片机第十三届第一场,整点继电器吸合,5s后断开出现了问题