Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Jute Powerful Forum  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Jute开发进度
rainman

阿熊

元老


发贴: 5644
积分: 454
于 2002-08-18 13:33 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
已经完成的功能有:类别,板块管理,基本的首页显示等,目前正在开发文章发表,跟随等功能,预计下星期可以完成用户配置,全文搜索功能。



作者 回复: Jute开发进度 [Re:rainman]
scottlai



元老


发贴: 451
积分: 366
于 2002-08-18 21:50 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
package test;

import java.io.*;
import java.net.*;
import java.util.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class ConfResourceBundle extends HttpServlet
{
  public static URLClassLoader confClassLoader = null;

  public void init() throws ServletException
  {
    try
    {
      URL confURL[] = {  new File(getServletContext().getRealPath("/WEB-INF/conf")).toURL(),  };
      confClassLoader = URLClassLoader.newInstance(confURL, this.getClass().getClassLoader());

      // test
      ResourceBundle b = getBundle("test.client");
      System.out.println(b.getString("NewMessage.Title"));

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

  public static final ResourceBundle getBundle(String baseName) throws MissingResourceException
  {
    return getBundle(baseName, Locale.getDefault());
  }

  public static final ResourceBundle getBundle(String baseName, Locale locale)
  {
    return getBundle(baseName, locale, confClassLoader);
  }

  public static ResourceBundle getBundle(String baseName, Locale locale, ClassLoader loader) throws MissingResourceException
  {
    return ResourceBundle.getBundle(baseName, locale, loader);
  }
}



作者 回复: 回复: Jute开发进度 [Re:scottlai]
rainman

阿熊

元老


发贴: 5644
积分: 454
于 2002-08-19 05:08 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
cool!

scottlai wrote:
package test;

import java.io.*;
import java.net.*;
import java.util.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class ConfResourceBundle extends HttpServlet
{
  public static URLClassLoader confClassLoader = null;

  public void init() throws ServletException
  {
    try
    {
      URL confURL[] = {  new File(getServletContext().getRealPath("/WEB-INF/conf")).toURL(),  };
      confClassLoader = URLClassLoader.newInstance(confURL, this.getClass().getClassLoader());

      // test
      ResourceBundle b = getBundle("test.client");
      System.out.println(b.getString("NewMessage.Title"));

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

  public static final ResourceBundle getBundle(String baseName) throws MissingResourceException
  {
    return getBundle(baseName, Locale.getDefault());
  }

  public static final ResourceBundle getBundle(String baseName, Locale locale)
  {
    return getBundle(baseName, locale, confClassLoader);
  }

  public static ResourceBundle getBundle(String baseName, Locale locale, ClassLoader loader) throws MissingResourceException
  {
    return ResourceBundle.getBundle(baseName, locale, loader);
  }
}





flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923