要是用户选择, 那么就作个 处理的 action  读取不同的 .properity 文件就可以了!

解决方案 »

  1.   

    struts自己的例子就有
    就是判断session里面的属性而以
    你好好看看例子
    大部分问题都有答案
      

  2.   

    public ActionForward execute(ActionMapping mapping,
                     ActionForm form,
                     HttpServletRequest request,
                     HttpServletResponse response)
        throws Exception {    // Extract attributes we will need
        HttpSession session = request.getSession();
        Locale locale = getLocale(request);    String language = null;
        String country = null;
        String page = null;    try {
                language = (String)
                  PropertyUtils.getSimpleProperty(form, "language");
                country = (String)
                  PropertyUtils.getSimpleProperty(form, "country");
                page = (String)
                  PropertyUtils.getSimpleProperty(form, "page");
            } catch (Exception e) {
               log.error(e.getMessage(), e);
            }        if ((language != null && language.length() > 0) &&
                (country != null && country.length() > 0)) {
               locale = new java.util.Locale(language, country);
            } else if (language != null && language.length() > 0) {
               locale = new java.util.Locale(language, "");
        }        session.setAttribute(Globals.LOCALE_KEY, locale);        if (null==page) return mapping.findForward("success");
            else return new ActionForward(page);    }
      

  3.   

    我给你发个,网上高手写的
    http://blog.csdn.net/duoshanx/archive/2004/08/23/82529.aspx
      

  4.   

    嗯,你也可以继承struts的类,
    好像是requestProcess吧,
    然后在这个里写你对local的处理,
    这样,你以后的Action都只继承你自己的就行了
      

  5.   

    怎么我用了native2ascii  就提示native2ascii不是内部命令
    我该怎么设置?
      

  6.   

    自己解决了 结帖喽  我发现现在struts精通的太少了