Craig, IIRC, Trinidad is in fact writing to exactly those temporary directories already, as per the servlet spec. And using our ResourceServlet to pull from those directories. The issue isn't that - it's that GoDaddy is refusing to allow any File writing, even into those legit temporary directories. Which is lame of them. But likely impossible to change.
What Trinidad should do is store that .css file into memory, instead of the file system. We used to store a bunch of generated images on the file system, so using memory for all would be quite a pain, but that isn't the case anymore. It'd be a bit slower at startup - when restarting the server, you have to regenerate the file - but for that matter, we have bugs caused by failing to regenerate the .css file in some circumstances. -- Adam -- Adam On 11/20/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 11/16/06, Siarhei Berdachuk <[EMAIL PROTECTED]> wrote: > > Hello > > I have same problems on the my web hosting (Godaddy). > There is file permission restrictions for writing from java. > > I'm build trinidad examples from sources, they works fine on my local host > (Windows XP, Tomcat 5.0.28, j2sdk 1.5.0_7) but when I try deploy them to > godaddy > java enabled Linux hosting (Linux, Tomcat 5.0.27, 1.5.0_06-b05), this > examples not works. > Hosting server configuration: > http://www.lostcd.com/jsp-examples/snp/sysinfo.jsp > > Then I'm deployd Tomcat jsp examles there and they are works fine: > http://www.lostcd.com/jsp-examples/index.html > > I found article: > http://www.oisv.com/articles/web_design/godaddy_gotchas/ > where described about some file permission restrictions for writing and > possible problem in Log4j. > Part from it: "In retrospect, this is fairly obvious since all users on > the shared server run under the same Java virtual machine instance. > Tomcat and Java just do not have the fine-grained ability to assigned > directory-based permissions in such as configuration." I cannot see the above article without a login, but *if* GoDaddy is using the Java security manager to enforce restrictions (which certainly makes sense in a shared JVM environment), it is actually possible to be fine grained about file access permissions, but it is pretty tedious. I like trinidad components, but can not use them on my hosting for new > projects :( > May be somebody have solution for how resolve this problem. I have not looked at the Trinidad source code yet, but one option (if it's not being done already) is for the file writing to be done into a temporary directory that the servlet spec requires be made available (and writable) to each individual webapp. Trinidad can get access to this as follows: FacesContext context = FacesContext.getCurrentInstance(); File tempDirectory = (File) context.getExternalContext ().getApplicationMap().get ("javax.servlet.context.tempdir"); // tempDirectory is a java.io.File object representing a writable temporary directory // that the webapp can be used to create scratch files It might still take some additional mechanisms to cause this file to ultimately be delivered to the client (since it's not in the webapp's resource space), but this should get the library around file write restrictions. Thank you, > Siarhei Berdachuk > http://www.berdaflex.com > > > Craig
