Package org.apache.struts2

Examples of org.apache.struts2.TestConfigurationProvider


    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

                token
        });
    }

    protected void setUp() throws Exception {
        loadConfigurationProviders(new TestConfigurationProvider());

        session = new TreeMap();
        params = new TreeMap();
        extraContext = new TreeMap();
        extraContext.put(ActionContext.SESSION, session);
View Full Code Here

    }

    // form
    public void testFormComponentDisposeItselfFromComponentStack() throws Exception {
        configurationManager.clearContainerProviders();
        configurationManager.addContainerProvider(new TestConfigurationProvider());
        ActionContext.getContext().setValueStack(stack);

        request.setupGetServletPath("/testAction");

        ActionErrorTag t = new ActionErrorTag();
View Full Code Here

    }

    protected void setUp() throws Exception {
        super.setUp();
        configurationManager.clearConfigurationProviders();
        configurationManager.addConfigurationProvider(new TestConfigurationProvider());
        ActionContext.getContext().setValueStack(stack);
    }
View Full Code Here

        });
    }

    protected void setUp() throws Exception {
        configurationManager.clearConfigurationProviders();
        configurationManager.addConfigurationProvider(new TestConfigurationProvider());
        configurationManager.reload();

        session = new HashMap();
        params = new HashMap();
        extraContext = new HashMap();
View Full Code Here

TOP

Related Classes of org.apache.struts2.TestConfigurationProvider

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.