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

jsp¾²Ì¬»¯ºÍα¾²Ì¬»¯

Ê×ÏÈ˵˵ΪʲôҪ¾²Ì¬»¯¡£
¶ÔÓÚÏÖÔÚµÄWeb ApplicationÀ´Ëµ£¬¶¯Ì¬Ò³ÃæÊÇÕ¼Óоø¶Ô¸ßµÄµØλµÄ£¬ÕýÒòΪÓÐÁ˶¯Ì¬»¯£¬²ÅÓÐÁËÏÖÔÚWebµÄ·á¸»¶à²Ê£¬µ«ÊÇÈçͬËùÓбðµÄÊÂʵһÑù£¬ºÃ´¦ÍùÍù¶¼ÊÇÓдú¼ÛµÄ¡£
ΪÁ˲úÉú³ö¶¯Ì¬µÄЧ¹û£¬Ã¿Ò»´Î¶ÔÒ³ÃæµÄÇëÇ󶼻áÒªÇó·þÎñÆ÷¶ÔÒ³Ãæ½øÐбàÒë»òÕßÖ´ÐУ¬ÕâЩ²Ù×÷¶¼ºÜÏûºÄϵͳ×ÊÔ´¡£Èç¹ûÕâÆڼ仹ÓкÍÊý¾Ý¿âµÄͨѶ£¬ÄÇô´ú¼Û½«»á¸ü´ó¡£
Èç¹ûÒ»¸öÒ³ÃæÔÚÒ»¶¨µÄʱ¼äÄÚ£¬ÆäÄÚÈÝûÓз¢Éú¸Ä±ä£¬ÄÇô¾Í²»±ØΪÿһ´Î¶ÔËüµÄ·ÃÎʽøÐÐÒ»´Î“ДµÄ±àÒë»òÖ´ÐС£ÎÒÃÇ¿ÉÒÔ°ÑËüÔÚÕâ¶ÎûÓз¢Éú¸Ä±äµÄʱ¼äÄڵĽá¹û±£´æµ½Ò»¸ö¾²Ì¬µÄÒ³ÃæÀïÃ棬Ȼºóÿ´Î·ÃÎÊÕâ¸öÒ³Ãæʱ£¬¾ÍÓøղű£´æµÄ¾²Ì¬Ò³Ãæ½øÐлظ´¡£ÕâÑù±ãÄÜ´ó´óµØ¼õÉÙϵͳ×ÊÔ´µÄÏûºÄ£¬²¢ÇÒÌá¸ß¶Ô¿Í»§µÄÏìÓ¦Ëٶȡ£¶øÕâ¸ö¹ý³Ì¾Í³Æ֮ΪҳÃ澲̬»¯¡£
ÏÖÔÚËùÃæÁÙµÄÎÊÌâ¾ÍÊÇÈçºÎÔÚJSPÖн«Ò³ÃæµÄÄÚÈݱ£´æÏÂÀ´¡£
ÔÚ·ÃÎÊJSPÒ³ÃæµÄʱºò£¬·þÎñÆ÷»áÏȽ«JSPÎļþ±àÒëΪServletÎļþ£¬È»ºó¶ÔÕâ¸öServlet±àÒë¡¢Ö´ÐУ¬²¢×îÖհѽá¹û·µ»Ø¸ø¿Í»§¶Ë¡£¶øÎÒÃǵÄÈÎÎñ¾ÍÊÇÒª°ÑÕâ¸ö×îÖÕÉú³ÉµÄHTML¾²Ì¬Ò³Ãæ±£ÁôÏÂÀ´£¬´æ·ÅÔÚ·þÎñÆ÷ÉÏ¡£
½â¾öµÄ·½·¨ÆäʵºÜ¼òµ¥¡£ÆÕͨµÄ¶ÔÓÚJSPµÄ·ÃÎÊ£¬×îÖÕµÄÊý¾ÝÁ÷ÊÇ»Øдµ½¿Í»§¶ËµÄ£¬Èç¹ûÎÒÃÇ°ÑËüÖض¨Ïò£¬ÈÃËü»Øдµ½·þÎñÆ÷ÉÏÒ»¸ö±¾µØµÄÎļþ£¬ÕâÑù¾ÍÄÜ°ÑJSPµÄÖ´Ðнá¹û±£´æÆðÀ´£¬¶øÕâ¸öÎļþ¾ÍÊÇÎÒÃÇÏëÒªµÃµ½µÄ¾²Ì¬»¯µÄ½á¹û¡£
ºÃÁË£¬ËµÁËÄÇô¶à·Ï»°£¬ÏÖÔÚ˵˵¾ßÌåÔõôʵÏÖ¡£
¿´¹ý½«JSP±àÒë³ÉµÄServletÎļþÒԺ󣬿ÉÒÔÖªµÀÕâ¸öServletÊÇͨ¹ýÒ»¸ö"JspWriter"ÀàÐ͵ĶÔÏó½«Êý¾Ý»Øд¸ø¿Í»§¶ËµÄ£¬¶øÕâ¸ö¶ÔÏóÕýÊÇJSPÀïÃæµÄÄÚÖöÔÏó"out"£¬ÏÖÔÚÎÒÃÇÖ»ÐèÒª¶¨ÒåÒ»¸ö×Ô¼ºµÄÀ࣬ÈÃËü¼Ì³Ð"JspWriter"À࣬¸²¸ÇÀïÃæµÄÊä³öÏà¹Øº¯Êý£¬ÈÃÊý¾Ý¶¼Êä³öµ½Ò»¸öÖ¸¶¨µÄÎļþ¾Í¿ÉÒÔÁË¡£
ÀýÈ磨ʡÂÔÁ˲¿·ÖÖØÔغ¯Êý£©£º
³ÌÐò´úÂë
import java.io.*;
import javax.servlet.jsp.*;
public class ConstPageWriter extends JspWriter {
private PrintWriter pw;
public ConstPageWriter(String fileName){
super(JspWriter.DEFAULT_BUFFER, false);
try{
pw = new PrintWriter(fileName, "UTF-8");
}catch(Exception e){
e.printStackTrace();
}
}
@Override
public void print(String arg0) throws IOException {
pw.print(arg0);


Ïà¹ØÎĵµ£º

EOS6ÖÐÔÚJSPÒ³ÃæÖжÁÈ¡Ò³ÃæÁ÷ÖеÄDataObject¶ÔÏó


EOS6ÖÐÔÚJSPÒ³ÃæÖжÁÈ¡Ò³ÃæÁ÷ÖеÄDataObject¶ÔÏó
´úÂëÈçÏ£º
<%@page pageEncoding="UTF-8" import="java.util.*"%>
<%@page import="com.eos.web.taglib.util.*" %>
<%@page import="commonj.sdo.DataObject,commonj.sdo.Property" %>
<%@include file="/common/common.jsp"%>
<%@incl ......

×ܽ᣺JSPÒ³ÃæimgͼƬ»º´æÎÊÌâÏÖÏó±íÊö¼°ÎÊÌâ½â¾ö

JSPÒ³ÃæimgͼƬ»º´æÎÊÌâÏÖÏó±íÊö¼°ÎÊÌâ½â¾ö
l  ÎÊÌâ±íÊö£º
µ±¶Ôº¬ÓÐÍ·ÏñµÄ¿Í·þÈËÔ±ÐÅÏ¢½øÐÐÐÞ¸Ä(º¬¶ÔÍ·ÏñÐÅÏ¢µÄÐÞ¸Ä)ºó£¬ÖØдò¿ªÊý¾ÝÐ޸ĽçÃ棬·¢ÏÖÎı¾ÄÚÈÝÐ޸ijɹ¦£¬¶øÍ·ÏñÄÚÈÝÈÔÈ»ÏÔʾΪԭÀ´µÄÍ·Ïñ——Êý¾Ý¿âÖеĶÔÓ¦ÐÅϢͷÏñËùÔÚ×Ö¶ÎÊý¾ÝÒѾ­³É¹¦¸üС£
 
l  Ç°Ì᣺
jspÒ³ÃæÖнøÐÐÁËҳà ......

jspÒ³Ãæ·ÀˢУ¬Ìá½»Êý¾ÝÖظ´

ÔÚÌá½»±íµ¥µÄÒ³Àï¼ÓÉÏ
<%
org.apache.struts.util.TokenProcessor.getInstance().saveToken(request);
%>
<input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="<%=session.getAttribute("org.apache.struts.action.TOKEN")%>" />

struts actionÀï
if(isTokenValid(request ......

jsp »º´æ£¬ html »º´æ£¬ ajax»º´æ,½â¾ö·½·¨

jsp »º´æ£¬ html »º´æ£¬ ajax»º´æ,½â¾ö·½·¨
url:http://blog.csdn.net/oklzh/archive/2009/08/14/4445722.aspx
ÓйØÒ³Ã滺´æÎÊÌ⣮Õâ¸öÎÊÌâÉÏÍøÕÒÁ˺ö࣮µ«·¢¾õ¸÷ÖÖ½â¾ö·½·¨£¬¶¼±Ë´Ë·ÖÀ룬ûÓÐһƪͳһµÄ½â¾ö·½·¨£¬±¾È˽üÈÕ£¬Ò²Óöµ½ÁËÒ³Ã滺´æµÄÎÊÌ⣬¸ù¾ÝÍøÉϸ÷Ò³Ã滺´æµÄ½â´ð£¬×öÁËÒ»¸ö×ܽᡣ
1.·þÎñÆ÷¶Ë»º´æµÄÎÊÌâ ......

java·ÖÒ³´úÂëÓÃÓÚjsp¼°java²¢´øÓвâÊÔ·½·¨


import java.util.ArrayList;
import java.util.List;
public class FenYe
{
     static double allpage=0; //×ÜÒ³Êý
     static double currpage=0; //µ±Ç°Ò³
     static double pagesize=10; //ÏÔʾÐÐ
     static int sta ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ