cancel
Showing results for 
Search instead for 
Did you mean: 

2.2.0 webscripts in \extension\templates\webscript not found

stijndereede
Champ in-the-making
Champ in-the-making
Hi all,

I'm trying to develop an application in java which can add files to the repository. To this end I'm planning to extend the File Upload Sample webscript. Since this isn't available in Alfresco 2.1, I'm using 2.2.0dev.
The problem is that when using 2.2.0dev, the webscripts in /extension/templates/webscripts aren't loaded when I refresh the webscripts. When I put my webscript in /templates/webscripts it is loaded.
I know that I can easily continue developing by placing my webscript in the templates dir, but this isn't compliant to the standard. Is this a bug in 2.2.0dev?

Regards,

Stijn
2 REPLIES 2

davidc
Star Contributor
Star Contributor
If you switch on log4j.logger.org.alfresco.web.scripts=DEBUG in log4j.properties, the Web Script framework will log where it's finding Web Script files.

Also, if you go to the Web Script index page /alfresco/service/ and locate your Web Script (or File Upload, if you're extending it), and click on its ID, it should dump the complete Web Script to the browser allowing you to see where all its implementation files have been picked up from.

Also, note, that the extensions/templates/webscripts folder must exist before starting the server.  If it's not there at startup, it doesn't ever bother to look there, until a restart.

stijndereede
Champ in-the-making
Champ in-the-making
Ah, my bad, I made a mistake. I put the files in
\tomcat\webapps\alfresco\templates\webscripts
instead of in
\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\templates\webscripts

This whole directory structure is sometimes a bit confusing.