1 16 17 package org.apache.taglibs.i18n; 18 19 import java.util.ArrayList ; 20 import java.util.Iterator ; 21 import java.util.List ; 22 import java.util.Locale ; 23 import java.util.ResourceBundle ; 24 import java.util.StringTokenizer ; 25 26 import javax.servlet.ServletRequest ; 27 28 import javax.servlet.jsp.PageContext ; 29 import javax.servlet.jsp.tagext.BodyTagSupport ; 30 31 32 39 public class ResourceHelper 40 { 41 public static final String BUNDLE_REQUEST_KEY = 42 "org.apache.taglibs.i18n.ResourceHelper.Bundle"; 43 44 50 static public ResourceBundle getBundle(PageContext pageContext) 51 { 52 return (ResourceBundle )pageContext.findAttribute(BUNDLE_REQUEST_KEY); 53 } 54 55 58 static public void setBundle(PageContext pageContext, 59 ResourceBundle bundle, 60 int scope) 61 { 62 pageContext.setAttribute(BUNDLE_REQUEST_KEY,bundle,scope); 64 } 65 66 } 67 | Popular Tags |