【Java开源代码栏目提醒】:以下是网学会员为您推荐的Java开源代码-bbsadd_jsp.java,希望本篇文章对您学习有所帮助。
package org.apache.jsp.web.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public final class bbsadd_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
public String getServletInfo() {
return "database handler";
}
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(1);
_jspx_dependants.add("/
web/jsp/incdb.jsp");
}
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");
request.setCharacterEncoding("GB2312");
out.write('\r');
out.write('\n');
out.write("<!--驴陋脢录碌录脠毛packages-->\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<!--碌录脠毛陆谩脢酶-->");
out.write('\r');
out.write('\n');
twm.bbsuser user = null;
synchronized (_jspx_page_context) {
user = (twm.bbsuser) _jspx_page_context.getAttribute("user", PageContext.PAGE_SCOPE);
if (user == null){
user = new twm.bbsuser();
_jspx_page_context.setAttribute("user", user, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
twm.bbs bbs = null;
synchronized (_jspx_page_context) {
bbs = (twm.bbs) _jspx_page_context.getAttribute("bbs", PageContext.PAGE_SCOPE);
if (bbs == null){
bbs = new twm.bbs();
_jspx_page_context.setAttribute("bbs", bbs, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
twm.bbsboard board = null;
synchronized (_jspx_page_context) {
board = (twm.bbsboard) _jspx_page_context.getAttribute("board", PageContext.PAGE_SCOPE);
if (board == null){
board = new twm.bbsboard();
_jspx_page_context.setAttribute("board", board, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
String strSQL;// '鎵ц鐨凷QL璇彞
java.
sql.ResultSet sqlRst; //'ADODB RECORDSE 瀵硅薄
int boardid;
String tempSTR,whereTo;
byte[] tmpbyte;
String tt; // '閿欒鍙橀噺
boardid=0;
tempSTR=request.getParameter("boardid");
boardid=java.lang.Integer.parseInt(tempSTR);
tt=request.getParameter("tt");
if (tt==null){
tt="";
}
out.write("\r\n");
out.write("<html>\r\n");
out.write("\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Language\" content=\"zh-cn\">\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<title>鍔犺创</title>\r\n");
out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"bbs03.css\">\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("<script Language=\"JavaScript\">\r\n");
out.write("<!--\r\n");
out.write("function isspacestring(mystring)\r\n");
out.write("//鏄惁涓虹┖鏍煎瓧绗︿覆;true涓虹┖锛孎ALSE涓洪潪绌篭r\n");
out.write("{\r\n");
out.write(" var istring=mystring;\r\n");
out.write(" var temp,i,strlen;\r\n");
out.write(" temp=true;\r\n");
out.write(" strlen=istring.length;\r\n");
out.write(" for (i=0;i<strlen;i++)\r\n");
out.write(" {\r\n");
out.write(" if ((istring.substring(i,i+1)!=\" \")&(temp))\r\n");
out.write(" { temp=false; }\r\n");
out.write(" }\r\n");
out.write(" return temp;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("function firstisspace(mystring)\r\n");
out.write("//妫鏌ラ瀛楁瘝鏄惁鏄┖鏍硷紝TRUE棣栧瓧姣嶄负绌烘牸锛汧ALSE棣栧瓧姣嶄笉涓虹┖鏍糪r\n");
out.write("{ \r\n");
out.write(" var istring=mystring;\r\n")