0

I am using apache wicket 1.5 and when a new session is initialized I want to create a new temp folder:

Example:

Session_1_connect -> create_temp_1

Session_1_disconnect -> delete_temp_1

A new user logs in:

Session_2_connect -> create_temp_2

Session_2_disconnect -> delete_temp_2

I know how to make dirs in java, thats not a problem. Its just how to configure it in wicket?

David Sonnenfeld
  • 688
  • 5
  • 17
  • 31

2 Answers2

0

In the constructor of the Session seems a logical place.. just make sure you delete the folder after a while..

Rob Audenaerde
  • 19,195
  • 10
  • 76
  • 121
0

You could solve this even without Wicket by simply implemeting the functionality in sessionCreated() and sessionDestroyed() in your own HttpSessionListener and then adding it like this to your web.xml:

<listener>
  <listener-class>org.your.package.YourSessionListener</listener-class>
</listener>
DerMiggel
  • 483
  • 4
  • 8