cancel
Showing results for 
Search instead for 
Did you mean: 

Webscripts and AMP modules in Alfresco 2.1

kma
Champ in-the-making
Champ in-the-making
Hi,

I have developed my own webscript and now I want to add it to
my AMP module.  What is the recommend location and how do I
register the webscript to make Alfresco aware of it, 
in module-context.xml ?


Thanks,
Karsten
1 REPLY 1

renspr
Champ in-the-making
Champ in-the-making
Hi,

that is simple. For example create a folder called "webscripts" in your amp project where your module-context.xml exists. In my projects this looks something like this:

[project_dir]
      |
      -> config
              |
              -> alfresco
                       |
                       -> module
                                |
                                -> [my_module_id]
                                               |
                                               -> webscripts
                                               |
                                               -> module-context.xml
                                               |
                                               -> …

Put your webscripts in the "webscripts" folder. In the module-context.xml you have to tell Alfresco about this script location. Just add:

[…]

<bean parent="webscripts.classpathstore">
    <property name="mustExist"><value>true</value></property>
    <property name="classPath"><value>alfresco/module/[my_module_id]/webscripts</value></property>
</bean>

[…]

Thats it. Hope this helps.

Best regards, René