package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.*;
import com.domain.BookForm;
public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
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 {
_jspxFactory = JspFactory.getDefaultFactory();
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;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write(" <link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
out.write("<title>图书市场调查</title>\r\n");
out.write("</head>\r\n");
com.dao.VoteDao dao = null;
synchronized (request) {
dao = (com.dao.VoteDao) _jspx_page_context.getAttribute("dao", PageContext.REQUEST_SCOPE);
if (dao == null){
dao = new com.dao.VoteDao();
_jspx_page_context.setAttribute("dao", dao, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n");
out.write("<body>\r\n");
out.write("<br>\r\n");
String ID="user";
if(application.getAttribute("ID")==null){
out.write("\r\n");
out.write(" <form method=\"post\" action=\"voteAction.do?ID=");
out.print(ID);
out.write("\">\r\n");
out.write(" <table width=\"653\" height=\"479\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"612\" height=\"159\" valign=\"top\" background=\"show.jpg\" class=\"word\">\r\n");
out.write(" <p> </p>\r\n");
out.write(" <p> </p>\r\n");
out.write(" <p> </p>\r\n");
out.write(" <p> </p>\r\n");
out.write("\t\t\t <p> </p>\r\n");
out.write(" <blockquote>\r\n");
out.write(" <p align=\"left\"> 1、 您经常购买的编程类图书属于哪一类?</p>\r\n");
out.write(" <p align=\"left\"> \r\n");
out.write(" ");
List listOne=dao.voteSelect("1");
for(int one=0;one<listOne.size();one++){
BookForm oneForm=(BookForm)listOne.get(one);
out.write("\r\n");
out.write(" <input type=\"checkbox\" name=\"one");
out.print(one);
out.write("\" value=\"");
out.print(oneForm.getId());
out.write("\" style=\"border:0; \"> ");
out.print(oneForm.getName());
out.write(" \r\n");
}
out.write("\r\n");
out.write(" </p>\r\n");
out.write(" <p align=\"left\"> 2、 您使用下面哪种编程语言或工具?</p>\r\n");
out.write(" <p align=\"left\"> \r\n");
out.write(" ");
List listTwo=dao.voteSelect("2");
for(int two=0;two<listTwo.size();two++){
BookForm twoForm=(BookForm)listTwo.get(two);
out.write("\r\n");
out.write(" <input type=\"checkbox\" name=\"two");
out.print(two);
out.write("\" value=\"");
out.print(twoForm.getId());
out.write("\" style=\"border:0; \"> ");
out.print(twoForm.getName());
out.write(" \r\n");
out.write(" ");
}
out.write("\r\n");
out.write("\r\n");
out.write(" </p>\r\n");
out.write(" <p align=\"left\"> 3、 您最愿意购买或借阅哪类图书?</p>\r\n");
out.write(" <p align=\"left\"> \r\n");
out.write("\t\t\t ");
List listThree=dao.voteSelect("3");
for(int three=0;three<listThree.size();three++){
BookForm threeForm=(BookForm)listThree.get(three);
out.write("\r\n");
out.write(" <input type=\"checkbox\" name=\"three");
out.print(three);
out.write("\" value=\"");
out.print(threeForm.getId());
out.write("\" style=\"border:0; \"> ");
out.print(threeForm.getName());
out.write(" \r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" </p>\r\n");
out.write(" </blockquote>\r\n");
out.write(" <p align=\"center\">\r\n");
out.write(" <table width=\"653\" border=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"457\"> </td>\r\n");
out.write(" <td width=\"145\"><input type=\"image\" name=\"submit\" src=\"sure.jpg\" ></td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
out.write("\r\n");
out.write("\r\n");
out.write(" <p align=\"left\"> </p>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write("\t </form>\r\n");
out.write("\t ");
}else{
response.sendRedirect("voteResulet.jsp");
}
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}