Configuration object - filepermission issue
the real mckoy <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hi:
when creating an instance of Configuration, it tries to read the default runtime directory.
Would it be possible to explicitly set that directory for the Configuration object because the classloader that is creating the Configuration should not have access to that directory (the default runtime directory, in my Webserver context anyway).
java.security.AccessControlException: access denied (java.io.FilePermission C:\Users\admin\workspace\appserver read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.exists(Unknown Source)
at freemarker.cache.FileTemplateLoader$1.run(FileTemplateLoader.java:124)
I set template directory later with:
cfg.setDirectoryForTemplateLoading(context.getDocumentsDirectory());
but its too late the exception is thrown at the creation of the Configuration object.
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user