cancel
Showing results for 
Search instead for 
Did you mean: 

Need to restart alfresco every time I change a web script?

cile87
Champ on-the-rise
Champ on-the-rise
Is there any other way of deploying a java based web script without restarting alfresco in tomcat manager. It takes at least several minutes to start the whole alfresco application again, so it's painfully slow development.

I'm using NetBeans where i included all the JARs from c:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\ and then I create my own JAR, copy it into same folder and restart alfresco in tomcat. Only then does my webscript reload.

Thanks.
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
Is there any other way of deploying a java based web script without restarting alfresco in tomcat manager. It takes at least several minutes to start the whole alfresco application again, so it's painfully slow development.
No, because each WebScript must be declared as a Spring Bean that by default it is a singleton. This means that all the WebScripts must be declared and instantiated only at bootstrap time.

You should manage Spring beans programmatically using the Spring Core API adding beans using Java and trying to copy the classes directly in the deploy folder of Tomcat following the classpath resource. But anyway this is not a clean way to follow to manage a development project as an Alfresco extension project.

Hope this helps.

mrogers
Star Contributor
Star Contributor
When I've developed Java backed web scripts I've used Unit Tests and run them from within Eclipse.   There's no need to deploy and restart tomcat, except the first time when the spring config is changed.