comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Multidimensional hash - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb079f5a11951085 * applet security issues - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/826c15e115e334c0 * Class Method errors - 6 messages, 4 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/288690b63d1adb9f * NetBeans 4.0 totally blows. What other IDE's are available? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd46bbd76ba757ee * gui design - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/35871a88d90f3245 * Class - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/265ec730df4de5b6 * Creating funny objects - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/275532460061ec7 * can't find class file - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/41f61eb9d8c24f1c * Java speed vs. C++. - 3 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e29354c898cb3523 * Zip/UnZip char [] - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/becaa86f0228fd4f * search(Object criteria) - to vague? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8c9970db76f9ab70 * file separator - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3f2ceedb5d08e69f * looking for eclipse plugin for user management in RCP application - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dd7f8897a1463dc8 * "static" prefix - to parallel "this" prefix - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5dde10882ac2157 * HttpSession expired vs. invalidated - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dbbb2dba35e4659b ============================================================================== TOPIC: Multidimensional hash http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb079f5a11951085 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 12:49 pm From: bugbear Michael Borgwardt wrote: > Todd B. wrote: > >> I would like to create a multidimensional hash such as: . . . > > It might be that the Apache Commons Collections have something like > that, but I > doub it: > http://jakarta.apache.org/commons/collections/ http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/MultiKeyMap.html RTFM, HTH. BugBear ============================================================================== TOPIC: applet security issues http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/826c15e115e334c0 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 7:53 am From: "Matt Humphrey" "Matthijs Blaas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > There is no solution to this problem for publically available games > > (e.g. those that do not require authentication.) A client can run whatever > > code the user likes and there's nothing you can do about it. Regardless > > of > > whether they hack your applet directly via the browser cache or if they > > simply copy it and run it directly, > > It's impossible to run it directly and upload a score as it needs an server > sided game session in our case. For that there is somekind of > authentication, > for a user to upload a score he must have registered an account with us and > must be logged in. The server must have created an session which is valid > for > that game played. Having an authentication mechanism is a good start. Keep in mind that it's not so much the applet that is being replicated but the communications protocol. If they can observe the applet and get the session id, etc, they can manufacture new statements against your server. > > > you have no way to authenticate the communication from that applet to your > > website and they are free to spoof that communication in any way they can > > try. > > Bottom line: you cannot rely on the client to perform security checks for > > you. > > True, but I thought there might be some common way of making it very > difficult > to tamper with the applet, as there must be more applications that want to > make > that as difficult as possible... I know obfuscating is one, but maybe there > is a logic > way of doing this too... for example force it to be never cached: If the applet runs on their machine they can always get it by a direct GET request. It really is just a matter of deciding how difficult you want the process to be. > make a small loader class that each time gets downloaded from another url (a > variable url like: > /123ab/loader.class, or 123cd/loader.class). That way the jvm will never use > an > cached version. Problem is that such methods are a bit clumsy, take a lot of > unnecesary > bandwidth & cache on the client. It's not hackproof for sure, but will make > it harder. I've looked at encrypted custom loaders and it doesn't seem to make things that much more difficult. The top level of the applet must be downloadable and from there it can be disected and re-wrapped in order to provide access to the embedded classloader. It seems like you're already doing as well as you can. Cheers, Matt Humphrey [EMAIL PROTECTED] http://www.iviz.com/ ============================================================================== TOPIC: Class Method errors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/288690b63d1adb9f ============================================================================== == 1 of 6 == Date: Mon, Dec 6 2004 12:53 pm From: "Mick" Getting a compile error when trying to access any of the 'set*' methods for a Gregorain Calendar object. Ex. Calendar this_Cal = new Gregorian Calendar(); java.util.Date thisDate = new java.util.Date(); thisCal.setTime(thisDate); Generates... org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null The 'get' methods work fine. -- Mick == 2 of 6 == Date: Mon, Dec 6 2004 7:01 am From: "Ryan Stewart" "Mick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Getting a compile error when trying to access any of the 'set*' methods > for > a Gregorain Calendar object. > > Ex. > > Calendar this_Cal = new Gregorian Calendar(); > > java.util.Date thisDate = new java.util.Date(); > > thisCal.setTime(thisDate); > > Generates... > > org.apache.jasper.JasperException: Unable to compile class for JSP > An error occurred at line: -1 in the jsp file: null > > > The 'get' methods work fine. > If that's the actual code, this_Cal != thisCal. If it's not, show us the code. == 3 of 6 == Date: Mon, Dec 6 2004 1:09 pm From: Andrew Thompson On Mon, 6 Dec 2004 07:01:52 -0600, Ryan Stewart wrote: > ..show us the code. More specifically, an SSCCE <http://www.physci.org/codes/sscce.jsp> And this may be a better group for such questions.. <http://www.physci.org/codes/javafaq.jsp#cljh> -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane == 4 of 6 == Date: Mon, Dec 6 2004 1:47 pm From: "Mick" > > Getting a compile error when trying to access any of the 'set*' methods > > for > > a Gregorain Calendar object. > > > > Ex. > > > > Calendar this_Cal = new Gregorian Calendar(); > > > > java.util.Date thisDate = new java.util.Date(); > > > > thisCal.setTime(thisDate); > > > > Generates... > > > > org.apache.jasper.JasperException: Unable to compile class for JSP > > An error occurred at line: -1 in the jsp file: null > > > > > > The 'get' methods work fine. > > > If that's the actual code, this_Cal != thisCal. If it's not, show us the > code. Sorry - typo, it should've been: Calendar thisCal = new Gregorian Calendar(); Page Code(a simple test) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <%@ page language="java" import="java.sql.*, java.lang.*, java.util.*, java.text.*"%> <html> <head> <title>Simple Test</title> </head> <body> <%! String strD = "5/11/2004 09:00:00"; java.util.Date thisDate_1 = new java.util.Date(strD); Calendar thisCal_1 = new GregorianCalendar(); // This will work long thisLongDate1 = thisCal_1.getTimeInMillis(); // This won't thisCal_1.setTime(thisDate_1); %> <p></p> <p>Long: <%= thisLongDate1%></p> <p></p> <p>Date: <%= thisCal_1%></p> </body> </html> == 5 of 6 == Date: Mon, Dec 6 2004 2:56 pm From: Michael Borgwardt Mick wrote: > <%! > String strD = "5/11/2004 09:00:00"; > java.util.Date thisDate_1 = new java.util.Date(strD); > Calendar thisCal_1 = new GregorianCalendar(); > // This will work > long thisLongDate1 = thisCal_1.getTimeInMillis(); > // This won't > thisCal_1.setTime(thisDate_1); > %> That's a declaration (opened with '<%!'), not a scriptlet ('<%'), and therefore cannot contain normal expressions, only declarations. You probably only need to drop the exclamation mark for it to work. == 6 of 6 == Date: Mon, Dec 6 2004 2:08 pm From: "Mick" Thanks! I was certain I had tried it that way originally and had changed it 'grasping at straws' but... it works now. > That's a declaration (opened with '<%!'), not a scriptlet ('<%'), and > therefore cannot contain normal expressions, only declarations. > You probably only need to drop the exclamation mark for it to work. ============================================================================== TOPIC: NetBeans 4.0 totally blows. What other IDE's are available? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd46bbd76ba757ee ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 12:56 pm From: bugbear xarax wrote: > Subject line says it all. NetBeans 4.0 is a > total disaster. Good analysis. You've raised several important and interesting points I'll need to ponder in depth. BugBear ============================================================================== TOPIC: gui design http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/35871a88d90f3245 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 5:18 am From: "Mike Beaty" Core Java I - Fundamentals is one of the best Java books I have ever read. The examples are clear and useful. They also cover a lot of the basics for GUI applications. Volume II of this series goes into a lot more detail about some other programming aspects, including GUI programming and design. http://www.amazon.com/exec/obidos/tg/detail/-/0131482025/qid=1102338973/sr=8-2/ref=pd_csp_2/103-3229633-0300625?v=glance&s=books&n=507846 GEBUH wrote: > Hi all, I'm new to java, can anyone recommend a good book/source on good gui > design? I'm trying to learn how to write clean, efficient gui interfaces that > could be done independently of the code that will use it. > thanx > gebuh ============================================================================== TOPIC: Class http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/265ec730df4de5b6 ============================================================================== == 1 of 2 == Date: Mon, Dec 6 2004 5:22 am From: [EMAIL PROTECTED] (Ah Ming) Thanks for your response! How about the following classes? CASE 1: class ABC { public int aMethod(int a) { ...... } private void aMethod(int a) { ...... } } CASE 2: class ABC { public int aMethod(int a) { ...... } public void aMethod(int a) { ...... } } == 2 of 2 == Date: Mon, Dec 6 2004 1:39 pm From: Joona I Palaste Ah Ming <[EMAIL PROTECTED]> scribbled the following: > Thanks for your response! How about the following classes? > CASE 1: > class ABC { > public int aMethod(int a) { > ...... > } > private void aMethod(int a) { > ...... > } > } This should not compile. Method overloading is done by parameters only, not by return types. Having two methods with the same name and the same parameters but different return types causes a compile-time error. > CASE 2: > class ABC { > public int aMethod(int a) { > ...... > } > public void aMethod(int a) { > ...... > } > } This case is the same as the above. -- /-- Joona Palaste ([EMAIL PROTECTED]) ------------- Finland --------\ \-------------------------------------------------------- rules! --------/ "Life without ostriches is like coffee with milk." - Mika P. Nieminen ============================================================================== TOPIC: Creating funny objects http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/275532460061ec7 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 6:04 am From: [EMAIL PROTECTED] factory classes are also used to pool or cache objects for reuse. ============================================================================== TOPIC: can't find class file http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/41f61eb9d8c24f1c ============================================================================== == 1 of 2 == Date: Mon, Dec 6 2004 6:09 am From: "zpetero" I knew it was deprecated, http://www.porcupyne.org/docs/struts1.1/deprecated-list.html but I still use other deprecated methods and they work. What replaced it? Peter Ryan Stewart wrote: > "Peter" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi all, > > > > I am trying to log servlet messages but can't get this code to > > compile, > [...] > > The error is, > > LogonAction.java:67: cannot find symbol > > symbol : method getDebug() > > location: class org.apache.struts.action.ActionServlet > > If (servlet.getDebug () <=1) > > > > I even tried unzipping the struts.jar file in the directory I am > > compiling from. > > > > I am at wits end and really appreciate your help.. > > > The problem has nothing to do with not finding the class. On the contrary, > it's finding that just fine. The problem is that there's no "getDebug()" > method in Struts' ActionServlet. What led you to believe that there was? == 2 of 2 == Date: Mon, Dec 6 2004 3:28 pm From: Michael Borgwardt zpetero wrote: > I knew it was deprecated, > > http://www.porcupyne.org/docs/struts1.1/deprecated-list.html > > but I still use other deprecated methods and they work. Well, you shouldn't. "Deprecated" really does mean that the element in question might be removed entirely in the next version. The Sun people are extremely reluctant about doing that in the standard API (I think it has never actually happened), the Struts team apparently not. > What replaced it? It says right there in the URL you cited: "Deprecated. Configure the logging detail level in your underlying logging implementation" ============================================================================== TOPIC: Java speed vs. C++. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e29354c898cb3523 ============================================================================== == 1 of 3 == Date: Mon, Dec 6 2004 6:19 am From: [EMAIL PROTECTED] using console output as a test of performance will not reflect your actual results creating web applications. 1) you should test both C++ and JAVA programs using socket listeners. measure the performance from entry into main() and exit from main(). do a thousand or so requests (a single printf is not a valid test. using a thousand will average the performance over time) use an external program to send the requests. do some processing on each request. 2) there are probably benchmarks on the internet already comparing c++ and java, save yourself some time and use Google to find them. i found these quickly: http://www.idiom.com/~zilla/Computer/javaCbenchmark.html, http://www.javaworld.com/javaworld/jw-02-1998/jw-02-jperf_p.html 3) thousands of commercial websites run using tomcat/java as the basis for their web apps with perfectly acceptable performance results, running multiple websites from a single tomcat instance with a few thousand hits per hour. 4) in the long run, you will find java web apps to be more easily maintained than c++ apps because you can use open sourced MVC tools like Struts to handle a lot of the work for you 5) when doing benchmarks, use profiling tools (gcc -g) to determine where your time is spent. especially in complex programs. hope this helps. best of luck to you in your website. greg == 2 of 3 == Date: Mon, Dec 6 2004 6:20 am From: [EMAIL PROTECTED] using console output as a test of performance will not reflect your actual results creating web applications. 1) you should test both C++ and JAVA programs using socket listeners. measure the performance from entry into main() and exit from main(). do a thousand or so requests (a single printf is not a valid test. using a thousand will average the performance over time) use an external program to send the requests. do some processing on each request. 2) there are probably benchmarks on the internet already comparing c++ and java, save yourself some time and use Google to find them. i found these quickly: http://www.idiom.com/~zilla/Computer/javaCbenchmark.html, http://www.javaworld.com/javaworld/jw-02-1998/jw-02-jperf_p.html 3) thousands of commercial websites run using tomcat/java as the basis for their web apps with perfectly acceptable performance results, running multiple websites from a single tomcat instance with a few thousand hits per hour. 4) in the long run, you will find java web apps to be more easily maintained than c++ apps because you can use open sourced MVC tools like Struts to handle a lot of the work for you 5) when doing benchmarks, use profiling tools (gcc -g) to determine where your time is spent. especially in complex programs. hope this helps. best of luck to you in your website. greg == 3 of 3 == Date: Mon, Dec 6 2004 7:01 am From: [EMAIL PROTECTED] using console output as a test of performance will not reflect your actual results creating web applications. 1) you should test both C++ and JAVA programs using socket listeners. measure the performance from entry into main() and exit from main(). do a thousand or so requests (a single printf is not a valid test. using a thousand will average the performance over time) use an external program to send the requests. do some processing on each request. 2) there are probably benchmarks on the internet already comparing c++ and java, save yourself some time and use Google to find them. i found these quickly: http://www.idiom.com/~zilla/Computer/javaCbenchmark.html, http://www.javaworld.com/javaworld/jw-02-1998/jw-02-jperf_p.html 3) thousands of commercial websites run using tomcat/java as the basis for their web apps with perfectly acceptable performance results, running multiple websites from a single tomcat instance with a few thousand hits per hour. 4) in the long run, you will find java web apps to be more easily maintained than c++ apps because you can use open sourced MVC tools like Struts to handle a lot of the work for you 5) when doing benchmarks, use profiling tools (gcc -g) to determine where your time is spent. especially in complex programs. hope this helps. best of luck to you in your website. greg ============================================================================== TOPIC: Zip/UnZip char [] http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/becaa86f0228fd4f ============================================================================== == 1 of 2 == Date: Mon, Dec 6 2004 2:37 pm From: "Ike" ARGH...I meant byte[] ! Thanks for pointing this out -Ike "Michael Borgwardt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ike wrote: > > > In short, I convert to char [] any data I am to put into a blob field. > > Why? char[] is for *text*, not for arbitrary data. Use byte[]. == 2 of 2 == Date: Mon, Dec 6 2004 3:51 pm From: Michael Borgwardt Ike wrote: > ARGH...I meant byte[] ! Thanks for pointing this out -Ike Well, in that case there is no problem. You just use java.util.zip.ZipIn/OutputStream for the compression, and java.io.ByteArrayIn/OutputStream to "convert" between byte arrays and streams. ============================================================================== TOPIC: search(Object criteria) - to vague? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8c9970db76f9ab70 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 9:56 am From: "John C. Bollinger" VisionSet wrote: > "John C. Bollinger" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > >>I would not be comfortable with that. I would at least want something >>along the lines of >> >>interface SearchCriteria { >> List asList(); >>} >> >>abstract class AbstractController { >> <some return type> search(SearchCriteria criteria); >>} >> >>The specific details of the SearchCriteria interface are not much >>relevant -- you could even reduce it to a tag interface if that suits >>you. The point is to apply at least a minimum level of type safety, so >>if you are using 1.5 then Michael's suggestion of applying generics to >>the problem might be a better solution. >> > > > mmm, > Lets introduce the DAO in to the picture. > > View calls controller with some specific criteria that the controller makes > sense of because it is the client of the view. It then formats it correctly > to request results from the DAO. What responsibilities does the concrete > SearchCriteria class have? I had originally envisioned it merely is a specifically-typed container for the criterion object(s), in which role it has no more responsibility than the Object that you were already using. > The controller can do searchCriteria.asDAOCriteria() > could return a String[], this puts DAO knowledge onus on the SearchCriteria > class. > > That sort of thing okay? I started to write something about nesting the search criterion class within the controller, and then realized that that would make it difficult for the class to fulfill its original role. I then started to write something about MVC, just to realize that too much Swing has polluted my thinking about the roles of M, V, and C and their interplay. Swing welds view and controller together, which makes sense in some ways, but which also does contribute to confusion. Having now purified myself, I proceed. It boils down to this: any user request is conceptually issued to the _controller_ not to the view. It is then important to recognize that the model presented by the view in a typical application is compound: there is generally some application data, but there is also *an interface to the controller*, which may include arbitrary data. When the user requests some action by twiddling a knob (presented by the view), the controller should be notified only of the details specific to that twiddle. It is then the _controller_'s responsibility to extract whatever information it needs from the context of the action (including the model) to fulfill the user request. The answer to the original question, then, is that you're going about it the wrong way, and that's part of why you're having difficulty. My original answer was off the mark because I misidentified the problem. Model, view, and controller do need to be properly matched, so if you want to provide a search mechanism in a generic MVC setup then it is reasonable to stipulate that each component generate and consume objects compatible with the other components. To this end, then, a reasonable paradigm might be: abstract class AbstractController { void performSearch(); // obtains the criteria from the model /* or * void performSearch(AbstractModel m); * if the extra context is necessary */ [...] } abstract class AbstractModel { SearchCriteria getSearchCriteria(); } The view is responsible for invoking the controller's performSearch() method when it's (the view's) "Search" control is activated. Presumably the view also presents a some kind of form for entering search criteria; when a modification to the form is committed the controller is invoked to update the form model, thus making the data available for when the search is requested. This paradigm could be implemented with use of Generics if you're using Java 1.5, but beware of the overriding vs. overloading difficulty that Michael Borgwardt recently raised in this forum. John Bollinger [EMAIL PROTECTED] ============================================================================== TOPIC: file separator http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3f2ceedb5d08e69f ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 7:11 am From: "juicy" Can anyone tell me how to do file separator? i am trying to send a directory requested by client. I separate file name and file data with '}', the client and server program encounter an exception of socketoutputstream and inputstream. And i have found that because i use writeBytes in server to write the all files data to buffer, and without put file separator, so when at receiving site, it only can receive first file only.. ============================================================================== TOPIC: looking for eclipse plugin for user management in RCP application http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dd7f8897a1463dc8 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 6:57 am From: [EMAIL PROTECTED] (Dominik) Hi, I'm about to develop a rich client platform application that needs a role-based user management. - create/change/delete new users, - setting permissions for access to resources, - resolve permissions resulting from multiple and/or nested roles and - storing this information in a database as these features are being used in many multi-user applications to restrict access to funtions and/or data, i thought there might allready exist an eclipse plugin providing this functionality. so if anyone knows of such a plugin, or can give me a hint where to find one, i'd appreciate your posting. thanx for you help. dominik ============================================================================== TOPIC: "static" prefix - to parallel "this" prefix http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5dde10882ac2157 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 7:08 am From: Tim Tyler Daniel Sj?blom <[EMAIL PROTECTED]> wrote or quoted: > Tim Tyler wrote: > > http://checkstyle.sourceforge.net/config_coding.html#RequireThis > > > > This forces you to distinguish between local variables, > > instance variables and static variables in you code - > > buy using "this.var" for all instance variables and > > "Classname.var" for all static variables. It (optionally) > > does the same for all method calls. > > > > Are there any other proposals to deal with the same issue? > > Try using the latest Eclipse version. It can highlight local, instance, > static and even final variables in a different color. This is probably a > better idea than uglifying your code, or introducing new language syntax. I'm using the latest stable version of Eclipse - 3.0.1. The feature is not present there. I see no mention of this on: http://download.eclipse.org/downloads/drops/S-3.1M1-200408122000/Eclipse-3.1-M1-News.html http://download.eclipse.org/downloads/drops/S-3.1M2-200409240800/eclipse-news-M2.html ...or... http://download.eclipse.org/downloads/drops/S-3.1M3-200411050810/eclipse-news-part1-M3.html What version of Eclipse are you using? -- __________ |im |yler http://timtyler.org/ [EMAIL PROTECTED] Remove lock to reply. ============================================================================== TOPIC: HttpSession expired vs. invalidated http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dbbb2dba35e4659b ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 7:26 am From: [EMAIL PROTECTED] Hi, I have a session holding user data of an online survey. When the survey is completed, all data is written to a result file. After that the session is manually invalidated (servlet calling the invalidate method). If the respondent does not complete the interview the session times out at some point. I would like to flush the data I have in the session so far to a special result file. Is there a way of reacting to session expiration (by the server) and not to invalidation (by the servlet)? Using HttpSessionListener.sessionDestroyed(HttpSessionEvent se) does not work, because the data of HttpSessionEvent.getSession() is not accessible any more when the event is fired. Furthermore the HttpSessionEvent is fired when the session expires and when the session is manually invalidated. Does anyone have advice? THX, Chris ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.java.programmer To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
