Package org.apache.struts2

Examples of org.apache.struts2.StrutsException


    assert (body != null);

    try {
      writer.write(body);
    } catch (IOException e) {
      throw new StrutsException("IOError while writing the body: " + e.getMessage(), e);
    }
    if (popComponentStack) {
      popComponentStack();
    }
    return false;
View Full Code Here


        + getComponentName()
        + "', field '"
        + field
        + (parameters != null && parameters.containsKey("name") ? "', name '"
            + parameters.get("name") : "") + "': " + errorMsg;
    throw new StrutsException(msg, e);
  }
View Full Code Here

      }
      try {
        objectFactory.getClassInstance(actionClass.getName());
      } catch (ClassNotFoundException e) {
        logger.error("Object Factory was unable to load class {}", actionClass.getName());
        throw new StrutsException("Object Factory was unable to load class " + actionClass.getName(),
            e);
      }
      String[] beanNames = beanNameFinder.getBeanNames(actionClass);
      switch (beanNames.length) {
      case 0:
View Full Code Here

                if(it.hasNext()) {
                    sb.append("&");
                }
            }
            } catch (UnsupportedEncodingException e) {
                throw new StrutsException("Encoding "+ENCODING+" not found");
            }
        }
        RenderResponse resp = PortletActionContext.getRenderResponse();
        RenderRequest req = PortletActionContext.getRenderRequest();
        return resp.encodeURL(req.getContextPath() + sb.toString());
View Full Code Here

                mapping = actionMapper.getMapping(httpRequest, dispatcherUtils.getConfigurationManager());
            }
        }
       
        if (mapping == null) {
            throw new StrutsException("Unable to locate action mapping for request, probably due to " +
                    "an invalid action path: "+actionPath);
        }
        return mapping;
    }
View Full Code Here

                }
                if (count-- <= 0) {
                    locks.remove(o);
                    o.notify();

                    throw new StrutsException("Deadlock in session lock");
                }
                o.wait(10000);
            }
            ;
            locks.put(o, invocation);
View Full Code Here

        InputStream in = null;
        try {
            in = settingsUrl.openStream();
            settings.load(in);
        } catch (IOException e) {
            throw new StrutsException("Could not load " + name + ".properties:" + e, e);
        } finally {
            if(in != null) {
                try {
                    in.close();
                } catch(IOException io) {
View Full Code Here

                configProps.put(AutoProcessor.AUTO_START_PROP + ".2", StringUtils.join(bundles, " "));
            }
        } else {
            for (String runLevel : runLevels.keySet()) {
                if ("1".endsWith(runLevel)) {
                    throw new StrutsException("Run level dirs must be greater than 1. Run level 1 is reserved for the Felix bundles");
                }
                List<String> bundles = getBundlesInDir(runLevels.get(runLevel));
                configProps.put(AutoProcessor.AUTO_START_PROP + "." + runLevel, StringUtils.join(bundles, " "));
            }
        }
View Full Code Here

                context);

        try {
            velocityEngine.init(p);
        } catch (Exception e) {
            throw new StrutsException("Unable to instantiate VelocityEngine!", e);
        }

        return velocityEngine;
    }
View Full Code Here

            log.debug("childAdapters = " + adapters);
            log.debug("child = " + child);
        }
        int index = adapters.indexOf(child);
        if (index < 0)
            throw new StrutsException(child + " is no child of " + this);
        int siblingIndex = before ? index - 1 : index + 1;
        return ((0 < siblingIndex) && (siblingIndex < adapters.size())) ?
                ((Node) adapters.get(siblingIndex)) : null;
    }
View Full Code Here

TOP

Related Classes of org.apache.struts2.StrutsException

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.