You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jm...@apache.org on 2002/05/10 22:31:59 UTC

cvs commit: jakarta-turbine-3/src/java/org/apache/turbine/pipeline DefaultTargetValve.java

jmcnally    02/05/10 13:31:59

  Modified:    src/java/org/apache/turbine/pipeline DefaultTargetValve.java
  Log:
  don't set headers, if the target is null
  
  Revision  Changes    Path
  1.16      +4 -8      jakarta-turbine-3/src/java/org/apache/turbine/pipeline/DefaultTargetValve.java
  
  Index: DefaultTargetValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/pipeline/DefaultTargetValve.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultTargetValve.java	16 Apr 2002 22:24:02 -0000	1.15
  +++ DefaultTargetValve.java	10 May 2002 20:31:59 -0000	1.16
  @@ -77,7 +77,7 @@
    * @author <a href="mailto:mikeh@apache.org">Mike Haberman</a>
    * @author <a href="mailto:james@jamestaylor.org">James Taylor</a>
    * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
  - * @version $Id: DefaultTargetValve.java,v 1.15 2002/04/16 22:24:02 jvanzyl Exp $
  + * @version $Id: DefaultTargetValve.java,v 1.16 2002/05/10 20:31:59 jmcnally Exp $
    */
   public class DefaultTargetValve
       extends AbstractValve
  @@ -134,20 +134,16 @@
       protected void execute(RunData data)
           throws Exception
       {
  -        data.getResponse().setLocale(data.getLocale());
  -        data.getResponse().setContentType(data.getContentType());
  -
           // Get the target that will determine the template / layout
  -
           String target = data.getTarget();
  -
           if ( target != null )
           {
  +            data.getResponse().setLocale(data.getLocale());
  +            data.getResponse().setContentType(data.getContentType());
  +
               // Get the template context, already populated by any context
               // builders that were found for this target
  -
               TemplateContext context = Module.getTemplateContext( data );
  -
               context.put( "template", target );
   
               // Resolve the layout template for this target
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>