Re: Sample app for procrun.

2004-10-07 Thread Bryce Fischer
There are several ways you can implement them. My favorite is using worker threads and thread pools: http://www-106.ibm.com/developerworks/java/library/j-jtp0730.html None None wrote: Hey am trying to implement a sample application that runs a loop until I stop it! Does any one hve a sample

How to write app class for proc run?

2004-10-07 Thread None None
So far I have this... But I cant seem to get it to stop when I execute it... Thanks public class Executer { private static Executer daemon = null; private boolean state = false; public static void main(String[] args) { if(daemon == null) {

RE: [cli] commons cli version 2.0?

2004-10-07 Thread Andrew Ferguson
Thanks for that, I've added a new test (based on yours) and fixed existing ones. It turns out that GroupImpl was only validating options that are present and skipping those that were missing. I've fixed this in cvs but no binary is available yet. ok thanks, I've updated my local checkout now

FileUpload Parameter Handling

2004-10-07 Thread Adam Pelletier
I'm using commons-fileupload-1.0.jar. I'm trying to upload a file using enctype=multipart/form-data. However, I'm also passing a hidden form input element with an ID stuck in it. This ID is critical for the state of the servlet. Oddly, when I use the enctype=multipart/form-data, my

Digester: Problem of loading parents attribute to the child

2004-10-07 Thread Nalika Dissanayaka
Hi, I am having a difficulty to load the following XML file by using the commons Digester. Is there anyone that can help me on this... XML FILE ?xml version=1.0 encoding=UTF-8? metadata lang=en-US environment=Production revision=001 Sender Namemy nameDC/Name

Re: FileUpload Parameter Handling

2004-10-07 Thread Ben Souther
Regular form params show up in in the DiskFileUpload. When you iterate through the values, you can test to see if they are form fields with isFormField Example:.. DiskFileUpload upload = new DiskFileUpload(); List files =

Re: FileUpload Parameter Handling

2004-10-07 Thread Michael McGrady
Are you using Struts, Adam? Michael McGrady Adam Pelletier wrote: I'm using commons-fileupload-1.0.jar. I'm trying to upload a file using enctype=multipart/form-data. However, I'm also passing a hidden form input element with an ID stuck in it. This ID is critical for the state of the servlet.

Re: FileUpload Parameter Handling

2004-10-07 Thread Adam Pelletier
No, this is just a plain servlet. Another guy wrote that regular form params show up in in the DiskFileUpload. When you iterate through the values, you can test to see if they are form fields with isFormField Example:.. DiskFileUpload upload = new

Re: Digester trimming whitespaces

2004-10-07 Thread robert burrell donkin
On 3 Oct 2004, at 22:51, Simon Kitching wrote: On Mon, 2004-10-04 at 11:33, robert burrell donkin wrote: I would recommend that you take a copy of the source of whatever rule is causing you problems and rename the class (including changing the package declaration to something in your namespace),

Re: FileUpload Parameter Handling

2004-10-07 Thread Michael McGrady
What are you doing with commons upload? You should be able to get whatever values are present as values of parameter keys in the form. There is nothing about a multipart upload that precludes regular parameters. For example, I parse the DiskFileUpload as follows: DiskFileUpload dfu = new

Re: Digester trimming whitespaces

2004-10-07 Thread Adam Pelletier
Fixed it with a HttpServletRequestWrapper subclass that wraps up the request and the DiskFileUpload and makes it all work together. Thanks. - Original Message - From: robert burrell donkin [EMAIL PROTECTED] To: Jakarta Commons Users List [EMAIL PROTECTED] Sent: Thursday, October 07,

Re: FileUpload Parameter Handling

2004-10-07 Thread Paul DeCoursey
I know what you are saying about it breaking your architecture... i use a servlet that calls scripts based on a parameter, I found that using the multipart-encoding broke that. I later discovered that if I post the multipart but have my parameter on the querystring it works fine. Paul No,

[HttpClient] getting the http connection or setting the params

2004-10-07 Thread Gustavo Hexsel
I'm using HttpClient to read a variable number of pages in sequence. I have a time frame by which the page accesses (method execution and all the input stream reads) have to be done. I tried calling method.getParams().setSoTimeout(remainingTime) but it only sets the timeout once, just

Re: FileUpload Parameter Handling

2004-10-07 Thread Michael McGrady
I cannot see how a servlet stepping through parameter values could break an architecture. What do you mean by that? If the parameter is there, then the servlet can read it. How that could affect architecture is not clear to me. Can you guys explain what you mean? Michael McGrady Paul

Re: FileUpload Parameter Handling

2004-10-07 Thread Adam Pelletier
I fixed my problem. My problem is that I had a Servlet that would serve up any number of Pages. The way the navigation was wired was through keys/values pairs in the parameter list (i.e. req.getParameter(ID)). So the HttpServletRequest itself would get passed down to a couple of different

Re: Digester: Problem of loading parents attribute to the child

2004-10-07 Thread Simon Kitching
On Fri, 2004-10-08 at 07:11, Nalika Dissanayaka wrote: Hi, I am having a difficulty to load the following XML file by using the commons Digester. Is there anyone that can help me on this... XML FILE ?xml version=1.0 encoding=UTF-8? metadata lang=en-US environment=Production

Re: [HttpClient] getting the http connection or setting the params

2004-10-07 Thread Michael Becke
Hi Gustavo, Not sure what you mean by setting the connection parameters. All timeout params available on the connection are configurable via some HttpClient param. Which timeout do you want to set? Though it is possible to get access to the actual connection it is highly discouraged. It

Re: FileUpload Parameter Handling

2004-10-07 Thread Michael McGrady
My pleasure, Adam. I don't know who wrote the commons upload stuff, but I think they did one hell of a job. You have to study it a bit, however, because it is not entirely intuitive at first. I will tell you this, however, it really provides a wonderful base for working with multipart

[Digester] cousin Beck

2004-10-07 Thread John Kristian
If you need an XML-to-Java mapper that's more programmable than Digester, or a Java-to-XML mapper designed on similar lines, check out Beck http://beck.sourceforge.net/. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional