jsp·ÖÒ³
Ô´³ÌÐò
<%String sConn="ÄãµÄÁ¬½Ó"
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection(sConn,"ÄãµÄÓû§Ãû","ÃÜÂë");
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
Statement stmtcount=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs=stmt.executeQuery("select * from mytable_view");
String sqlcount="select count(*) from mytable_view";
ResultSet rscount=stmtcount.executeQuery(sqlcount);
int pageSize=ÄãµÄÿҳÏÔʾ¼Í¼Êý£»
int rowCount=0; //×ܵļǼÊý
while (rscount
int pageCount; //×ܵÄÒ³Êý
int currPage; //µ±Ç°Ò³Êý
String strPage;
strPage=request.getParameter("page");
if (strPage==null){
currPage=1;
}
else{
currPage=Integer.parseInt(strPage);
if (currPage<1) currPage=1;
}
pageCount=(rowCount+pageSize-1)/pageSize;
if (currPage>pageCount) currPage=pageCount;
int thepage=(currPage-1)*pageSize;
int n=0;
rs.absolute(thepage+1);
while (n<(pageSize)&&!rs
%>
<%rs.close();
rscount.close();
stmt.close();
stmtcount.close();
conn.close();
%>
//ÏÂÃæÊÇ µÚ¼¸Ò³µÈ
<form name="sinfo" method="post" action="sbinfo_index.jsp?condition=<%=condition%>&type=<%=type%>" onSubmit="return testform(this)">
µÚ<%=currPage%>Ò³ ¹²<%=pageCount%>Ò³ ¹²<%=rowCount%>Ìõ
<%if(currPage>1){%><a href="sbinfo_index.jsp?condition=<%=condition%>&type=<%=type%>">Ê×Ò³</a><%}%>
<%if(currPage>1){%><a href="sbinfo_index.jsp?page=<%=currPage-1%>&condition=<%=condition%>&type=<%=type%>">ÉÏÒ»Ò³</a><%}%>
<%if(currPage<pageCount){%><a href="sbinfo_index.jsp?page=<%=currPage+1%>&condition=<%=condition%>&type=<%=type%>">ÏÂÒ»Ò³</a><%}%>
<%if(pageCount>1){%><a href="sbinfo_index.jsp?page=&l
Ïà¹ØÎĵµ£º
<%
Cookie[] cooks = request.getCookies();
String cookieName = "Mycookie";
boolean flag = false;
for(Cookie cook : cooks)
{
if(cook.getName().equals(cookieName))
{
flag = true;
break;
}
}
if(!flag){
String str=System.currentTimeMillis()+"";
Cook ......
ÎÒÒªµ÷ÓÃJExcelApi ¶ÁÈ¡Óû§ÔÚ¿Í»§¶ËÑ¡ÔñµÄExcelÖеÄÎļþÖеÄÊý¾Ý£¬
ÎÒÊÇÕâÑù×öµÄ£º
Ê×ÏÈ×öÒ»¸öÒ³ÃæupLoadExcel.jspÈÃÓû§Ñ¡Ôñ±¾µØµÄExcelÎļþ£¬ÎÒ¾ÍÊÇÓõÄÉÏ´«µÄÄǸöÒ³Ãæ£º
<!DOCTYPE HTML PUBLIC "-//W3C//DTD &nb ......
JSP½Å±¾Öаüº¬9¸öÄÚÖöÔÏó£¬Õâ9¸öÄÚÖöÔÏó¶¼ÊÇServlet API½Ó¿ÚµÄʵÀý£¬Ö»ÊÇJSP¹æ·¶½«ËüÃÇÍê³ÉÁËĬÈϳõʼ»¯£¨ÓÉJSPÒ³Ãæ¶ÔÓ¦ServletµÄ_jspService()·½·¨À´´´½¨ÕâЩʵÀý£©¡£Ò²¾ÍÊÇ˵£¬ËüÃÇÒѾÊǶÔÏ󣬿ÉÒÔÖ±½ÓʹÓá£9¸öÄÚÖöÔÏóÒÀ´ÎÈçÏ£º
application£ºjavax.servlet.ServletContextµÄʵÀý£¬¸ÃʵÀý´ú±íJSPËùÊôµÄWebÓ ......
ÉϺ£ÔóÎäÍøÂçÓÐÏÞ¹«Ë¾
ÕÐÆ¸£ºÕÐÆ¸jsp\phpÍøÕ¾¿ª·¢³ÌÐòÔ±
ÒªÇóÓÐÈýÄêÒÔÉÏ¿ª·¢¾Ñé
¶ÔTomcat+Apache¼¯Èº¼¼ÊõÓÐÊìϤµÄ¾Ñé.¶ÔËÑË÷ÒýÇæ¼¼Êõ(Lucene)±È½ÏÁ˽⡣
-ÊìÁ·Ê¹ÓÃUML½¨Ä£¹¤¾ß¡¢°æ±¾¿ØÖƹ¤¾ß; ÊìÁ·Ê¹ÓÃEclipseµÈIDE¿ª·¢¹¤¾ß;
-¾«Í¨JAVA,php,ÉîÈëÀí½âOOP˼Ïë,ÊìϤÉè¼ÆÄ£Ê½¡£
-ÊìÁ·ÔËÓÃJ2EE¼¼Êõ¡¢WEB·þÎñÆ÷ºÍ¹ØÏµÐ ......
get
jsp url ${param.serialID}
action jsp String commentId = ServletActionContext.getRequest().getParameter("commentId");
-- ......