This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!

Kabron Kline

Greenhorn
+ Follow
since Aug 07, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kabron Kline

Thanks for calling out Process Explorer, I'll be using it to help troubleshoot. As a side note, when I change the for loop in the 'upload()' method of the FileUploader to reflect the snippet below, TimeoutException is caught after 1000+ file uploads.
Thanks for the reply! In my FTPClient class, all InputStream objects are closed in a finally statement after each upload. I validated via the debugger to make sure.
I am working on a solution that will provide multiple simultaneous file upload functionality. In order to facilitate this, I created a few classes using the FTPClient provided in the Apache Commons Net library as the underlying socket client. Note that I built my own abstraction called, "FTPClient" and composed it with the org.apache.commons.net.ftp.FTPClient class.

First is the "FileUploader" class which is used to invoke the upload process via the 'upload()' method (note: internal package names are shortened for brevity).

Second is the FileUploaderThread which implements Runnable and is responsible for polling files from a thread-safe queue and uploading them via calls to an FTPClient instance. Each FileUploaderThread instance gets a single FTPClient instance.

For a small number of files (e.g. 100), I can invoke the code via a JUnit test without any problems. If I use a larger file set which more closely reflects what will occur in our production environment (e.g. 5000+ files), the JVM will deadlock after a certain amount of time. Further, the same FTPClient upload code is being used in single threaded process without any problems.

I've tried a variety of things in an attempt to resolve my problem, but at this point I'm starting to run out of new ideas. My suspicion is that since the files I'm uploading are very small (less than 5 KB), there are two many socket connections occurring within a very short period of time.

I don't have much experience with multi-threading as it applies to socket connections. As such, any criticisms, recommendations, or suggestions are all welcomed!

David Newton wrote:Suggesting Maven seems like a bit of overkill for what is a relatively simple requirement--that would require a complete overhaul of the original poster's project.



Indeed it may be overkill for a small project; however, Maven has features that would make the task fairly straight forward should other features that it offers be desirable.
11 years ago
You could also use Apache Maven, which is the preferred solution for larger projects imho.

http://maven.apache.org/

Note that using an Eclipse plugin like FatJar will be a lot easier than learning Maven...
11 years ago
I recommend the excellent framework Struts2:

http://struts.apache.org/2.x/

Also, I recommend using Eclipse IDE for Java EE Developers to develop your application:

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR2/eclipse-jee-galileo-SR2-win32.zip
11 years ago
It definitely looks like an issue with WebSphere 6.1.0.2. I set "com.ibm.ws.webcontainer.invokefilterscompatibility" to true in the container settings, but that didn't produce any results. I'm also seeing the following after every request:



This thread describes the same problem with the strange log message, but it doesn't address non-functional Ajax functionality:

https://coderanch.com/t/485837/Struts/Application-Frameworks/Struts-Reponse-already-committed-errors

Per some recommendations I've read, I'm going to install Fix Pack 5 for WebSphere 6.1.
11 years ago
After working through some example tonight at home, I'm not having any problems getting Ajax to work on Tomcat 6. I'm using WebSphere 6.1 at work and it has been producing odd system log messages. I think my problem has something to do with Websphere, I'll follow up tomorrow.
11 years ago
Try calling getRequestURI() and/or getRequestURL() on the request object.
11 years ago
You need to add in some exception handling (i.e. try/catch). Could you post the action class that handles the form and initiates the email communication?
11 years ago
Please post your Struts action class and JSP.
11 years ago
Also, here is my taglib statement:

11 years ago
Generated URL is relative and appears to be correct:


(Where "contextroot" is the name of the application)
11 years ago
As far as I can tell, Firebug is not reporting any JS errors. I am developing this project as a prototype for an internal application that will run in IE6/7 (neither of which are reporting JS errors).
11 years ago
Here is a directory listing of my WEB-INF/lib directory:


Note that all JAR files were obtained from the official Struts website for Struts 2.1.8.1.
11 years ago