Action called twice when form enctype is multipart/form-data
Hi I have the following Struts Action public class HandleImageAction extends Action{ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm theForm = (DynaActionForm)for... 24 Feb 2006 06:22
how to generate a random string
As an aid for unit testing I want to write a method that generate a random string of a specified length: String getRandom(int length) { // magic } My current approach is to generate n random bytes and then convert them to a string using the String ctor. This *do* produce a string, but ther... 24 Feb 2006 02:47
Thread - on terminate event
Hello, please could you give an advice concerning threads? I'm a Delphi programmer. In Delphi there is OnTerminate event of thread object which gives me a feedback that the thread has ended. Imagine you have a button in your application. If you press the button it becomes disabled and a thread starts. When t... 20 Feb 2006 12:03
Arrays as key in a HashMap
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message Hi, I want to use arrays as keys in a HashMap. Now, this does not seem to be a good idea, as it will use the hashCode implementation of Object, which discriminate every array. So basically, I want a hash ma... 20 Feb 2006 11:00
Flash, movie
Does anyone use Flash utilities of Flagstone Software? http://www.flagstonesoftware.com/ On their page there is an example of how to pack an image inside a flash (and show it): http://www.flagstonesoftware.com/code/Example.java http://www.flagstonesoftware.com/code/ShowImage.java I wanted to extend that by m... 17 Feb 2006 08:41
writing a proxy ..
Hi ppl ... I am writing a simple proxy server ... I redirect my browser to the local server and re-route the HTTP request to the host. I get a reply back from the HOST but unfortunately this is not shown in my browser ( html appears in my console ) . I am putting the code here .. ( Its a thread ) pls run with... 20 Feb 2006 15:12
Java Sanner
Hi guys, I'm nearing the end of my java homework this week but the last section has got me. I realise to most that this will seem simple but I've haven't must experience, so please help. I have to read in a string of 1's and 0's using the java scanner and convert the string into a boolean array. The array is... 17 Feb 2006 05:25
Code examples for job interview
I am about to start a job search as a Java developer. I've never looked for a job as a Java developer before, having spent earlier parts of my career as a DBA and instructor, so I need some guidance on what to expect. I am pretty much entirely self-taught as a Java developer and I am not certified in any Java ... 14 Feb 2006 12:20
Action Listener, Determing which button was pressed
Hi, Could anyone help me with this problem. I have an action listener associated with a number of buttons. I can get the action listener to work, but what code do I need to findout which button was pressed. This is the layout of the action listener class. import java.awt.event.*; import java.awt.Componen... 17 Feb 2006 11:17
max heap size on 32 bit linux ?
Hi all, We've recently aquired a new dual processor 3.0GHZ Xeon running Suse 9.2 . It has 4 gigs of ram. However, the JVM is crashing daily. Our app has never shown this behavior before - though it never has run on a machine with more than I gig of ram. Its a tomcat webapp running hibernate. Here's the JVM args ... 12 Feb 2006 01:55