Re: [Winstone-devel] JSP scratch path
Status: Beta
Brought to you by:
rickknowles
From: Premek B. <br...@ki...> - 2007-12-13 09:30:03
|
Hi Rick, good tip, works without problems. Thanks a lot! Premek On 8.12.2007 7:50, Rick Knowles wrote: > Premek, > > Glad it's working out well for you - nice to know it's helping do a > little good. > > Regarding the scratch path: I'm not sure exactly how jasper does it, but > I was under the impression it uses the webapps temp dir setting, which > is drawn (by winstone) from the command line java.io.tmpdir property, so > if you start winstone with > > java -Djava.io.tmpdir=<scratchpath> -jar winstone.jar --webroot= ... > > it should allow you to define a separate scratchpath per container > instance. As Jasper is essentially a webapp-scoped feature (i.e. nothing > JSP related is shared by the container across webapps), it ends up using > the tomcat "work" directory for scratch when deployed in tomcat. > Winstone uses the java.io.tmpdir property to draw the location of the > place it uses instead of the "work" directory. > > Good luck - hope this helps, > > Rick > > Premek Brada wrote: >> Hello, >> >> first of all, thanks Rick for Winstone - we use this marvellous little >> thing in a university course where 80+ students learn their first >> servlets and JSPs, and it's working really well (one winstone per >> student, zero server load, easy restarts - situation incomparable to >> that when we used tomcat for the same job ;-). >> >> We have however run into one issue: when multiple winstones are running >> on a single server, the JSP compilation scratch directory is the same >> for all of them. In turn, when two students have a JSP with the same >> name (which they are bound to have) their changes get mutually >> overwritten. >> >> Is there any way how to solve this, ie. how to give each winstone a >> different scratch directory? At least a quick hack for now, and in the >> longer term something like --jspScratchDir option, ideally? >> >> Thanks, >> Premek >> >> > -- Premek Brada (Ing et MSc, PhD) Lecturer, Department of Computer Science and Engineering University of West Bohemia in Pilsen, CZ << brada at kiv.zcu.cz | www.kiv.zcu.cz/~brada/ | +420-377-63-2435 >> "Major success exists in embryonic form 15 years before it becomes a major success." (B.Stroustroup) |