Re: Fwd: [FileUpload] "Read timed out" exception

2006-02-24 Thread David López Muñoz

Hello Shehzaad,

if you are testing your application by executing a form in a
conventional html page in your browser, then
you're probably cutting down some file uploads by
pressing back button, or by fast linking to another page
before ending the transaction.

This is what I sometimes experienced.
Hope it would be helpfull.
David



En Fri, 24 Feb 2006 00:28:52 -0800 (PST), Shehzaad Nakhoda <[EMAIL PROTECTED]> 
escribió:


I should clarify that I'm not using the ISAPI
redirector. Hence I don't think I'm running into this
well-known issue covered in the  fileupload FAQ:

http://jakarta.apache.org/commons/fileupload/faq.html#read-timeout

I'm running tomcat on Linux.

Thanks.
--Shehzaad

--- Shehzaad Nakhoda <[EMAIL PROTECTED]> wrote:


Date: Fri, 24 Feb 2006 00:18:37 -0800 (PST)
From: Shehzaad Nakhoda <[EMAIL PROTECTED]>
Subject: [FileUpload] "Read timed out" exception
To: commons-user@jakarta.apache.org

Hello,

I'm using the commons-fileupload libary (version
1.0)
to handle large file uploads into my struts web
application.

I'm using tomcat (version 5.0.30) as the web server.
(i.e. there's no Apache httpd).

I have a Struts Action that calls the parseRequest
method on a DiskFileUpload object.

The parseRequest intermittently (not predictably)
throws the following exception:

org.apache.commons.fileupload.FileUploadException:
Processing of multipart/form-data request failed.
Read
timed out
at


org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)

[... more stack trace lines snipped ...]


Here's the Java code up to the call to parseRequest:

--BEGIN CODE--
DiskFileUpload fu = new DiskFileUpload();
// maximum size before a FileUploadException
will be thrown
fu.setSizeMax(10);
// maximum size that will be stored in
memory
fu.setSizeThreshold(4096);
// the location for saving data that is
larger
than getSizeThreshold()
fu.setRepositoryPath(rootDirectory);

List fileItems = fu.parseRequest(request);

--END CODE---

I did search on Usenet and on the Web for people
having similar problems, but didn't find a
satisfactory answer. There's a suggestion to play
with
the disableUploadTimeout parameter in tomcat's
server.xml but that didn't help.

I apologize if this is a tomcat issue (i.e.
off-topic
for this list), but I'm hoping someone can help me
with the tomcat-fileupload combination.

Thanks.
Shehzaad





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
David López Muñoz
(34) 91 337 4703
msn: [EMAIL PROTECTED]
Multimedia Technology
Telefónica Investigación y Desarrollo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Lang] escapeXML() -> Not escaping low characters

2006-03-31 Thread David López Muñoz

Hello,

I'm trying to escape some texts to be xml-valid and I'm using 
StringEscapeUtils.escapeXml().

I found a problem with low characteres such as #18. They don't seem to be 
escaped, and therefore they are mixed together with other characteres as if 
there were normal characteres such as 'a', '1' etc.

Am I doing sth wrong? I'm using commons-lang 2.1. Is it a known bug already 
solved in newer versions?

Regards
David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Lang] escapeXML() -> Not escaping low characters

2006-04-19 Thread David López Muñoz

En Tue, 18 Apr 2006 09:55:27 -0700, Henri Yandell <[EMAIL PROTECTED]> escribió:


On 3/31/06, David López Muñoz <[EMAIL PROTECTED]> wrote:

Hello,

I'm trying to escape some texts to be xml-valid and I'm using 
StringEscapeUtils.escapeXml().

I found a problem with low characteres such as #18. They don't seem to be 
escaped, and therefore they are mixed together with other characteres as if 
there were normal characteres such as 'a', '1' etc.

Am I doing sth wrong? I'm using commons-lang 2.1. Is it a known bug already 
solved in newer versions?


Sorry for lack of reply. Definitely not fixed yet, and thanks for
reporting it in bugzilla. There's another bug that complains that high
characters ARE getting escaped - so definitely something that's up for
debate :)

Would all low-chars want to be escaped? I suspect that people wouldn't
want newlines suddenly being escaped and turning the xml into a single
line. Anyone got any idea if the XML spec even talks about low-chars?

Hen



Thanks Hen,

According to my experience, low characteres MUST be escaped, since I'm having
problems with an XML document partly generated with escapeXml().

The document is generated in order to be read by some other client that
is using xerces. This document is filled in with some fields extracted from our 
DB.
Unfortunately some of the fields happened to contain some unrequired characters
such as &x18, etc. That would not be a problem, but the resulting document
makes xerces crash. I therefore assume that this is not a valid character
and have to be escaped.

--
David López Muñoz
(34) 91 337 4703
msn: [EMAIL PROTECTED]
Multimedia Technology
Telefónica Investigación y Desarrollo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[collections] Proposal - Multiindex Container

2006-06-19 Thread David López Muñoz

Hello,
this is a proposal for Jakarta Commons developers.

It's related to the inconvenient proliferation of complex
types of containers: LRUMap, List, ArrayList, Sets, OrderedLists,
OrderedSets, BidiMaps, and son on. I find that every simple customization
to a minimal requirement often results in a very particular new
subtype.

My proposal is to implement the equivalent in Java Jakarta Commons Collections
to the famous Boost C++ Multi-index Containers Library.
http://www.boost.org/libs/multi_index/doc/index.html

It defines a generic container simultaneously maintaining one or more indices 
with
different sorting and access semantics. The versatile nature of Boost.MultiIndex
allows for the specification of a wide spectrum of different data structures.
It allows sorted, hashed, sequenced, random-access indices.
It also provides extended look-up facilities.
Therefore it can emulate different data structures such as:
- Sets with several iteration orders and search criteria.
- Lists with fast lookup and/or without duplicates.
- Bidirectional maps, i.e. maps searchable either for key or value.
- MRU (most recently used) lists, structures keeping the n last referenced 
items, beginning with the newest ones.

I consider that it has an easy implementation in Java, and it could
significantly improve the power of Collections.

Comments are welcome.
Best Regards

--
David López Muñoz
(34) 91 337 4703
gtalk, jabber: [EMAIL PROTECTED]
Multimedia Technology
Telefónica Investigación y Desarrollo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]