This page explains how a web-app should be configured in order to work properly with Makumba.

!!!Makumba controller filter mapping

In order to work properly, the following filter should be mapped in WEB-INF/web.xml:
[{Code      
               
            <filter>
                <filter-name>makumba_controller</filter-name>
                <filter-class>org.makumba.controller.http.ControllerFilter</filter-class>
            </filter>
            
            <filter-mapping>
                <filter-name>makumba_controller</filter-name>
                <url-pattern>*.jsp</url-pattern>
            </filter-mapping>
            <filter-mapping>
                <filter-name>makumba_controller</filter-name>
                <url-pattern>*.jspx</url-pattern>
            </filter-mapping>
            <filter-mapping>
                <filter-name>makumba_controller</filter-name>
                <url-pattern>/mak-tools</url-pattern>
            </filter-mapping>
            <filter-mapping>
                <filter-name>makumba_controller</filter-name>
                <url-pattern>/mak-tools/*</url-pattern>
            </filter-mapping> 
}]
        
The mappings are needed for the following reasons:

* *.jsp: to enable authentication/authorisation on JSP page access, and to enable form processing

* *.jspx: to enable the source-code viewer for JSP files

* /mak-tools/ and /mak-tools/*: to enable the various Makumba tools, such as the MDD viewer.

[{Box

The /mak-tools path can be configured in Makumba.conf, see the [Makumba tools path configuration|MakumbaConfiguration#MakumbaToolsPathMakumbaToolPaths]
}]

!!!Custom error handling

By default, Makumba throws errors using its internal layout. To enable the custom error for some pages of your application, you only need to create an {{error.jsp}} file in the root folder of your web-app and it will be used for all subfolders.

If you want a different error message for specific pages, these will need to be in their own folder and you will need to put a different error.jsp file in that folder. In other words, Makumba searches for {{error.jsp}} starting from the folder of the page that caused the error and going to all the parent folders until it finds it or reaches the root of application in which case it shows the default error page.

!Content of error.jsp
It is advised to use a simple HTML document as error.jsp, or to minimize the additional code (Makumba, JSTL, etc.).

There are 3 attributes that should be placed somewhere in the page to get the error information:

* mak_error_title - gives the title of the error
* mak_error_description - gives the error description which is normally the content of the default error page
* mak_error_realpath - gives you the path to the file that caused the error


%%(display:none;)[Category Configuration]%%
