2

Currently the session storage saves all session files in a system dependand folder suited for session state files.

But in one of my applications I want the session files be saved in a special directory.

Can I change the root directory of the session storage?

splungebob
  • 5,357
  • 2
  • 22
  • 45
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329

1 Answers1

3

Yes, it's easy. From the ApplicationContext:

ApplicationContext.getLocalStorage().setDirectory(new File("/mydirectory"));

I often used it during GUI tests so that I could pre-setup the geometry required by my tests (rather than forcing move and resize at every test launch).

jfpoilpret
  • 10,449
  • 2
  • 28
  • 32