Package org.apache.struts.config

Examples of org.apache.struts.config.ModuleConfig


        HttpServletRequest request = context.getHttpRequest();
        HttpServletResponse response = context.getHttpResponse();
        ServletContext servletContext = getServletContext();
        PageFlowController retVal = null;
        String modulePath = InternalUtils.inferModulePathFromClassName( pageFlowClass.getName() );
        ModuleConfig mc = ensureModule( modulePath, request, servletContext );

        if ( mc == null )
        {
            _log.error( "Struts module " + modulePath + " not found for " + pageFlowClass.getName()
                        + "; cannot create page flow.");
View Full Code Here


        throws ClassNotFoundException, InstantiationException, IllegalAccessException
    {
        String parentDir = PageFlowUtils.getModulePathForRelativeURI( path );
        HttpServletRequest request = context.getHttpRequest();
        HttpServletResponse response = context.getHttpResponse();
        ModuleConfig mc = InternalUtils.ensureModuleConfig( parentDir, request, getServletContext() );
        LinkedHashMap/*< String, SharedFlowController >*/ sharedFlows = getDefaultSharedFlows( context );

        if ( mc != null )
        {
            ControllerConfig cc = mc.getControllerConfig();

            if ( cc instanceof PageFlowControllerConfig )
            {
                Map/*< String, String >*/ sharedFlowTypes = ( ( PageFlowControllerConfig ) cc ).getSharedFlowTypes();

View Full Code Here

    }   
   
    private static ModuleConfig ensureModule( String modulePath, ServletRequest request,
                                              ServletContext servletContext )
    {
        ModuleConfig mc = InternalUtils.getModuleConfig( modulePath, servletContext );       
       
        if ( mc == null )
        {
            ActionServlet as = InternalUtils.getActionServlet( servletContext );
               
View Full Code Here

   
    public boolean isPreviousActionInfoDisabled()
    {
        if ( alwaysTrackPreviousAction() ) return false;
       
        ModuleConfig mc = getModuleConfig();
        ControllerConfig cc = mc.getControllerConfig();      
        return cc instanceof PageFlowControllerConfig && ( ( PageFlowControllerConfig ) cc ).isReturnToActionDisabled();
    }
View Full Code Here

   
    public boolean isPreviousPageInfoDisabled()
    {
        if ( alwaysTrackPreviousPage() ) return false;
       
        ModuleConfig mc = getModuleConfig();
        ControllerConfig cc = mc.getControllerConfig();      
        return cc instanceof PageFlowControllerConfig && ( ( PageFlowControllerConfig ) cc ).isReturnToPageDisabled();
    }
View Full Code Here

    public static String getFlowControllerClassName( String modulePath, ServletRequest request, ServletContext context )
    {
        //
        // We're going to look in the struts config to get the PageFlowController class.
        //
        ModuleConfig mc = ensureModuleConfig( modulePath, request, context );
        return mc != null ? getFlowControllerClassName( mc ) : null;
    }
View Full Code Here

     */
    public static ModuleConfig ensureModuleConfig( String modulePath, ServletRequest request, ServletContext context )
    {
        try
        {
            ModuleConfig ret = getModuleConfig( modulePath, context );

            if ( ret != null )
            {
                return ret;
            }
View Full Code Here

        }
    }

    public static boolean isMultipartHandlingEnabled( ServletRequest request )
    {
        ModuleConfig moduleConfig = ( ModuleConfig ) request.getAttribute( Globals.MODULE_KEY );
        return moduleConfig.getControllerConfig().getMultipartClass() != null;
    }
View Full Code Here

        return qualifiedAction;
    }

    public static String createActionPath( ServletRequest request, String qualifiedAction )
    {
        ModuleConfig appConfig = ( ModuleConfig ) request.getAttribute( Globals.MODULE_KEY );

        if ( appConfig != null )
        {
            InternalStringBuilder value = new InternalStringBuilder( qualifiedAction.length() + 16 );
            value.append( appConfig.getPrefix() );
            value.append( qualifiedAction );
            return value.toString();
        }

        return qualifiedAction;
View Full Code Here

    /**
     * Get the Struts ActionConfig for the given action config path and module path.
     */
    public static ActionConfig findActionConfig( String actionConfigPath, String modulePath, ServletContext context )
    {
        ModuleConfig moduleConfig = getModuleConfig( modulePath, context );
        assert moduleConfig != null;
        return moduleConfig.findActionConfig( actionConfigPath );
    }
View Full Code Here

TOP

Related Classes of org.apache.struts.config.ModuleConfig

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.