Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

JSP ÏÐʽעÊÍ ÒþʽעÊӵIJî±ð

½ñÌì¸ÕÇÉÅöµ½ºÍJSP×¢ÊÍÓеã¹ØϵµÄÒ»¸öÎÊÌâ¡£ËùÒÔ×ö¸ö±Ê¼Ç£¬ËµÃ÷Ò»ÏÂÏÔʽעÊÍ<!-- comments --> ºÍÒþʽעÊÍ<%-- comments --%> Ö®¼äµÄÁ½µã²î±ð¡£
 
Ôø¾­ÒÔΪÏÔʽעÊͺÍÒþʽעÊͲî±ðÖ»ÓÐÔÚ´úÂëÏÔʾÉÏ£¬ÕâµãÓ¦¸Ã´ó¼Ò¶¼ÖªµÀ£¬ÏÔʽעÊÍ»áÏÔʾÔÚ¿Í»§¶ËÒ³ÃæÔ´ÂëÖУ¬¶øÒþʽעÊÍÊÇ¿´²»µ½µÄ£¬²»¹ýÕâÖ»ÊǵÚÒ»µã¡£ ......

JSP+AJAX Ìí¼Ó¡¢É¾³ý¶àÑ¡¿ò

±¾ÀýÊDzÉÓÃJSP + Ajax + Îı¾À´ÑÝʾ¶àÑ¡¡¢È«Ñ¡£¬Ìí¼Ó¡¢É¾³ý¡¢¸üÐÂcheckbox¶àÑ¡¿òµÄЧ¹û£»³ä·ÖÕ¹ÏÖÁËÀûÓÃJavaScript¿ØÖÆHTML DOMÒÔ¼°ÀûÓÃXML http ´«µÝÊý¾Ý£¬ÀûÓÃJSP²Ù×÷Îı¾µÄЧ¹û¡£
¡¡¡¡1.JavaScript ÓÃÀ´¿ØÖÆÒ³ÃæÄÚÈݵÄÏÖʵÓëÔöɾЧ¹û£»
¡¡¡¡2.JSP×÷Ϊºǫ́£¬¶ÔÎı¾½øÐжÁÈ¡¡¢Ð´Èë¡¢¸üеȲÙ×÷£»
¡¡¡¡3.Îı¾¸ñʽÊÇÓÃÀ´´ ......

×éÆ´jsp·½·¨2

<html:html>
<HEAD>
<tiles:insert attribute="header" />
</HEAD>
<body>
<tiles:insert attribute="top" />
<table width="100%" height="400" border="0" align="center"
 cellpadding="0" cellspacing="0">
 <tr>
  <td width="178" ......

jsp visit spring


<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="ccp.suddenattack.service.news.*"%> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ