[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 

Changeset 4369


Ignore:
Timestamp:
10/23/09 00:22:31 (9 years ago)
Author:
srloomis
Message:

cldrbug 2132: add JspWebContext

Location:
trunk/tools/java/org/unicode/cldr/web
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/java/org/unicode/cldr/web/WebContext.java

    r4353 r4369  
    9090     * @throws IOException 
    9191     */ 
    92     private void setRequestResponse(HttpServletRequest irq, HttpServletResponse irs) throws IOException { 
     92    protected void setRequestResponse(HttpServletRequest irq, HttpServletResponse irs) throws IOException { 
    9393       request = irq; 
    9494       response = irs; 
     
    9999    } 
    100100     
    101     private void setStream(Writer w) { 
     101    protected void setStream(Writer w) { 
    102102        out = w; 
    103103        if(out instanceof PrintWriter) { 
     
    119119     * @throws IOException 
    120120     */ 
    121     public static WebContext fromRequest(ServletRequest request, ServletResponse response, Writer out) throws IOException { 
     121    public static JspWebContext fromRequest(ServletRequest request, ServletResponse response, Writer out) throws IOException { 
    122122        WebContext ctx = (WebContext) request.getAttribute(CLDR_WEBCONTEXT); 
    123123        if(ctx == null) { 
    124124            throw new InternalError("WebContext: could not load fromRequest. Are you trying to load a JSP directly?"); 
    125125        } 
    126         WebContext subCtx = new WebContext(ctx); // clone the important fields.. 
     126        JspWebContext subCtx = new JspWebContext(ctx); // clone the important fields.. 
    127127        subCtx.setRequestResponse((HttpServletRequest)request,  // but use the req/resp of the current situation 
    128128                         (HttpServletResponse)response ); 
  • trunk/tools/java/org/unicode/cldr/web/data/root/tmpl/report.jspf

    r4362 r4369  
    5959String section = ctx.field(SurveyMain.QUERY_SECTION); 
    6060 
    61 WebContext subCtx = new WebContext(ctx); 
     61JspWebContext subCtx = new JspWebContext(ctx); 
    6262subCtx.setQuery(SurveyMain.QUERY_LOCALE,ctx.localeString()); 
    6363 
  • trunk/tools/java/org/unicode/cldr/web/data/root/tmpl/stcontext.jspf

    r4364 r4369  
    66 
    77<%  
    8      WebContext ctx = WebContext.fromRequest(request,response,out); 
     8        JspWebContext ctx = WebContext.fromRequest(request,response,out); 
    99 
    1010// may not be set 
Note: See TracChangeset for help on using the changeset viewer.