Package tadm

Examples of tadm.AntTag


      throw new JspException( "AntProperty used as top-level tag,"+
            "must be inside <ant>");
  if( ! (parent instanceof AntTag))
      throw new JspException( "AntProperty must be child of <ant>");

  AntTag antTag=(AntTag)parent;

  if( value==null && location!= null ) {
      // the property will be set with the absolute path
      // of the "location", relative to this or another
      // (accessible) web application
      HttpServletRequest req=(HttpServletRequest)pageContext.
    getRequest();
      ServletContext thisCtx=pageContext.getServletConfig().
    getServletContext();
      ServletContext targetCtx=(webapp==null) ? thisCtx:
    thisCtx.getContext( webapp );
      ServletContext rootCtx= thisCtx.getContext("/");
      if( webapp!=null && !"/".equals( webapp) &&
    ! "".equals(webapp ) && rootCtx == targetCtx )
    throw new JspException( "Can't find context " + webapp );
      value=targetCtx.getRealPath(location);
  }

 
  if( value == null ) {
      // if param is used, try it first ( param!= name )
      if( param != null ) {
    value=pageContext.getRequest().getParameter( param );
      } else {
    value=pageContext.getRequest().getParameter( name );
      }
  }

  if( value != null )
      antTag.setProperty( name, value );

   // reset value to default null
   value = null;

  return SKIP_BODY;
View Full Code Here


      throw new JspException( "AntTarget used as top-level tag,"+
            "must be inside <ant>");
  if( ! (parent instanceof AntTag ))
      throw new JspException( "AntTarget must be child of <ant>");

  AntTag antTag=(AntTag)parent;
  if( name == null ) {
      String names[]=pageContext.getRequest().
    getParameterValues( param );
      for( int i=0; i<names.length; i++ )
    antTag.addTarget( names[i]);
  } else {
      antTag.addTarget( name );
  }
  return SKIP_BODY;
    }
View Full Code Here

      throw new JspException( "AntProperty used as top-level tag,"+
            "must be inside <ant>");
  if( ! (parent instanceof AntTag))
      throw new JspException( "AntProperty must be child of <ant>");

  AntTag antTag=(AntTag)parent;

  if( value==null && location!= null ) {
      // the property will be set with the absolute path
      // of the "location", relative to this or another
      // (accessible) web application
      HttpServletRequest req=(HttpServletRequest)pageContext.
    getRequest();
      ServletContext thisCtx=pageContext.getServletConfig().
    getServletContext();
      ServletContext targetCtx=(webapp==null) ? thisCtx:
    thisCtx.getContext( webapp );
      value=targetCtx.getRealPath(location);
  }

 
  if( value == null ) {
      // if param is used, try it first ( param!= name )
      if( param != null ) {
    value=pageContext.getRequest().getParameter( param );
      } else {
    value=pageContext.getRequest().getParameter( name );
      }
  }

  if( value != null )
      antTag.setProperty( name, value );

  return SKIP_BODY;
    }
View Full Code Here

TOP

Related Classes of tadm.AntTag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.