sunfruit[请访问http://www.fruitres.cn]

--我相信JAVA能走得更远 QQ:316228067

#

[原创]基本绘图演示源代码,绘制矩形

    --sunfruit
    
    源代码四个文件,在这个DEMO中可以看到
    如何使用2D组件,如何把JPanel做为画板使用,如何使用Canvas替代JPanel,如何设置2D组件的线宽

    这个只是针对像入门的新手,高手就不需要看了,免得扔鸡蛋
    

     下载地址 http://www.fruitres.cn/servlet/buyproductservlet?tag=single&tag1=info&PRODUCT_ID=1016162856&number=0
     更多工具和文档请到 http://www.fruitres.cn/

posted @ 2007-09-03 12:46 sunfruit 阅读(448) | 评论 (0)编辑 收藏

[原创]Oracle表结构导出为HTML工具1.0.4

    --sunfruit
将Oracle表结构导出成Html页面的工具

1.0.4
增加了导出触发器、存储过程、函数的功能,并且修改了不能导出KEYS全部类型的BUG

1.0.3
增加了导出Sequences、View的功能,并且导出界面默认导出到安装文件夹中的export目录中

1.0.2
增加了导出KEYS、INDEX的功能

1.0.1
增加了导出完毕以后直接点击打开文件夹、打开文件的查看方式,并且支持Linux/Win 平台

1.0.0
导出为html文件,导出完毕后直接查看index.html文件即可。导出的内容包括各个表的名称索引和注释以及表中各个字段的明细和注释

下载地址 http://www.fruitres.cn/servlet/buyproductservlet?tag=single&tag1=info&PRODUCT_ID=942025602&number=0 下载版本1.0.4
更多工具和文档请到 http://www.fruitres.cn/

posted @ 2007-07-19 11:41 sunfruit 阅读(1249) | 评论 (1)编辑 收藏

[原创]通过JAVA改变图片的像素Alpha值实现图片透明

    --sunfruit

    设置图片的每个象素Alpha,使得图片透明,核心代码如下

    private void setAlpha(ByteArrayOutputStream os) {
    /**
     * 增加测试项
     * 读取图片,绘制成半透明
     */
    try {

      ImageIcon imageIcon = new ImageIcon(os.toByteArray());
      BufferedImage bufferedImage = new BufferedImage(imageIcon.getIconWidth(),imageIcon.getIconHeight()
          , BufferedImage.TYPE_4BYTE_ABGR);
      Graphics2D g2D = (Graphics2D) bufferedImage.getGraphics();
      g2D.drawImage(imageIcon.getImage(), 0, 0,
                           imageIcon.getImageObserver());
      //循环每一个像素点,改变像素点的Alpha值
      int alpha = 100;
      for (int j1 = bufferedImage.getMinY(); j1 < bufferedImage.getHeight(); j1++) {
        for (int j2 = bufferedImage.getMinX(); j2 < bufferedImage.getWidth(); j2++) {
          int rgb = bufferedImage.getRGB(j2, j1);
          rgb = ( (alpha + 1) << 24) | (rgb & 0x00ffffff);
          bufferedImage.setRGB(j2, j1, rgb);
        }
      }
      g2D.drawImage(bufferedImage, 0, 0, imageIcon.getImageObserver());
     
      //生成图片为PNG

      ImageIO.write(bufferedImage, "png",  new File(图片路径));
    }
    catch (Exception e) {
      e.printStackTrace();
    }

  }

posted @ 2007-05-20 00:20 sunfruit 阅读(12083) | 评论 (0)编辑 收藏

[原创]通过HttpURLConnection如何使用代理服务器连接公网

    --sunfruit

    在openConnection之前加上
    Properties   prop   =   System.getProperties();
    System.getProperties().put("proxySet","true");
    // 设置http访问要使用的代理服务器的地址
    prop.setProperty("http.proxyHost","xxxxxxx");
    // 设置http访问要使用的代理服务器的端口
    prop.setProperty("http.proxyPort","xxxxx");
   
    然后并不像有的贴子说的那样添加
    prop.setProperty("http.proxyUser","xxxxxxxx");
    prop.setProperty("http.proxyPassword","xxxxx");
    添加这样的内容是不行的,而是将"username:password"进行base64编码,具体代码如下
    String authentication = "username:password";
    String encodedLogin = new BASE64Encoder().encode(authentication.getBytes());
    httpurlconnection.setRequestProperty("Proxy-Authorization", " Basic " + encodedLogin);
   
    注意BASE64Encoder().encode(authentication.getBytes());这里不能使用BASE64Encoder().encodeBuffer(authentication.getBytes())否则报错
    具体原因参考sun公布的JDK BUG , Bug ID:  4615330  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4615330

posted @ 2007-03-22 10:41 sunfruit 阅读(1772) | 评论 (0)编辑 收藏

[原创]关于JAVAMAIL发送邮件正文是html格式并且显示图片还带有附件的邮件的几点说明

    --sunfruit
    前一段时间发了一个“[原创]JAVAMAIL发送邮件正文是html格式并且显示图片还带有附件的邮件”的文章,后来经过深入的使用该功能发现几个要点说明如下:
    第一:正文必须第一个添加到Multipart对象中
    第二:IMGX  X是序号,该序号必须从1开始,并且只能为数字
    以上两点缺少一点都不会成功
    另:ByteArrayDataSource  这个类在旧的javamail开发包中没有,需要新的javamail开发包

posted @ 2006-11-09 11:06 sunfruit 阅读(1479) | 评论 (1)编辑 收藏

[资料]WEB开发利器--JAVASCRIPT API文档 HTML API 文档

    --sunfruit
    有三个压缩包需要下载,下载以后放在同一个目录中解压即可
     下载包1
     下载包2
     下载包3

posted @ 2006-10-31 16:37 sunfruit 阅读(15736) | 评论 (29)编辑 收藏

[原创]JAVAMAIL发送邮件正文是html格式并且显示图片还带有附件的邮件

    --sunfruit
   没有什么说的,源代码如下
public void sendMail(int id) {
        //数据初始化
        Transport transport; //发邮件时使用
        String part = GetResource.getXMLValue("mail_port"); //端口
        String mailhost = GetResource.getXMLValue("mail_server"); //服务器
        String user = GetResource.getXMLValue("mail_user"); //用户名
        String password = GetResource.getXMLValue("mail_password"); //密码
        String from = GetResource.getXMLValue("mail_from"); //发件mail
        String strname = GetResource.getXMLValue("mail_strname"); //在地址栏上显示的名字

        String to = GetResource.getXMLValue("mail_to"); //收件人
        String cc = ""; //抄送人
        String bcc = ""; //密送人
        String title = GetResource.getXMLValue("mail_title"); //标题
        byte[] bytes = null;
        try {
            bytes = FileIO.readFile(GetResource.getXMLValue("mail_contentpath")); //正文
        } catch (IOException ex) {
            log.error("",ex);
        }
        String fromat = GetResource.getXMLValue("mail_fromat");

        //获得下载需要的key
        byte[] bkeydes=null;
        try {
            bkeydes=FileIO.readFile(GetResource.getXMLValue("附件地址"));
        } catch (IOException ex) {
            log.error("",ex);
        }

        try {
            Properties props = System.getProperties(); //获得系统属性
            props.put("mail.smtp.host", mailhost); //设置SMTP主机
            props.put("mail.smtp.auth", "true"); //设置身份验证为真,若须身份验证则必须设为真

            //获得邮件会话对象
            Session session = null;

            //需要验证
            session = Session.getDefaultInstance(props,
                                                 new SmtpAuthenticator(user,
                    password));

            //创建MIME邮件对象
            MimeMessage mimeMsg = new MimeMessage(session);
            //设置发信人
            if (strname != null && !strname.equals("")) {
                mimeMsg.setFrom(new InternetAddress(from, strname));
            } else {
                mimeMsg.setFrom(new InternetAddress(from));
            }
            //设置收信人
            if (!to.equals("")) {
                mimeMsg.setRecipients(Message.RecipientType.TO,
                                      InternetAddress.parse(to));
            }
            //设置抄送人
            if (!cc.equals("")) {
                mimeMsg.setRecipients(Message.RecipientType.CC,
                                      InternetAddress.parse(cc));
            }
            //设置暗送人
            if (!bcc.equals("")) {
                mimeMsg.setRecipients(Message.RecipientType.BCC,
                                      InternetAddress.parse(bcc));
            }
            //设置邮件主题
            sun.misc.BASE64Encoder enc = new sun.misc.BASE64Encoder();
//            mimeMsg.setSubject("=?GB2312?B?" + enc.encode(title.getBytes()) +
//                               "?=");
            mimeMsg.setSubject(title, "GBK");
            //设置邮件内容
            //mimeMsg.setText(content, "gb2312");
            //发送日期
            mimeMsg.setSentDate(new Date());
            /*******************附件 begin××××××××××××××××××××××××*/
            BodyPart mbp = null; //正文
            //MimeBodyPart mbp1 = null; //附件

            mbp = new MimeBodyPart();
            //设置邮件正文格式(html/text)
            if (fromat.equals("0") || fromat.equals("")) {
                //普通格式
                mbp.setText(new String(bytes,"GBK"));
            } else {
                //网页格式
                mbp.setDataHandler(new DataHandler(new String(bytes,"GBK"),
                        "text/html;charset=gb2312"));
            }
            //!!!!注意必须为new MimeMultipart("related"); 这样的实例化才能发送html正文显示图片的邮件 "related"
            //new MimeMultipart(); 这样实例化则不能发送html正文显示图片的邮件 只可以发送其他的邮件
            Multipart mp = new MimeMultipart("related");
            if (mbp != null)
                mp.addBodyPart(mbp); //正文

            //附件key.des
            BodyPart messageBodyPart = new MimeBodyPart();
            ByteArrayDataSource fileds = new ByteArrayDataSource(bkeydes,"application/octet-stream");
            messageBodyPart.setDataHandler(new DataHandler(fileds));
            //解决附件中文问题
            //mbp1.setFileName(fileds.getName(),"gb2312");
            messageBodyPart.setFileName(MimeUtility.encodeWord("key.des", "GB2312", null));
            mp.addBodyPart(messageBodyPart);

            //附件 图标
            messageBodyPart = new MimeBodyPart();
            bytes=FileIO.readFile(GetResource.getXMLValue("img_logo"));
            fileds = new ByteArrayDataSource(bytes,"application/octet-stream");
            messageBodyPart.setDataHandler(new DataHandler(fileds));
            //解决附件中文问题
//            messageBodyPart.setFileName("fruitrsource_touming.jpg");
//            messageBodyPart.setHeader("Content-ID", "fruitrsource_touming");
            messageBodyPart.setFileName("1.jpg");
            //!!!!注意这里是"<IMG1>" 带有尖括号 而在正文的html里面则是src="cid:IMG1"
            messageBodyPart.setHeader("Content-ID", "<IMG1>");
            mp.addBodyPart(messageBodyPart);

            // 添加 Multipart到Message中
            mimeMsg.setContent(mp);
            mimeMsg.saveChanges();
            transport = session.getTransport("smtp");
            transport.connect(mailhost, Integer.parseInt(part), user, password);
            //发送邮件
            //transport.send(mimeMsg, mimeMsg.getAllRecipients());
            //transport.send(mimeMsg);
            transport.sendMessage(mimeMsg, mimeMsg.getAllRecipients());
            //System.out.println("mail send!");
            transport.close();

        }

        catch (Exception e) {
            e.printStackTrace();

        }
    }

class SmtpAuthenticator extends Authenticator {
        //SMTP身份验证
        public SmtpAuthenticator(String username, String password) {
            this.username = username;
            this.password = password;
        }

        public PasswordAuthentication getPasswordAuthentication() {
            return new PasswordAuthentication(this.username, this.password);
        }

        String username = null;
        String password = null;
    }

posted @ 2006-10-24 23:04 sunfruit 阅读(10885) | 评论 (5)编辑 收藏

[原创]利用图片的像素RGB值还原图像的JAVA应用

    --sunfruit
    JAVA编写的使用像素RGB值还原图像的方法,代码如下
    public class ImageData {

    private int[][] idata=null;

    public ImageData() {
        readImageData();
        writeImageData();
    }

    private int[][] readImageData()
    {
        try {
            //imagedata的键值就是一个存储了图像像素RGB值得文本文件
            RandomAccessFile randomAccessFile = new RandomAccessFile(new File(GetResource.getXMLValue("imagedata")),"r");
            long filesize=randomAccessFile.length();
            long filepointer=0;
            DynArrayInt dynArrayInt=null;
            ArrayList arrayList=new ArrayList();
            int n1=0;
            while(filesize>filepointer)
            {
                filepointer=randomAccessFile.getFilePointer();

                String str1=randomAccessFile.readLine();
                if(str1!=null)
                {
                    String[] str2=str1.split(" ");
                    String[] str3=str2[1].split(",");
                    dynArrayInt=new DynArrayInt();
                    for(int i=0;i<str3.length;i++)
                    {
                        if(!str3[i].equals(""))
                        {
                            int pix = Integer.parseInt(str3[i], 16);
                            dynArrayInt.addInt(pix);
                        }
                    }
                    if(n1==0)
                        n1=dynArrayInt.getSize();
                    arrayList.add(dynArrayInt);
                }
            }

            idata=new int[arrayList.size()][dynArrayInt.getSize()];
            for(int i=0;i<idata.length;i++)
            {
                 DynArrayInt dynArrayInt1=(DynArrayInt)arrayList.get(i);
                for(int j=0;j<idata[i].length;j++)
                {
                    idata[i][j]=dynArrayInt1.getInt(j);
                }
            }

        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return idata;
    }

    private void writeImageData()
    {
        BufferedImage bufferedImage=new BufferedImage(idata[0].length,idata.length,BufferedImage.TYPE_INT_RGB);
        for(int i=0;i<idata.length;i++)
        {

            for(int j=0;j<idata[i].length;j++)
            {
                bufferedImage.setRGB(j,i,idata[i][j]);
            }
        }
        Random random=new Random(System.currentTimeMillis());
        String ext="jpg";
        String filepath = System.getProperty("java.io.tmpdir") + random.nextInt(99999) + "." + ext;
        try {
            ImageIO.write(bufferedImage, ext,  new File(filepath));
            System.out.println("文件已经生成,路经为" + filepath);
        }
        catch (IOException ex) {
            ex.printStackTrace();
        }

    }

    public static void main(String[] args) {
        ImageData imagedata = new ImageData();
    }
}

其中的“GetResource”,“DynArrayInt”为自定义类,GetResource得功能就是解析获取properties文件的内容,DynArrayInt是一个整形动态数组,可以在以前的文章里获得“DynArrayInt”的源代码,所谓的图像的像素值就是如下数据
px1 44525b,44555d,475a61,47585d,44555a,46575c,44575d,43565c,42575e,43585f,445960,435962,435964,425861,425861,41585e,3f555e,3e545f,3d5261,3c5162,3d4f59,3d4f59,3f515b,40525c,40525c,40525c,40525c,3f515b,3f515b,3f4f5a,3f4f5c,40505d,3f515f,3f515f,3d5060,3c4f5f,3b505f,3a4e58,3e525e,3e525e,3d5060,415466,3f5264,405363,405460,41555f,42575d,42575e,43585f,445862,445862,445864,445864,445866,445866,415760,435962,445a63,455b66,455b66,445a67,455b68,485d6c,4c626f,4d636e,4e646f,4d636c,4b616a,51686e,536a70,566d73,5c7378,6f7c7a,7c8987,86908f,8d9796,8e9696,949a9a,969c9c,9ca2a2,a1a3a1,a8aaa8,aeb1ac,b2b5b0,b9bcb7,c5c8c2,cccfc9,ced1c9,d6d9d1,d5d8d3,d7dad5,dadbd5,dcddd7,dcdbd4,ddddd3,e0ddd4,e0ddd4,deddd6,deddd6,deddd6,dfded7,dfded7,e0dfd8,e0dfd8,e0dfd8,e0dfd8,e3dfd9,e3dfd9,e3dfd9,e3dfd9,e4e0da,e4e0da,e4e0da,e5e1db,e5e1db,e2e1da,e2e1da,e3e2db,e3e2db,e4e3dc,e4e3dc,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e6e5de,e6e5de,e6e5de,e6e5de,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e4e1d8,e5e2d9,e5e2d9,e4e1d8,e2dfd6,e3e0d7,e2dfd6,e1ded5,e1ded5,e2dfd6,e2dfd6,e2dfd6,e2dfd6,e1ded5,e1ded5,e1ded5,e1ded5,e1ded5,dedad4,dedad4,dcdbd4,dcdbd4,dbdcd4,dbdcd4,d9dcd4,d9dcd4,dedad4,dedad4,ddd9d3,ddd9d3,dbd7d1,dbd7d1,dcd8d2,dcd8d2,dbd7d1,d5d8d0,d5d8d0,d7d8d0,d7d8d0,d7d6cf,d9d5cf,d9d5cf,d9d5cf,d6d5ce,d6d5ce,d6d5ce,d6d5ce,d6d5ce,d6d5ce,d6d5ce,d5d4cd,d5d4cd,d5d7cc,d5d7cc,d5d7cc,d5d7cc,d4d6cb,d4d6cb,d5d7cc,d5d7cc,d5d7cc,d2d7d0,d2d7d0,d3d6d0,d3d6d0,d4d5cf,d4d5cf,d5d4cf,d5d4cf,d5d4cf,d5d4cf,d5d4cf,d5d4cf,d4d3ce,d4d3ce,d4d3ce,d4d3ce,d4d3ce,d0d3cb,d2d3cb,d3d2cb,d6d0cb,d6d0cb,d4d3cc,d3d4cc,d2d5cd,d3d2ce,d3d2ce,d3d2ce,d3d2ce,d3d2ce,d3d2ce,d3d2ce,d3d2ce,d3d2ce,d0d3cb,d0d3cb,d2d3cb,d2d3cb,d3d2cb,d3d2cb,d5d1cb,d5d1cb,d2d1cc,d2d1cc,d2d1cc,d2d1cc,d2d1cc,d2d1cc,d2d1cc,d2d1cc,d2d1cc,d1d0c9,d1d0c9,d2d1ca,d2d1ca,d3d2cb,d3d2cb,d3d2cb,d3d2cb
px0 44525b,44575e,465b62,485a5a,455757,46585a,44575b,42555b,41565d,435761,445862,445a63,435966,435964,42595f,42595e,40575c,3f5560,3d5263,3c5066,3a4c58,3b4d59,3d4f5b,3e505a,40525c,40525c,40535a,3f5259,3f5259,3f5057,3f5057,405158,3f5259,3f5259,3d515b,3c505a,3b515c,3a4e5a,3e5260,3e5260,3d5060,415468,3f5266,3f5262,405462,405460,42575d,42575e,43585f,435761,41555f,425662,445864,465a68,465a68,415760,425861,445a63,445a65,445a65,465c69,475d6a,475c6b,44596a,485d6e,4c6373,4d6474,4a616f,4b6472,4b6472,496270,4c6573,5f6c6e,677476,6f7c7e,798587,818a8d,899295,8f969a,91989c,949895,9a9e9b,9ea39d,a1a6a0,a9aea8,aeb3ac,babfb8,c0c5bc,ccd1c8,cfd2cd,d2d5d0,d5d6d0,d7d8d2,dcdbd4,ddddd3,e0ddd4,e0ddd4,deddd6,deddd6,deddd6,dfded7,dfded7,e0dfd8,e0dfd8,e0dfd8,e0dfd8,e3dfd9,e3dfd9,e3dfd9,e3dfd9,e4e0da,e4e0da,e4e0da,e5e1db,e5e1db,e2e1da,e2e1da,e3e2db,e3e2db,e4e3dc,e4e3dc,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e6e5de,e6e5de,e6e5de,e6e5de,e5e4dd,e5e4dd,e5e4dd,e5e4dd,e4e1d8,e4e1d8,e4e1d8,e3e0d7,e2dfd6,e2dfd6,e2dfd6,e1ded5,e1ded5,e2dfd6,e2dfd6,e2dfd6,e2dfd6,e1ded5,e1ded5,e1ded5,e1ded5,e1ded5,ddd9d3,ddd9d3,dbdad3,dbdad3,dadbd3,dadbd3,d8dbd3,d8dbd3,dedad4,dedad4,ddd9d3,ddd9d3,dad6d0,dbd7d1,dcd8d2,dcd8d2,dbd7d1,d5d8d0,d5d8d0,d5d8d0,d7d8d0,d6d7cf,d7d6cf,d7d6cf,d9d5cf,d6d5ce,d6d5ce,d6d5ce,d6d5ce,d6d5ce,d6d5ce,d6d5ce,d5d4cd,d5d4cd,d6d8cd,d6d8cd,d6d8cd,d6d8cd,d4d6cb,d4d6cb,d5d7cc,d5d7cc,d5d7cc,d3d8d1,d3d8d1,d4d7d1,d4d7d1,d4d5cf,d4d5cf,d5d4cf,d5d4cf,d5d4cf,d5d4cf,d5d4cf,d5d4cf,d4d3ce,d4d3ce,d4d3ce,d4d3ce,d4d3ce,d0d3cb,d2d3cb,d3d2cb,d6d0cb,d7d1cc,d4d3cc,d4d5cd,d2d5cd,d4d2d1,d4d2d1,d4d2d1,d4d2d1,d4d2d1,d3d1d0,d3d1d0,d3d1d0,d3d1d0,d0d3cb,d0d3cb,d2d3cb,d2d3cb,d3d2cb,d3d2cb,d5d1cb,d5d1cb,d3d2cd,d3d2cd,d3d2cd,d3d2cd,d3d2cd,d2d1cc,d2d1cc,d2d1cc,d2d1cc,d1d0c9,d1d0c9,d2d1ca,d2d1ca,d4d3cc,d4d3cc,d4d3cc,d4d3cc
以上数据表示图像有两行像素,每一行有260个像素组成,每个像素的RGB值就是44525b

posted @ 2006-10-23 21:28 sunfruit 阅读(1917) | 评论 (2)编辑 收藏

[原创]图论应用--最短路径

    --sunfruit

求上图1点到其他各点的最短路径,依据图论知识建立矩阵模型,进一步得到代码如下

public class ShortPathA {

  private static int[][]
      a = {
      {0, 50, 10, 100000, 45, 100000}, {100000, 0, 15, 100000, 10, 100000}, {20, 100000, 0, 15, 100000, 100000}, {
      100000, 20, 100000, 0, 35, 100000}, {100000, 100000, 1000000, 30, 0, 100000}, {100000, 100000, 100000, 3, 100000, 0}
  };

  private static boolean[] mark = new boolean[a.length];
  public ShortPathA() {
    int Vo = 0; //源点
    //源点到其他各点的距离
    int[] b = new int[a.length];
    DynArrayInt S = new DynArrayInt();
    for (int i = 0; i < a.length; i++) {
      mark[i] = false;
      //b[i] = a[Vo][i];
    }
    int best = -1;
    mark[0] = true;
    b[0] = 0; //{0为源点}
    while (best != 0) {
      best = 0;
      int best_j = 0;
      for (int i = 0; i < b.length; i++)
      {
        if (mark[i]) //{对每一个已计算出最短路径的点}
        {
          for (int j = 0; j < b.length; j++) {
            if ( (!mark[j]) && (a[i][j] > 0)) {
              if ( (best == 0) || (b[i] + a[i][j] < best)) {
                best = b[i] + a[i][j];
                best_j = j;
              }
            }
          }
        }
      }
      if (best > 0) {
        b[best_j] = best;
        mark[best_j] = true;
      }

    }
    System.out.println(java.util.Arrays.toString(b));
  }

  public static void main(String[] args) {
    ShortPathA shortpath = new ShortPathA();
  }

}

posted @ 2006-10-23 21:17 sunfruit 阅读(1684) | 评论 (0)编辑 收藏

用URLConnection或是HttpURLConnection类以POST或是GET方式提交保持Session的解决办法

    --sunfruit
    当通过URLConnection第一次和服务器发起POST或是GET请求以后,通过getHeaderField方法获得SessionID,具体方法为:
    String session_value=getHeaderField("Set-Cookie");
    第二次发起POST或是GET请求的时候需要把刚才获得的SessionID放置在请求的头部然后再提交,这样就能服务器就会认为是同一个Session请求了,具体方法为:
    setRequestProperty("Cookie", session_value);

    如果取得Set-Cookie的值比较长,取值到分号前即可 如 JSESSIONID=575F7196EDB52825D288F4061C66BC29;
    
    这样就实现了保存session向服务器提交请求

posted @ 2006-09-01 14:21 sunfruit 阅读(3260) | 评论 (0)编辑 收藏

仅列出标题
共11页: 上一页 1 2 3 4 5 6 7 8 9 下一页 Last