tomcat - Grails _Events.groovy not working on production server, works on dev though -
I want to mapped the external directory as a resource for the application posted on tramcat.
I have already gone through the thread and tried several ways:
-
I added _Events.groovy and it is my god machine (Windows 7), but when I deploy it on the production server, it does not map the external folder to the reference root.
import org.apache.catalina * Import org.apache.catalina.connector. * Import org.apache.catalina.loader.WebappLoader Event Configuratom cat = {TOKKET - & gt; Println "changing tag setting ..." string imageDir = '/ usr / imgs'; If ('window') is included in the system (properties) ['osnames']?. ToLowerCase (?)?. {ImageDir = 'c: / usr / imgs'; } Println "Product Image Image:" + imageDir; Def context = tomcat? .addwebapp ('/ imgs', imageDir) def loader = new WebappLoader (tomcat.class.classLoader) loader.addRepository (new file (imageDir) .toURI () .toURL () .toString ()) Loader .container = context context .loader = loader}
-
My reference is the root name Rick, and I tried to add the following reference to Server.xml, even this Do not work for me.
& lt; Hostname = "localhost" appbase = "webapps" unpack wars = "true" autodynamic = "true" & gt; . . . & Lt; Reference path = "/ ri" dockbase = "/ usr / imgs" reloadable = "true" cross-context = "true" /> & Lt; Reference path = "docBase =" / usr / imgs "reloadable =" true "cross-context =" right "/> ...
-
Along with Tomato 7 as well as it has been tried, which is not working.
I Since the days I have been trying, I have given reference to all threads and tutorials, but it is not working.
Am I doing something wrong?
Try logging in to the system such as su - tomcat
(or whatever other username you have started) and / usr / imgs
Use.
Then change those permissions frequently, chmod -R
.
Comments
Post a Comment