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

jspÉú³Éhtml¾²Ì¬Ò³Ãæ´úÂë

<%@ page contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*" %>
<%
//ÔÚÕâÀïÈç¹ûд³É“WEB-INF\templates\template.htm”³ÌÐò»á±¨´í
 String filePath = request.getRealPath("/")+"WEB-INF/templates/template.htm";    
 out.print(filePath);
 String templateContent="";
 FileInputStream fileinputstream = new FileInputStream(filePath);//¶ÁÈ¡Ä£¿éÎļþ
 //int lenght = fileinputstream.available();
 byte bytes[] = new byte[1024];
 fileinputstream.read(bytes);
 fileinputstream.close();
 templateContent = new String(bytes);
 out.print("ÒÔÏÂÊÇÄ£°åÄÚÈÝ£º<br>"+templateContent+"<br> ÒÔÏÂÊÇÖû»ÒÔºóµÄhtmlÄÚÈÝ<br><hr>");
 templateContent=templateContent.replaceAll("#title#","ÎÄÕ±êÌâ");
 templateContent=templateContent.replaceAll("#author#","×÷ÕßÊÇË­");//Ìæ»»µôÄ£¿éÖÐÏàÓ¦µÄµØ·½
 templateContent=templateContent.replaceAll("#content#","ÎÄÕÂÄÚÈÝ");
 // ¸ù¾Ýʱ¼äµÃÎļþÃû
 Calendar calendar = Calendar.getInstance();
 String fileame = String.valueOf(calendar.getTimeInMillis()) +".html";
 fileame = request.getRealPath("/")+fileame;//Éú³ÉµÄhtmlÎļþ±£´æ·¾¶
 out.print(templateContent);
 FileOutputStream fileoutputstream = new FileOutputStream(fileame);//½¨Á¢ÎļþÊä³öÁ÷
 byte tag_bytes[] = templateContent.getBytes();
 fileoutputstream.write(tag_bytes);
 fileoutputstream.close();
%>


Ïà¹ØÎĵµ£º

HTML 5 ½Ì³Ì(Ò») Ç°ÑÔ

       ³¬Îı¾±ê¼ÇÓïÑÔ£¨HTML£©5 µÚÒ»´ÎÏò HTML ÖÐÒýÈëеÄÔªËØ¡£ÐµĽṹԪËØ°üÀ¨ aside¡¢figure ºÍ section¡£ÐµÄÄÚÁªÔªËØ°üÀ¨ time¡¢meter ºÍ progress¡£ÐµÄÄÚǶԪËØÓÐ video ºÍ audio¡£ÐµĽ»»¥ÔªËØÓÐ details¡¢datagrid ºÍ command¡£  
¡¡¡¡³¬Îı¾±ê¼ÇÓïÑÔ£¨HTML£©µÄ¿ª·¢µ½ ......

ASPÉú³É¾²Ì¬HtmlÊ×Ò³Ô´´úÂë(³¬¾«¼ò)

<%
'µ÷ÊÔ£ºJAVAÖÐÎÄÍø:www.javaweb.cc/
'×¢Ò⣬°´ÕÕËù·ÅÖõÄĿ¼²»Í¬ÇëÐÞ¸ÄobjXmlHttpºÍÉú³ÉÊ×ҳ·¾¶
dim objXmlHttp,binFileData,objAdoStream
set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET","http://"&request.ServerVariables("HTTP_HOST")&"/index.asp",false ......

JSPÄÚÖöÔÏó

JSP µÄÄÚÖöÔÏóÓУºresquest ¡¢response¡¢session¡¢ application ¡¢out¡£ÒÔÏÂÎÒÃǽ«
Ò»Ò»½éÉÜ¡£
response ºÍrequest ¶ÔÏóÊÇJSP µÄÄÚÖöÔÏó½ÏÖØÒªµÄÁ½¸ö£¬ÕâÁ½¸ö¶ÔÏóÌṩÁ˶ԷþÎñ
Æ÷ºÍä¯ÀÀÆ÷ͨÐÅ·½·¨µÄ¿ØÖÆ¡£Ö±½ÓÌÖÂÛÕâÁ½¸ö¶ÔÏóÇ°£¬ÒªÏȶÔHTTP ЭÒé----Word Wide
Webµ×²ãЭÒé×÷¼òµ¥½éÉÜ¡£
Word Wide WebÊÇÔõÑùÔËÐеÄÄØ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ