cancel
Showing results for 
Search instead for 
Did you mean: 

webscript js refresh in dev mode for 3.2

bmignon
Champ in-the-making
Champ in-the-making
Hello,

When using version 3.2, if I update the js part of a webscript, the modication are only taken into account when I refresh the webscript.

It seems that the code is compiled or cached.

I can I turn that off during development.

Regards

Bertrand
1 REPLY 1

bmignon
Champ in-the-making
Champ in-the-making
Hello,

This is related to

http://issues.alfresco.com/jira/browse/ALF-2107 (Thanks to Helen).


Based on the info in the ticket I made a jsp page in alfresco webapp with this code

So I just have to call that jsp when I want to clear the cache.
That way the default behavior of compile script is kept (performance) and I don't have to wait for 3.1SP1).

Regards

Bertrand



<%@page import="java.util.*,java.io.*" %>
<%



org.springframework.context.ApplicationContext ctx = org.springframework.web.jsf.FacesContextUtils.getWebApplicationContext(javax.faces.context.FacesContext.getCurrentInstance());
//out.print(ctx.toString());


org.alfresco.repo.jscript.RhinoScriptProcessor jspr = (org.alfresco.repo.jscript.RhinoScriptProcessor)ctx.getBean("javaScriptProcessor");

jspr.reset();

%>