Last change
on this file since 35719 was 35719, checked in by cstephen, 2 years ago |
Add support for JSON response to direct input queries. Cleanup other components.
|
File size:
661 bytes
|
Line | |
---|
1 | package web.listeners;
|
---|
2 |
|
---|
3 | import java.io.File;
|
---|
4 | import javax.servlet.http.HttpSessionEvent;
|
---|
5 | import javax.servlet.http.HttpSessionListener;
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * To change this template, choose Tools | Templates
|
---|
9 | * and open the template in the editor.
|
---|
10 | */
|
---|
11 | /**
|
---|
12 | *
|
---|
13 | * @author OEM
|
---|
14 | */
|
---|
15 | public class MyHttpSessionListener implements HttpSessionListener {
|
---|
16 |
|
---|
17 | public void sessionCreated(HttpSessionEvent se) {
|
---|
18 | //do nothing
|
---|
19 | }
|
---|
20 |
|
---|
21 | public void sessionDestroyed(HttpSessionEvent se) {
|
---|
22 | String filepath = (String) se.getSession().getAttribute("filepath");
|
---|
23 | File file = new File(filepath);
|
---|
24 | if (file.exists()) {
|
---|
25 | file.delete();
|
---|
26 | }
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.