锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲成AV人片在线观看无,亚洲av片在线观看,亚洲精品国产专区91在线http://www.tkk7.com/chenglu/category/37906.htmlIT fans,Java Programmer,Your partner......zh-cnThu, 25 Mar 2010 17:28:07 GMTThu, 25 Mar 2010 17:28:07 GMT60jsp鍒ゆ柇resultset鏄惁涓虹┖http://www.tkk7.com/chenglu/archive/2010/03/22/jsp-rs-null.htmlJava瀹呯敺Java瀹呯敺Mon, 22 Mar 2010 13:24:00 GMThttp://www.tkk7.com/chenglu/archive/2010/03/22/jsp-rs-null.htmlhttp://www.tkk7.com/chenglu/comments/316211.htmlhttp://www.tkk7.com/chenglu/archive/2010/03/22/jsp-rs-null.html#Feedback0http://www.tkk7.com/chenglu/comments/commentRss/316211.htmlhttp://www.tkk7.com/chenglu/services/trackbacks/316211.html1
2if(rs.isAfterLast()==rs.isBeforeFirst()){
3    out.print("鎮ㄦ墍鏌ユ壘鐨勪俊鎭笉瀛樺湪錛岃紜鍚庡啀鏌ユ壘!");
4    }
else{
5
6}


Java瀹呯敺 2010-03-22 21:24 鍙戣〃璇勮
]]>
浣庤皟鐨刟pache fileUpload搴旂敤http://www.tkk7.com/chenglu/archive/2009/09/23/apache_fileUpload.htmlJava瀹呯敺Java瀹呯敺Wed, 23 Sep 2009 04:08:00 GMThttp://www.tkk7.com/chenglu/archive/2009/09/23/apache_fileUpload.htmlhttp://www.tkk7.com/chenglu/comments/296145.htmlhttp://www.tkk7.com/chenglu/archive/2009/09/23/apache_fileUpload.html#Feedback0http://www.tkk7.com/chenglu/comments/commentRss/296145.htmlhttp://www.tkk7.com/chenglu/services/trackbacks/296145.html 鐜板皢涓搴旂敤璐村嚭
FileUploadServlet.java
 1 package Servlet;
 2 
 3 import java.io.File;
 4 import java.io.IOException;
 5 import java.util.Iterator;
 6 import java.util.List;
 7  
 8 import javax.servlet.ServletException;
 9 import javax.servlet.http.HttpServlet;
10 import javax.servlet.http.HttpServletRequest;
11 import javax.servlet.http.HttpServletResponse;
12  
13 import org.apache.commons.fileupload.FileItem;
14 import org.apache.commons.fileupload.disk.DiskFileItemFactory;
15 import org.apache.commons.fileupload.servlet.ServletFileUpload;
16  
17 @SuppressWarnings("serial")
18 public class FileUploadServlet extends HttpServlet {
19     private String uploadPath = "D:\\temp"// 涓婁紶鏂囦歡鐨勭洰褰?/span>
20     private String tempPath = "d:\\temp\\buffer\\"// 涓存椂鏂囦歡鐩綍
21     File tempPathFile;
22  
23     @SuppressWarnings("unchecked")
24     public void doPost(HttpServletRequest request, HttpServletResponse response)
25            throws IOException, ServletException {
26        try {
27            // Create a factory for disk-based file items
28            DiskFileItemFactory factory = new DiskFileItemFactory();
29  
30            // Set factory constraints
31            factory.setSizeThreshold(4096); // 璁劇疆緙撳啿鍖哄ぇ灝忥紝榪欓噷鏄?kb
32            factory.setRepository(tempPathFile);// 璁劇疆緙撳啿鍖虹洰褰?br /> 33  
34            // Create a new file upload handler
35            ServletFileUpload upload = new ServletFileUpload(factory);
36  
37            // Set overall request size constraint
38            upload.setSizeMax(4194304); // 璁劇疆鏈澶ф枃浠跺昂瀵革紝榪欓噷鏄?MB
39  
40            List<FileItem> items = upload.parseRequest(request);// 寰楀埌鎵鏈夌殑鏂囦歡
41            Iterator<FileItem> i = items.iterator();
42            while (i.hasNext()) {
43               FileItem fi = (FileItem) i.next();
44               String fileName = fi.getName();
45               if (fileName != null) {
46                   File fullFile = new File(fi.getName());
47                   File savedFile = new File(uploadPath, fullFile.getName());
48                   fi.write(savedFile);
49               }
50            }
51            System.out.print("upload succeed");
52        } catch (Exception e) {
53            // 鍙互璺寵漿鍑洪敊欏甸潰
54            e.printStackTrace();
55        }
56     }
57  
58     public void init() throws ServletException {
59        File uploadFile = new File(uploadPath);
60        if (!uploadFile.exists()) {
61            uploadFile.mkdirs();
62        }
63        File tempPathFile = new File(tempPath);
64         if (!tempPathFile.exists()) {
65            tempPathFile.mkdirs();
66        }
67     }
68 }
upload欏甸潰錛?br />
1 <form name="myform" action="FileUpload" method="post" enctype="multipart/form-data">
2 File:<br>
3   <input type="file" name="myfile"><br>
4   <br>
5    <input type="submit" name="submit" value="Commit">
6 </form>

涓鑸潵璇達紝瑕佷嬌鐢╝pache fileUpload榪欎釜鎻掍歡錛屼竴鑸瀵煎叆涓や釜jar鍖?br /> commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
濡傛灉榪欎釜io鍖呮病鏈夊鍏ヨ矊浼間究浼氭姤閿欍?br /> 鐐瑰嚮涓嬭澆榪欎袱涓寘鐨勬渶鏂扮増銆?br /> /Files/chenglu/java/FileUpLoad.zip


Java瀹呯敺 2009-09-23 12:08 鍙戣〃璇勮
]]>
涓涓笉浼氭姤閿欑殑jsp褰╄壊楠岃瘉鐮佺▼搴?/title><link>http://www.tkk7.com/chenglu/archive/2009/09/22/no_err_jsp_code.html</link><dc:creator>Java瀹呯敺</dc:creator><author>Java瀹呯敺</author><pubDate>Tue, 22 Sep 2009 06:52:00 GMT</pubDate><guid>http://www.tkk7.com/chenglu/archive/2009/09/22/no_err_jsp_code.html</guid><wfw:comment>http://www.tkk7.com/chenglu/comments/296027.html</wfw:comment><comments>http://www.tkk7.com/chenglu/archive/2009/09/22/no_err_jsp_code.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.tkk7.com/chenglu/comments/commentRss/296027.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/chenglu/services/trackbacks/296027.html</trackback:ping><description><![CDATA[涓涓笉浼氭姤閿欑殑jsp褰╄壊楠岃瘉鐮佺▼搴?br /> 涓鑸殑錛屼細鎶ervlet閿欒錛?br /> getOutputStream() has already been called for this response<br /> 浣嗘槸榪欎釜紼嬪簭涓嶄細鎶ラ敊錛屽師鍥犳槸鎶婇噷闈㈢殑絀烘牸閮藉垹闄?br /> -------------------------------------------------------------<br /> 鍦╰omcat涓璲sp緙栬瘧鎴恠ervlet涔嬪悗鍦ㄥ嚱鏁癬jspService(HttpServletRequest request, HttpServletResponse <span id="qjillxo" class="hilite8">response</span>)鐨勬渶鍚?br /> 鏈変竴孌佃繖鏍風殑浠g爜<br /> finally {<br />       if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);<br />     }<br /> 榪欓噷鏄湪閲婃斁鍦╦sp涓嬌鐢ㄧ殑瀵硅薄錛屼細璋冪敤<span id="fjxcuvk" class="hilite8">response</span>.getWriter(),鍥犱負榪欎釜鏂規硶鏄拰<br /> <span id="bcsljkt" class="hilite8">response</span>.<span id="ywyxdrf" class="undefined">getOutputStream</span>()鐩稿啿紿佺殑錛佹墍浠ヤ細鍑虹幇浠ヤ笂榪欎釜寮傚父銆? <p>鐒跺悗褰撶劧鏄鎻愬嚭瑙e喅鐨勫姙娉曪紝鍏跺疄鎸虹畝鍗曠殑錛堝茍涓嶆槸鍜屾煇浜涙湅鍙嬭鐨勯偅鏍?-<br /> 灝唈sp鍐呯殑鎵鏈夌┖鏍煎拰鍥炶濺絎﹀彿鎵鏈夐兘鍒犻櫎鎺夛級錛?/p> <p>鍦ㄤ嬌鐢ㄥ畬杈撳嚭嫻佷互鍚庤皟鐢ㄤ互涓嬩袱琛屼唬鐮佸嵆鍙細<br /> out.clear();<br /> out = pageContext.pushBody();<br /> </p> --------------------------------------------------------<br /> 鍒嗗壊綰垮唴涓哄紩鐢綖<br /> <br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000"><%</span><span style="color: #000000">@ page  </span><span style="color: #0000ff">import</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">%></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><%</span><span style="color: #000000">@ page </span><span style="color: #0000ff">import</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">java.io.OutputStream</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">%></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><%!</span><span style="color: #000000"><br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img id="Codehighlighter1_157_348_Open_Image" onclick="this.style.display='none'; Codehighlighter1_157_348_Open_Text.style.display='none'; Codehighlighter1_157_348_Closed_Image.style.display='inline'; Codehighlighter1_157_348_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_157_348_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_157_348_Closed_Text.style.display='none'; Codehighlighter1_157_348_Open_Image.style.display='inline'; Codehighlighter1_157_348_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" />Color getRandColor(</span><span style="color: #0000ff">int</span><span style="color: #000000"> fc,</span><span style="color: #0000ff">int</span><span style="color: #000000"> bc)</span><span id="Codehighlighter1_157_348_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_157_348_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />Random random </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Random();<br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">if</span><span style="color: #000000">(fc</span><span style="color: #000000">></span><span style="color: #000000">255</span><span style="color: #000000">) fc</span><span style="color: #000000">=</span><span style="color: #000000">255</span><span style="color: #000000">;<br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">if</span><span style="color: #000000">(bc</span><span style="color: #000000">></span><span style="color: #000000">255</span><span style="color: #000000">) bc</span><span style="color: #000000">=</span><span style="color: #000000">255</span><span style="color: #000000">;<br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> r</span><span style="color: #000000">=</span><span style="color: #000000">fc</span><span style="color: #000000">+</span><span style="color: #000000">random.nextInt(bc</span><span style="color: #000000">-</span><span style="color: #000000">fc);<br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> g</span><span style="color: #000000">=</span><span style="color: #000000">fc</span><span style="color: #000000">+</span><span style="color: #000000">random.nextInt(bc</span><span style="color: #000000">-</span><span style="color: #000000">fc);<br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> b</span><span style="color: #000000">=</span><span style="color: #000000">fc</span><span style="color: #000000">+</span><span style="color: #000000">random.nextInt(bc</span><span style="color: #000000">-</span><span style="color: #000000">fc);<br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Color(r,g,b);<br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000">%></span><span style="color: #000000"><br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><%</span><span style="color: #000000"><br /> </span><span style="color: #008080">15</span><span style="color: #000000"><img id="Codehighlighter1_359_1448_Open_Image" onclick="this.style.display='none'; Codehighlighter1_359_1448_Open_Text.style.display='none'; Codehighlighter1_359_1448_Closed_Image.style.display='inline'; Codehighlighter1_359_1448_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_359_1448_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_359_1448_Closed_Text.style.display='none'; Codehighlighter1_359_1448_Open_Image.style.display='inline'; Codehighlighter1_359_1448_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">try</span><span id="Codehighlighter1_359_1448_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_359_1448_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />response.setHeader(</span><span style="color: #000000">"</span><span style="color: #000000">Pragma</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">No-cache</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />response.setHeader(</span><span style="color: #000000">"</span><span style="color: #000000">Cache-Control</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">no-cache</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />response.setDateHeader(</span><span style="color: #000000">"</span><span style="color: #000000">Expires</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">0</span><span style="color: #000000">);<br /> </span><span style="color: #008080">19</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> width</span><span style="color: #000000">=</span><span style="color: #000000">60</span><span style="color: #000000">, height</span><span style="color: #000000">=</span><span style="color: #000000">20</span><span style="color: #000000">;<br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />BufferedImage image </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);<br /> </span><span style="color: #008080">21</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />OutputStream os</span><span style="color: #000000">=</span><span style="color: #000000">response.getOutputStream();<br /> </span><span style="color: #008080">22</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />Graphics g </span><span style="color: #000000">=</span><span style="color: #000000"> image.getGraphics();<br /> </span><span style="color: #008080">23</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />Random random </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Random();<br /> </span><span style="color: #008080">24</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />g.setColor(getRandColor(</span><span style="color: #000000">200</span><span style="color: #000000">,</span><span style="color: #000000">250</span><span style="color: #000000">));<br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />g.fillRect(</span><span style="color: #000000">0</span><span style="color: #000000">, </span><span style="color: #000000">0</span><span style="color: #000000">, width, height);<br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />g.setFont(</span><span style="color: #0000ff">new</span><span style="color: #000000"> Font(</span><span style="color: #000000">"</span><span style="color: #000000">Times New Roman</span><span style="color: #000000">"</span><span style="color: #000000">,Font.PLAIN,</span><span style="color: #000000">18</span><span style="color: #000000">));<br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />g.setColor(getRandColor(</span><span style="color: #000000">160</span><span style="color: #000000">,</span><span style="color: #000000">200</span><span style="color: #000000">));<br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> i</span><span style="color: #000000">=</span><span style="color: #000000">0</span><span style="color: #000000">;i</span><span style="color: #000000"><</span><span style="color: #000000">155</span><span style="color: #000000">;i</span><span style="color: #000000">++</span><span style="color: #000000">)<br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img id="Codehighlighter1_887_1037_Open_Image" onclick="this.style.display='none'; Codehighlighter1_887_1037_Open_Text.style.display='none'; Codehighlighter1_887_1037_Closed_Image.style.display='inline'; Codehighlighter1_887_1037_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_887_1037_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_887_1037_Closed_Text.style.display='none'; Codehighlighter1_887_1037_Open_Image.style.display='inline'; Codehighlighter1_887_1037_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_887_1037_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_887_1037_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">31</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> x </span><span style="color: #000000">=</span><span style="color: #000000"> random.nextInt(width);<br /> </span><span style="color: #008080">32</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> y </span><span style="color: #000000">=</span><span style="color: #000000"> random.nextInt(height);<br /> </span><span style="color: #008080">33</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> xl </span><span style="color: #000000">=</span><span style="color: #000000"> random.nextInt(</span><span style="color: #000000">12</span><span style="color: #000000">);<br /> </span><span style="color: #008080">34</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> yl </span><span style="color: #000000">=</span><span style="color: #000000"> random.nextInt(</span><span style="color: #000000">12</span><span style="color: #000000">);<br /> </span><span style="color: #008080">35</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />g.drawLine(x,y,x</span><span style="color: #000000">+</span><span style="color: #000000">xl,y</span><span style="color: #000000">+</span><span style="color: #000000">yl);<br /> </span><span style="color: #008080">36</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">37</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />String sRand</span><span style="color: #000000">=</span><span style="color: #000000">""</span><span style="color: #000000">;<br /> </span><span style="color: #008080">38</span><span style="color: #000000"><img id="Codehighlighter1_1077_1263_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1077_1263_Open_Text.style.display='none'; Codehighlighter1_1077_1263_Closed_Image.style.display='inline'; Codehighlighter1_1077_1263_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1077_1263_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1077_1263_Closed_Text.style.display='none'; Codehighlighter1_1077_1263_Open_Image.style.display='inline'; Codehighlighter1_1077_1263_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> i</span><span style="color: #000000">=</span><span style="color: #000000">0</span><span style="color: #000000">;i</span><span style="color: #000000"><</span><span style="color: #000000">4</span><span style="color: #000000">;i</span><span style="color: #000000">++</span><span style="color: #000000">)</span><span id="Codehighlighter1_1077_1263_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1077_1263_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">39</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />String rand</span><span style="color: #000000">=</span><span style="color: #000000">String.valueOf(random.nextInt(</span><span style="color: #000000">10</span><span style="color: #000000">));<br /> </span><span style="color: #008080">40</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />sRand</span><span style="color: #000000">+=</span><span style="color: #000000">rand;<br /> </span><span style="color: #008080">41</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />g.setColor(</span><span style="color: #0000ff">new</span><span style="color: #000000"> Color(</span><span style="color: #000000">20</span><span style="color: #000000">+</span><span style="color: #000000">random.nextInt(</span><span style="color: #000000">110</span><span style="color: #000000">),</span><span style="color: #000000">20</span><span style="color: #000000">+</span><span style="color: #000000">random.nextInt(</span><span style="color: #000000">110</span><span style="color: #000000">),</span><span style="color: #000000">20</span><span style="color: #000000">+</span><span style="color: #000000">random.nextInt(</span><span style="color: #000000">110</span><span style="color: #000000">)));<br /> </span><span style="color: #008080">42</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />g.drawString(rand,</span><span style="color: #000000">13</span><span style="color: #000000">*</span><span style="color: #000000">i</span><span style="color: #000000">+</span><span style="color: #000000">6</span><span style="color: #000000">,</span><span style="color: #000000">16</span><span style="color: #000000">);<br /> </span><span style="color: #008080">43</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">44</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />session.setAttribute(</span><span style="color: #000000">"</span><span style="color: #000000">rand</span><span style="color: #000000">"</span><span style="color: #000000">,sRand);<br /> </span><span style="color: #008080">45</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />g.dispose();<br /> </span><span style="color: #008080">46</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> </span><span style="color: #008080">47</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />ImageIO.write(image, </span><span style="color: #000000">"</span><span style="color: #000000">JPEG</span><span style="color: #000000">"</span><span style="color: #000000">,os);<br /> </span><span style="color: #008080">48</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />os.flush();<br /> </span><span style="color: #008080">49</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />os.close();<br /> </span><span style="color: #008080">50</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />os</span><span style="color: #000000">=</span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> </span><span style="color: #008080">51</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />response.flushBuffer();<br /> </span><span style="color: #008080">52</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />out.clear();<br /> </span><span style="color: #008080">53</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />out </span><span style="color: #000000">=</span><span style="color: #000000"> pageContext.pushBody();<br /> </span><span style="color: #008080">54</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">55</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">catch</span><span style="color: #000000">(IllegalStateException e)<br /> </span><span style="color: #008080">56</span><span style="color: #000000"><img id="Codehighlighter1_1481_1540_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1481_1540_Open_Text.style.display='none'; Codehighlighter1_1481_1540_Closed_Image.style.display='inline'; Codehighlighter1_1481_1540_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1481_1540_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1481_1540_Closed_Text.style.display='none'; Codehighlighter1_1481_1540_Open_Image.style.display='inline'; Codehighlighter1_1481_1540_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_1481_1540_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1481_1540_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">57</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />System.out.println(e.getMessage());<br /> </span><span style="color: #008080">58</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />e.printStackTrace();<br /> </span><span style="color: #008080">59</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000">%></span><span style="color: #000000"><br /> </span><span style="color: #008080">60</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <img src ="http://www.tkk7.com/chenglu/aggbug/296027.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/chenglu/" target="_blank">Java瀹呯敺</a> 2009-09-22 14:52 <a href="http://www.tkk7.com/chenglu/archive/2009/09/22/no_err_jsp_code.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>璋佸彲浠ュ府鎴戜竴涓嬶紵ewebeditor椋為奔淇敼鐗堥棶棰橈紒http://www.tkk7.com/chenglu/archive/2009/05/05/ewebeditor.htmlJava瀹呯敺Java瀹呯敺Tue, 05 May 2009 11:13:00 GMThttp://www.tkk7.com/chenglu/archive/2009/05/05/ewebeditor.htmlhttp://www.tkk7.com/chenglu/comments/269043.htmlhttp://www.tkk7.com/chenglu/archive/2009/05/05/ewebeditor.html#Feedback0http://www.tkk7.com/chenglu/comments/commentRss/269043.htmlhttp://www.tkk7.com/chenglu/services/trackbacks/269043.html鏂囦歡涓婁紶鐨勬椂鍊欙紝鎶ラ敊

 1Status 500 - 
 2
 3--------------------------------------------------------------------------------
 4
 5type Exception report
 6
 7message 
 8
 9description The server encountered an internal error () that prevented it from fulfilling this request.
10
11exception 
12
13org.apache.jasper.JasperException: An exception occurred processing JSP page /upload.jsp at line 302
14
15299:         if (!myFile.isMissing()) {
16300:             FileName=(String)date.Time_Stamp();
17301:             sOriginalFileName=myFile.getFileName();
18302:             myFile.saveAs("/"+sUploadDir+FileName+"."+myFile.getFileExt());
19303:             sSaveFileName=FileName+"."+myFile.getFileExt();
20304:             sPathFileName=sUploadDir+sSaveFileName;
21305:             System.out.println(sPathFileName);
22
23
24Stacktrace:
25    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
26    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
27    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
28    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
29    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
30    sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
31    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
32    java.lang.reflect.Method.invoke(Method.java:597)
33    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
34    java.security.AccessController.doPrivileged(Native Method)
35    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
36    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
37    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
38
39
40root cause 
41
42java.security.AccessControlException: access denied (java.io.FilePermission \UploadFile read)
43    java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
44    java.security.AccessController.checkPermission(AccessController.java:546)
45    java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
46    java.lang.SecurityManager.checkRead(SecurityManager.java:871)
47    java.io.File.exists(File.java:731)
48    com.jspsmart.upload.SmartUpload.getPhysicalPath(SmartUpload.java:1067)
49    com.jspsmart.upload.File.saveAs(File.java:91)
50    com.jspsmart.upload.File.saveAs(File.java:65)
51    org.apache.jsp.upload_jsp._jspService(upload_jsp.java:376)
52    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
53    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
54    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
55    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
56    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
57    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
58    sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
59    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
60    java.lang.reflect.Method.invoke(Method.java:597)
61    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
62    java.security.AccessController.doPrivileged(Native Method)
63    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
64    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
65    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
66
67
68note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
69
70
71--------------------------------------------------------------------------------
72
73Apache Tomcat/6.0.18

姝e父涓婁紶tomcat鐨勬彁紺烘槸錛?br /> gif|jpg|jpeg|bmp|GIF|JPG|JPEG|BMP500
UploadFile/20090505063838906.jpg
寮傚父鐨勬椂鍊欐槸錛?br /> gif|jpg|jpeg|bmp|GIF|JPG|JPEG|BMP500
UploadFile/
鑻︽伡涓?#8230;………

Java瀹呯敺 2009-05-05 19:13 鍙戣〃璇勮
]]>
jsp-sessionhttp://www.tkk7.com/chenglu/archive/2009/03/05/jsp-session.htmlJava瀹呯敺Java瀹呯敺Thu, 05 Mar 2009 07:47:00 GMThttp://www.tkk7.com/chenglu/archive/2009/03/05/jsp-session.htmlhttp://www.tkk7.com/chenglu/comments/258020.htmlhttp://www.tkk7.com/chenglu/archive/2009/03/05/jsp-session.html#Feedback0http://www.tkk7.com/chenglu/comments/commentRss/258020.htmlhttp://www.tkk7.com/chenglu/services/trackbacks/258020.htmlsession浠庣涓涓〉闈紶鍒扮浜屼釜

鐪嬩唬鐮侊細

 1<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 3<html xmlns="http://www.w3.org/1999/xhtml">
 4<head>
 5<meta http-equiv="Content-Type" content="text/html; Charset=gb2312" />
 6<title>鏃犳爣棰樻枃妗?/span></title>
 7</head>
 8
 9<body>
10<form action="" name="form1" method="post">
11  <p>鍦板潃錛?br /> 12    <input type="text" name="useradd" />
13    <br>
14    <br>
15閭紪錛?br /> 16<input type="text" name="code" />
17  </p>
18  <p>鎮ㄧ殑濮撳悕錛?br /> 19  <input type="text" name="username"/></p>
20  <p>
21    <input type="submit" value="淇濆瓨" />
22    </p>
23</form>
24<% 
25String useradd = request.getParameter("useradd");
26String code = request.getParameter("code");
27
28if(useradd!=null){
29String username = request.getParameter("username");
30session.setAttribute("csname",username);
31out.println("鎮ㄥ~鍐欑殑鍦板潃鏄?"+useradd);
32out.println("<br><br>");
33out.println("鎮ㄥ~鍐欑殑閭紪鏄?"+code);
34out.println("<p><a href=\"check.jsp\">涓嬩竴姝?lt;/a>");
35}
36 
%>
37
38</body>
39</html>
40
欏甸潰2錛歝heck.jsp
 1<%@ page contentType="text/html; charset=gb2312" language="java" %>
 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 3<html xmlns="http://www.w3.org/1999/xhtml">
 4<head>
 5<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 6<title>鏃犳爣棰樻枃妗?/span></title>
 7</head>
 8<body>
 9<% 
10String csname=(String)session.getAttribute("csname");
11out.println(csname);
12 
%>
13 
14</body>
15</html>
16


Java瀹呯敺 2009-03-05 15:47 鍙戣〃璇勮
]]>
JSP-response緇冧範 錛堝皬瀛︽牎灝忚鍫傚皬緇冧範錛?/title><link>http://www.tkk7.com/chenglu/archive/2009/03/03/JSP-response.html</link><dc:creator>Java瀹呯敺</dc:creator><author>Java瀹呯敺</author><pubDate>Tue, 03 Mar 2009 03:30:00 GMT</pubDate><guid>http://www.tkk7.com/chenglu/archive/2009/03/03/JSP-response.html</guid><wfw:comment>http://www.tkk7.com/chenglu/comments/257497.html</wfw:comment><comments>http://www.tkk7.com/chenglu/archive/2009/03/03/JSP-response.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/chenglu/comments/commentRss/257497.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/chenglu/services/trackbacks/257497.html</trackback:ping><description><![CDATA[first錛?br /> index.html<br /> <br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff"><!</span><span style="color: #ff00ff">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">html </span><span style="color: #ff0000">xmlns</span><span style="color: #0000ff">="http://www.w3.org/1999/xhtml"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">head</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">meta </span><span style="color: #ff0000">http-equiv</span><span style="color: #0000ff">="Content-Type"</span><span style="color: #ff0000"> content</span><span style="color: #0000ff">="text/html; charset=gb2312"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">title</span><span style="color: #0000ff">></span><span style="color: #000000">棣栭〉</span><span style="color: #0000ff"></</span><span style="color: #800000">title</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">head</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">body</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">form </span><span style="color: #ff0000">action</span><span style="color: #0000ff">="check.jsp"</span><span style="color: #ff0000"> method</span><span style="color: #0000ff">="post"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">p</span><span style="color: #0000ff">></span><span style="color: #000000">杈撳叆鎮ㄧ殑鐢ㄦ埛鍚?br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" />  </span><span style="color: #0000ff"><</span><span style="color: #800000">input </span><span style="color: #ff0000">type</span><span style="color: #0000ff">="text"</span><span style="color: #ff0000"> name</span><span style="color: #0000ff">="username"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">p</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">p</span><span style="color: #0000ff">></span><span style="color: #000000">杈撳叆鎮ㄧ殑瀵嗙爜錛?br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" />  </span><span style="color: #0000ff"><</span><span style="color: #800000">input </span><span style="color: #ff0000">name</span><span style="color: #0000ff">="pwd"</span><span style="color: #ff0000"> type</span><span style="color: #0000ff">="password"</span><span style="color: #ff0000"> value</span><span style="color: #0000ff">=""</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"><br /> </span><span style="color: #008080">15</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">p</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">input </span><span style="color: #ff0000">type</span><span style="color: #0000ff">="submit"</span><span style="color: #ff0000"> value</span><span style="color: #0000ff">="check it!"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"><br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">form</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">body</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">19</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">html</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <br /> second:<br /> check.jsp<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img id="Codehighlighter1_2_97_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2_97_Open_Text.style.display='none'; Codehighlighter1_2_97_Closed_Image.style.display='inline'; Codehighlighter1_2_97_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_2_97_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2_97_Closed_Text.style.display='none'; Codehighlighter1_2_97_Open_Image.style.display='inline'; Codehighlighter1_2_97_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #000000; background-color: #ffff00"><%</span><span id="Codehighlighter1_2_97_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2_97_Open_Text"><span style="color: #000000; background-color: #f5f5f5">@ page contentType</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">text/html; charset=gb2312</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> language</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">java</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> import</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">java.sql.*</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> errorPage</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">""</span><span style="color: #000000; background-color: #f5f5f5"> </span></span><span style="color: #000000; background-color: #ffff00">%></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><!</span><span style="color: #ff00ff">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">html </span><span style="color: #ff0000">xmlns</span><span style="color: #0000ff">="http://www.w3.org/1999/xhtml"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">head</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">meta </span><span style="color: #ff0000">http-equiv</span><span style="color: #0000ff">="Content-Type"</span><span style="color: #ff0000"> content</span><span style="color: #0000ff">="text/html; charset=gb2312"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #008000"><!--</span><span style="color: #008000"> TemplateBeginEditable name="doctitle" </span><span style="color: #008000">--></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">title</span><span style="color: #0000ff">></span><span style="color: #000000">checking<img src="http://www.tkk7.com/Images/dot.gif" alt="" />.</span><span style="color: #0000ff"></</span><span style="color: #800000">title</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #008000"><!--</span><span style="color: #008000"> TemplateEndEditable </span><span style="color: #008000">--></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #008000"><!--</span><span style="color: #008000"> TemplateBeginEditable name="head" </span><span style="color: #008000">--></span><span style="color: #000000"><br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #008000"><!--</span><span style="color: #008000"> TemplateEndEditable </span><span style="color: #008000">--></span><span style="color: #000000"><br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">head</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">body</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img id="Codehighlighter1_539_689_Open_Image" style="display: inline" onclick="this.style.display='none'; Codehighlighter1_539_689_Open_Text.style.display='none'; Codehighlighter1_539_689_Closed_Image.style.display='inline'; Codehighlighter1_539_689_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_539_689_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_539_689_Closed_Text.style.display='none'; Codehighlighter1_539_689_Open_Image.style.display='inline'; Codehighlighter1_539_689_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span style="color: #000000; background-color: #ffff00"><%</span><span id="Codehighlighter1_539_689_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_539_689_Open_Text" style="display: inline"><span style="color: #000000; background-color: #f5f5f5"> <br /> </span><span style="color: #008080">15</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> <br /> </span><span style="color: #008080">16</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> </span><span style="color: #0000ff; background-color: #f5f5f5">if</span><span style="color: #000000; background-color: #f5f5f5">(request.getParameter(</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">username</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">).equals(</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">admin</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">)){<br /> </span><span style="color: #008080">17</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> response.sendRedirect(</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">admin.jsp</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">);<br /> </span><span style="color: #008080">18</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> }<br /> </span><span style="color: #008080">19</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> </span><span style="color: #0000ff; background-color: #f5f5f5">else</span><span style="color: #000000; background-color: #f5f5f5">{<br /> </span><span style="color: #008080">20</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> response.sendRedirect(</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">welcome.jsp</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">);<br /> </span><span style="color: #008080">21</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /> }<br /> </span><span style="color: #008080">22</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> </span><span style="color: #008080">23</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> </span><span style="color: #008080">24</span><span style="color: #000000; background-color: #f5f5f5"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" /> </span></span><span style="color: #000000; background-color: #ffff00">%></span><span style="color: #000000"><br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">body</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">html</span><span style="color: #0000ff">></span></div> <br /> result Page:<br /> user Page:welcome.jsp<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img id="Codehighlighter1_2_97_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2_97_Open_Text.style.display='none'; Codehighlighter1_2_97_Closed_Image.style.display='inline'; Codehighlighter1_2_97_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_2_97_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2_97_Closed_Text.style.display='none'; Codehighlighter1_2_97_Open_Image.style.display='inline'; Codehighlighter1_2_97_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #000000; background-color: #ffff00"><%</span><span id="Codehighlighter1_2_97_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2_97_Open_Text"><span style="color: #000000; background-color: #f5f5f5">@ page contentType</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">text/html; charset=gb2312</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> language</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">java</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> import</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">java.sql.*</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> errorPage</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">""</span><span style="color: #000000; background-color: #f5f5f5"> </span></span><span style="color: #000000; background-color: #ffff00">%></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><!</span><span style="color: #ff00ff">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">html </span><span style="color: #ff0000">xmlns</span><span style="color: #0000ff">="http://www.w3.org/1999/xhtml"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">head</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">meta </span><span style="color: #ff0000">http-equiv</span><span style="color: #0000ff">="Content-Type"</span><span style="color: #ff0000"> content</span><span style="color: #0000ff">="text/html; charset=gb2312"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">title</span><span style="color: #0000ff">></span><span style="color: #000000">鏃犳爣棰樻枃妗?/span><span style="color: #0000ff"></</span><span style="color: #800000">title</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">head</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">body</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">h1</span><span style="color: #0000ff">></span><span style="color: #000000">u r welcome!</span><span style="color: #0000ff"><</span><span style="color: #800000">br</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" />嬈㈣繋榪涘叆鐢ㄦ埛浼氬憳涓績</span><span style="color: #0000ff"></</span><span style="color: #800000">h1</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">body</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">html</span><span style="color: #0000ff">></span></div> <br /> admin Page:<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img id="Codehighlighter1_2_97_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2_97_Open_Text.style.display='none'; Codehighlighter1_2_97_Closed_Image.style.display='inline'; Codehighlighter1_2_97_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_2_97_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2_97_Closed_Text.style.display='none'; Codehighlighter1_2_97_Open_Image.style.display='inline'; Codehighlighter1_2_97_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #000000; background-color: #ffff00"><%</span><span id="Codehighlighter1_2_97_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2_97_Open_Text"><span style="color: #000000; background-color: #f5f5f5">@ page contentType</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">text/html; charset=gb2312</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> language</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">java</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> import</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5">java.sql.*</span><span style="color: #000000; background-color: #f5f5f5">"</span><span style="color: #000000; background-color: #f5f5f5"> errorPage</span><span style="color: #000000; background-color: #f5f5f5">=</span><span style="color: #000000; background-color: #f5f5f5">""</span><span style="color: #000000; background-color: #f5f5f5"> </span></span><span style="color: #000000; background-color: #ffff00">%></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><!</span><span style="color: #ff00ff">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">html </span><span style="color: #ff0000">xmlns</span><span style="color: #0000ff">="http://www.w3.org/1999/xhtml"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">head</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">meta </span><span style="color: #ff0000">http-equiv</span><span style="color: #0000ff">="Content-Type"</span><span style="color: #ff0000"> content</span><span style="color: #0000ff">="text/html; charset=gb2312"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">title</span><span style="color: #0000ff">></span><span style="color: #000000">Admin</span><span style="color: #0000ff"></</span><span style="color: #800000">title</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">head</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">body</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"><</span><span style="color: #800000">h1</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" />榪欓噷鏄悗鍙扮鐞?/span><span style="color: #0000ff"></</span><span style="color: #800000">h1</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">body</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff"></</span><span style="color: #800000">html</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <img src ="http://www.tkk7.com/chenglu/aggbug/257497.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/chenglu/" target="_blank">Java瀹呯敺</a> 2009-03-03 11:30 <a href="http://www.tkk7.com/chenglu/archive/2009/03/03/JSP-response.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>JSP---request鏂規硶http://www.tkk7.com/chenglu/archive/2009/02/26/jsp-helloworld.htmlJava瀹呯敺Java瀹呯敺Thu, 26 Feb 2009 06:31:00 GMThttp://www.tkk7.com/chenglu/archive/2009/02/26/jsp-helloworld.htmlhttp://www.tkk7.com/chenglu/comments/256813.htmlhttp://www.tkk7.com/chenglu/archive/2009/02/26/jsp-helloworld.html#Feedback0http://www.tkk7.com/chenglu/comments/commentRss/256813.htmlhttp://www.tkk7.com/chenglu/services/trackbacks/256813.html 1<form name = "form1" method = "post" action = "doit.jsp">
 2//鎵鏈夌殑琛ㄥ崟紼嬪簭蹇呴』鍐欏湪form琛ㄥ崟閲?/span>
 3<input type = "checkbox" name = "color" value = "color"綰㈣壊>
 4<input type = "checkbox" name = "color" value = "green"緇胯壊>
 5<input type = "checkbox" name = "color" value = "yellow"榛勮壊>
 6</form>
 7
 8
 9
10doit.jsp
11<%@ page contentType = "text/html";Charset = GBK; %>
12<%
13String color[] = request.getParameterValues("color");
14for(int i = 0;i<=color.length-1;i++){
15out.println("color"+color[i]+" ");
16}

17%>
18//request.getParameterValues("color")闇瑕佺敤鏁扮粍鏉ユ帴鏀?nbsp; 

]]>
主站蜘蛛池模板: 久久er国产精品免费观看2| 免费精品一区二区三区在线观看 | 欧洲亚洲国产清在高| 在线精品亚洲一区二区| 国产成人AV免费观看| 免费人成视频x8x8入口| youjizz亚洲| 99视频精品全部免费观看| 亚洲精品tv久久久久| 亚洲熟女综合色一区二区三区| 日本在线免费观看| 亚洲成AⅤ人影院在线观看| 亚洲AV无码成人专区| 污污网站免费观看| 亚洲欧洲日产国码一级毛片| 亚洲另类无码一区二区三区| 亚洲视频免费播放| 亚洲av无码一区二区三区不卡| 人妻免费久久久久久久了| 国产高清在线精品免费软件| 亚洲av午夜精品无码专区| 免费国产黄网站在线观看 | 亚洲丰满熟女一区二区v| 久久综合九色综合97免费下载| 国产精品亚洲二区在线观看| 亚洲AV无码一区二区三区牲色| 免费无码又爽又刺激聊天APP| 77777_亚洲午夜久久多人| 免费看黄的成人APP| 国产亚洲老熟女视频| 一进一出60分钟免费视频| 国产一级淫片免费播放| 亚洲AV无码一区二区三区电影| 无码免费午夜福利片在线| 亚洲国产日韩在线成人蜜芽| 999任你躁在线精品免费不卡| 亚洲av日韩综合一区在线观看| 嫩草在线视频www免费看| 国产V亚洲V天堂A无码| a色毛片免费视频| 亚洲乱码中文字幕综合|