The include controller tag includes all the resources available in the
controller. For example;
In common-controller.xml if you start from top then you see the following
entries;
- error page entry, it will tell the controller which page will show on
error. Even if you can override in your own controller, if not it will
point to same relative position of the component you have added.
- Event Handlers, these are the event handlers which in turn you use while
setting a request uri entry in the controller file.
- View Handlers, while setting view map and setting the type="ftl" it will
refer to mapped handler entry in the controller.
- There are some pre-processors and post-processor events which should
update or check something in every requests.
- Request uri entries.
When you include a controller in your controller then all these entries
will be available in your controller. Now if you want to do not include
controller then you can skip this and copy all required handlers, pre and
post processor entries in your own controller.
For resolving the specific problem you mentioned, please check that the
htmlTemplate.ftl is at the same location or at different location you have
entered or or it exists or not.
--
Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.comOn Thu, Jul 12, 2012 at 10:31 AM, Prabhakar Pandey <
[hidden email]>wrote:
> Hi,
> what does these two lines do?
>
> <include
> location="component://common/webcommon/WEB-INF/common-controller.xml"/>
> <include
> location="component://common/webcommon/WEB-INF/portal-controller.xml"/>
>
> do i need to include these two lines in every controller?
>
> when i mention
> <view-map name="main" type="ftl" page="main.ftl"/>
>
> it gives an error *ERROR rendering error page [/error/error.jsp], but here
> is the error text: java.io.FileNotFoundException: Template
> component://common/webcommon/includes/htmlTemplate.ftl not found.
>
> how to resolve this 1?
> *
>