~ubuntu-branches/ubuntu/lucid/libstruts1.2-java/lucid

« back to all changes in this revision

Viewing changes to src/share/org/apache/struts/tiles/ComponentContext.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-04-24 12:14:23 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060424121423-naev53qigqgks0sa
Tags: 1.2.9-1
New upstream  release Fixes  three security  problems: CVE-2006-1546,
CVE-2006-1547,  CVE-2006-1548  (closes:  #360551),  thanks  to  Moritz
Muehlenhoff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/tiles/ComponentContext.java,v 1.7 2004/03/14 06:23:43 sraeburn Exp $
3
 
 * $Revision: 1.7 $
4
 
 * $Date: 2004/03/14 06:23:43 $
 
2
 * $Id: ComponentContext.java 55576 2004-10-26 06:31:13Z husted $ 
5
3
 *
6
4
 * Copyright 1999-2004 The Apache Software Foundation.
7
5
 * 
180
178
    /**
181
179
     * Get component context from request.
182
180
     * @param request ServletRequest.
183
 
     * @return ComponentContext
 
181
     * @return ComponentContext or null if context is not found or an
 
182
     * jspException is present in the request.
184
183
     */
185
184
    static public ComponentContext getContext(ServletRequest request) {
186
 
        return (ComponentContext) request.getAttribute(
 
185
       if (request.getAttribute("javax.servlet.jsp.jspException") != null) {
 
186
           return null;
 
187
        }        return (ComponentContext) request.getAttribute(
187
188
            ComponentConstants.COMPONENT_CONTEXT);
188
189
    }
189
190