Package railo.runtime.exp

Examples of railo.runtime.exp.ExpressionException


  }

  static URL locationURL(HttpMethod method) throws MalformedURLException, ExpressionException {
        Header location = method.getResponseHeader("location");
       
        if(location==null) throw new ExpressionException("missing location header definition");
       
       
        HostConfiguration config = method.getHostConfiguration();
        URL url;
        try {
View Full Code Here


       
        Element mail=_getRootElement("mail");
        if(port<1) port=21;

        if(hostName==null || hostName.trim().length()==0)
            throw new ExpressionException("Host (SMTP) can be a empty value");
        hostName=hostName.trim();
       
       
        Element[] children = ConfigWebFactory.getChildren(mail,"server");
       
View Full Code Here

        if(!hasAccess)
            throw new SecurityException("no access to update mappings");
       
        // check virtual
            if(virtual==null || virtual.length()==0)
                throw new ExpressionException("virtual path cannot be a empty value");
            virtual=virtual.replace('\\','/');
           
            if(!virtual.equals("/") && virtual.endsWith("/"))
                  virtual=virtual.substring(0,virtual.length()-1);
           
            if(virtual.charAt(0)!='/')
                throw new ExpressionException("virtual path must start with [/]");
        boolean isArchive=primary.equalsIgnoreCase("archive");
       
        if((physical.length()+archive.length())==0)
            throw new ExpressionException("physical or archive must have a value");
       
        if(isArchive && archive.length()==0 ) isArchive=false;
        //print.ln("isArchive:"+isArchive);
       
        if(!isArchive && archive.length()>0 && physical.length()==0 ) isArchive=true;
View Full Code Here

        if(!hasAccess)
            throw new SecurityException("no access to update REST mapping");
       
        // check virtual
            if(virtual==null || virtual.length()==0)
                throw new ExpressionException("virtual path cannot be a empty value");
            virtual=virtual.replace('\\','/');
            if(virtual.equals("/"))
                throw new ExpressionException("virtual path cannot be /");
       
           
            if(virtual.endsWith("/"))
                  virtual=virtual.substring(0,virtual.length()-1);
           
            if(virtual.charAt(0)!='/') virtual="/"+virtual;
       
        if((physical.length())==0)
          throw new ExpressionException("physical path cannot be a empty value");
       
        Element rest=_getRootElement("rest");
        Element[] children = ConfigWebFactory.getChildren(rest,"mapping");
       
        // remove existing default
View Full Code Here

     */
    public void removeMapping(String virtual) throws ExpressionException, SecurityException {
      checkWriteAccess();
      // check parameters
        if(virtual==null || virtual.length()==0)
            throw new ExpressionException("virtual path cannot be a empty value");
        virtual=virtual.replace('\\','/');
       
        if(!virtual.equals("/") && virtual.endsWith("/"))
              virtual=virtual.substring(0,virtual.length()-1);
        if(virtual.charAt(0)!='/')
            throw new ExpressionException("virtual path must start with [/]");
       
       
        Element mappings=_getRootElement("mappings");

        Element[] children = ConfigWebFactory.getChildren(mappings,"mapping");
View Full Code Here

    public void removeRestMapping(String virtual) throws ExpressionException, SecurityException {
      checkWriteAccess();
      // check parameters
        if(virtual==null || virtual.length()==0)
            throw new ExpressionException("virtual path cannot be a empty value");
        virtual=virtual.replace('\\','/');
        if(virtual.equals("/"))
            throw new ExpressionException("virtual path cannot be /");
       
        if(virtual.endsWith("/")) virtual=virtual.substring(0,virtual.length()-1);
        if(virtual.charAt(0)!='/') virtual="/"+virtual;
       
       
View Full Code Here

        //virtual="/custom-tag";
        if(StringUtil.isEmpty(virtual))virtual=createVirtual(physical,archive);
       
        boolean isArchive=primary.equalsIgnoreCase("archive");
        if(isArchive && archive.length()==0 ) {
            throw new ExpressionException("archive must have a value when primary has value archive");
        }
        if(!isArchive && physical.length()==0 ) {
            throw new ExpressionException("physical must have a value when primary has value physical");
        }
       
        Element mappings=_getRootElement("custom-tag");
       
        // Update
View Full Code Here

      if(archive==null)archive="";
        else archive=archive.trim();
       
        boolean isArchive=primary.equalsIgnoreCase("archive");
        if(isArchive && archive.length()==0 ) {
            throw new ExpressionException("archive must have a value when primary has value archive");
        }
        if(!isArchive && physical.length()==0 ) {
            throw new ExpressionException("physical must have a value when primary has value physical");
        }
       
        Element mappings=_getRootElement("component");
        Element[] children = ConfigWebFactory.getChildren(mappings,"mapping");
        Element el;
View Full Code Here

       
       
        try {
          Class clazz = ClassUtil.loadClass(config.getClassLoader(),strClass);
      if(!Reflector.isInstaneOf(clazz, CustomTag.class))
        throw new ExpressionException("class ["+strClass+"] must implement interface ["+CustomTag.class.getName()+"]");
          
        }
        catch (ClassException e) {
         
          throw Caster.toPageException(e);
    }
       
       
       
       
        if(name==null || name.length()==0)
            throw new ExpressionException("class name can't be a empty value");
       
        renameOldstyleCFX();
       
       
        Element tags=_getRootElement("ext-tags");
       
        // Update
        Element[] children = ConfigWebFactory.getChildren(tags,"ext-tag");
        for(int i=0;i<children.length;i++) {
            String n=children[i].getAttribute("name");
           
            if(n!=null && n.equalsIgnoreCase(name)) {
            Element el=children[i];
            if(!"java".equalsIgnoreCase(el.getAttribute("type"))) throw new ExpressionException("there is already a c++ cfx tag with this name");
              el.setAttribute("class",strClass);
            el.setAttribute("type","java");
            return ;
        }
           
View Full Code Here

  @Override
  public int doStartTag() throws PageException  {
    if(time>=0) {
      SystemUtil.sleep(time);
    }
    else throw new ExpressionException("attribute interval must be greater or equal to 0, now ["+(time)+"]");
    return SKIP_BODY;
  }
View Full Code Here

TOP

Related Classes of railo.runtime.exp.ExpressionException

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.