From forum.magnolia-cms.com:
Re: Create a Custom Magnolia Control using addInclude
2 by tmattsson on Jan 8, 2013 11:04:27 AM
The include request made to render your control goes to /.magnolia/dialogs/topicpages/pages/topicLayout.jsp
because you specify a relative path to the JSP. That's why it starts with /.magnolia/dialogs/
. If that's not intended you should use an absolute path to your JSP. The request is handled by a Spring DispatcherServlet
named controller
which does not have a controller (handler) that matches this path.
Try placing the JSP directly in the WEB-INF
folder and see if you can reach it with addInclude("/WEB-INF/topicLayout.jsp")
.
If you're trying to do an include
to a Spring DispatcherServlet
where a controller will render the controller(handler), then you can configure it in your module descriptor and target the include
to it and the controller inside it. In this case the .jsp
extension isn't necessary. It could be something like: addInclude("/custom-controls/topicLayout");
Note that it's always a good idea to keep JSP files in the WEB-INF
folder where they're not accessible from the outside for security reasons. Likewise you should take care that functionality you add to support your editors within the admin interface should not be publicly available from the outside. Everything mapped below /.magnolia
is protected and requires login.
Hope that helps!
// Tobias