Package net.sourceforge.stripes.exception

Examples of net.sourceforge.stripes.exception.StripesServletException


        }
        catch (Exception e) {
            log.fatal(e,
                    "Could not instantiate specified Configuration. Class name specified was ",
                    "[", clazz.getName(), "].");
            throw new StripesServletException("Could not instantiate specified Configuration. "
                    + "Class name specified was [" + clazz.getName() + "].", e);
        }

        this.configuration.setBootstrapPropertyResolver(bootstrap);
        this.configuration.init();
View Full Code Here


        try {
            this.multipart =
                    StripesFilter.getConfiguration().getMultipartWrapperFactory().wrap(request);
        }
        catch (IOException e) {
            throw new StripesServletException("Could not construct request wrapper.", e);
        }
    }
View Full Code Here

     * once, on the first invocation of {@code doFilter(..)}.
     */
    protected void doOneTimeConfiguration() throws ServletException {
        stripesFilter = (StripesFilter) servletContext.getAttribute(StripesFilter.class.getName());
        if (stripesFilter == null) {
            throw new StripesServletException("Could not get a reference to StripesFilter from "
                    + "the servlet context. The dynamic mapping filter works in conjunction with "
                    + "StripesFilter and requires that it be defined in web.xml");
        }
        initialized = true;
    }
View Full Code Here

            }

            setActionBeanContext(bean, context);
        }
        catch (Exception e) {
            StripesServletException sse = new StripesServletException(
                "Could not create instance of ActionBean type [" + beanClass.getName() + "].", e);
            log.error(sse);
            throw sse;
        }
View Full Code Here

     * @param bean the ActionBean to test to see if getContext() works correctly
     * @throws StripesServletException if getContext() returns null
     */
    protected void assertGetContextWorks(final ActionBean bean) throws StripesServletException {
        if (bean.getContext() == null) {
            throw new StripesServletException("Ahem. Stripes has just resolved and instantiated " +
                    "the ActionBean class " + bean.getClass().getName() + " and set the ActionBeanContext " +
                    "on it. However calling getContext() isn't returning the context back! Since " +
                    "this is required for several parts of Stripes to function correctly you should " +
                    "now stop and implement setContext()/getContext() correctly. Thank you.");
        }
View Full Code Here

        Map<String,Method> mappings = this.eventMappings.get(bean);
        Method handler = mappings.get(eventName);

        // If we could not find a handler then we should blow up quickly
        if (handler == null) {
            throw new StripesServletException(
                    "Could not find handler method for event name [" + eventName + "] on class [" +
                    bean.getName() + "].  Known handler mappings are: " + mappings);
        }

        return handler;
View Full Code Here

            Method handler = handlers.get(DEFAULT_HANDLER_KEY);
            if (handler != null) return handler;
        }

        // If we get this far, there is no sensible default!  Kaboom!
        throw new StripesServletException("No default handler could be found for ActionBean of " +
            "type: " + bean.getName());
    }
View Full Code Here

                    }
                }

                // Insist that we have a handler
                if (handler == null) {
                    throw new StripesServletException(
                            "No handler method found for request with  ActionBean [" +
                            bean.getClass().getName() + "] and eventName [ " + eventName + "]");
                }

                log.debug("Resolved event: ", context.getEventName(), "; will invoke: ",
View Full Code Here

            }
            else if (ite.getTargetException() instanceof RuntimeException) {
                throw (RuntimeException) ite.getTargetException();
            }
            else {
                throw new StripesServletException
                    ("ActionBean execution threw an exception.", ite.getTargetException());
            }
        }
        catch (Exception e) {
            throw new StripesServletException("Exception encountered processing request.", e);
        }
        finally {
            // Make sure to release the page context
            if (pageContext != null) {
                JspFactory.getDefaultFactory().releasePageContext(pageContext);
View Full Code Here

            }

            setActionBeanContext(bean, context);
        }
        catch (Exception e) {
            StripesServletException sse = new StripesServletException(
                "Could not create instance of ActionBean type [" + beanClass.getName() + "].", e);
            log.error(sse);
            throw sse;
        }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.exception.StripesServletException

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.