Re: CGI difficulty, binmode(STDIN) not working in FileUpload
Ron Cozad wrote: I have a form input on a html page that does a file upload. I am only getting the first 3k of an upload file. If the file is less than 3k, the multipart boundaries are structured properly, otherwise, I never get the end of the file or the ending boundary. I did binmode(STDIN); but still not getting the whole file. Running Tomcat 4.1.31 and IE browser 6.x. Appreciate any suggestions or theories as to why I am not getting the whole file. There is a bug in the CGIServlet (32023) that has been fixed in the latest version available from SVN. http://svn.apache.org/repos/asf/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CGI difficulty, binmode(STDIN) not working in FileUpload
I have a form input on a html page that does a file upload. I am only getting the first 3k of an upload file. If the file is less than 3k, the multipart boundaries are structured properly, otherwise, I never get the end of the file or the ending boundary. I did binmode(STDIN); but still not getting the whole file. Running Tomcat 4.1.31 and IE browser 6.x. Appreciate any suggestions or theories as to why I am not getting the whole file.
Fileupload - mysterious problem or?
Hi. We have an Intranet we access via normal HTTP and HTTPS using the Internet. When the users are using the system (FileUpload) from outside the company it all works fine, and the log shows that ContentType is set to application/octet-stream, and the files are uploaded to the server. When the users are using the system (FileUpload) from pc's inside the company, they get the following exception: org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null It is possible to surf the Internet without problems from the company PC's. Why is it that the FileUpload can get the ContentType from only some and not all the users. It's the same system they are using? What is it that I shall look for to fix the problem? All help is appreciated. Thanks, Lars Nielsen Lind
Re: Fileupload - mysterious problem or?
Lars Nielsen Lind wrote: When the users are using the system (FileUpload) from outside the company it all works fine, and the log shows that ContentType is set to application/octet-stream, and the files are uploaded to the server. When the users are using the system (FileUpload) from pc's inside the company, they get the following exception: org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null Are you using some kind of proxy at company? It looks like proxy modifies users' requests. -- Mikolaj Rydzewski [EMAIL PROTECTED] Becomo S.A. tel. (12) 2927104 smime.p7s Description: S/MIME Cryptographic Signature
FileUpload
Hi, I am trying to use FileUpload but i keep getting an Access denided error when i try to write things and i was wondering is there anyway around it...here is the error Http Satus 404 - C:\AtrowkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemans (Access is denied) type Status report message C:\ArtworkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemand (Access is denied) description The requested resource (C:\ArtworkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemand (Access is denied)) is not available. Any suggestions woudl be greatly appreciated Andrew Paliga Junior Project Manager IBM Toronto Media Design Studio Phone: (905) 413-2024
RE: FileUpload
Check your catalina.policy file or access rights to the user that the Tomcat apps are running under. Robert S. Harper 801.265.8800 ext. 255 [EMAIL PROTECTED] -Original Message- From: Andrew Paliga [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 10:38 AM To: tomcat-user@jakarta.apache.org Subject: FileUpload Hi, I am trying to use FileUpload but i keep getting an Access denided error when i try to write things and i was wondering is there anyway around it...here is the error Http Satus 404 - C:\AtrowkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemans (Access is denied) type Status report message C:\ArtworkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemand (Access is denied) description The requested resource (C:\ArtworkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemand (Access is denied)) is not available. Any suggestions woudl be greatly appreciated Andrew Paliga Junior Project Manager IBM Toronto Media Design Studio Phone: (905) 413-2024 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
commons-fileupload memory problem
I am trying to use the commons-fileupload classes and cannot figure out how to keep my uploads from getting stored in memory. I am using the following methods: DefaultFileItemFactory fileItemFactory = new DefaultFileItemFactory( 10, new File(/tmp) ); DiskFileUpload upload = new DiskFileUpload( fileItemFactory ); When I run tomcat using JDK 1.5's jconsole program and upload a file, my memory usage jumps to about 10x the size of the attachment. Has anyone else used the library successfully? TIA. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: commons-fileupload memory problem
-Original Message- From: Elihu Smails I am trying to use the commons-fileupload classes and cannot figure out how to keep my uploads from getting stored in memory. I am using the following methods: DefaultFileItemFactory fileItemFactory = new DefaultFileItemFactory( 10, new File(/tmp) ); DiskFileUpload upload = new DiskFileUpload( fileItemFactory ); When I run tomcat using JDK 1.5's jconsole program and upload a file, my memory usage jumps to about 10x the size of the attachment. Has anyone else used the library successfully? Yes, very little problem once I got the hang of it. regards DaveP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: commons-fileupload memory problem
We had the same problem and after debugging a few commons-fileupload classes (and Struts RequestProcessor) we could find that 250-500K of RAM was being used per request property (in multipart form, an object is created for each form field!). Since our form had the FormFile field plus 35 ordinary others...our request was consuming 20MB! We don't know the reason yet...so we had to isolate the FormFile field in a separated web-page...maybe we could use two form in the same page with the same result. Paulo Alvim Powerlogic - Brazil -Mensagem original- De: Elihu Smails [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 24 de março de 2005 10:40 Para: Tomcat Users List Assunto: commons-fileupload memory problem I am trying to use the commons-fileupload classes and cannot figure out how to keep my uploads from getting stored in memory. I am using the following methods: DefaultFileItemFactory fileItemFactory = new DefaultFileItemFactory( 10, new File(/tmp) ); DiskFileUpload upload = new DiskFileUpload( fileItemFactory ); When I run tomcat using JDK 1.5's jconsole program and upload a file, my memory usage jumps to about 10x the size of the attachment. Has anyone else used the library successfully? TIA. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fileupload - Stream terminated unexpectedly
I've seen this issue mentioned before after searching the archive and using google, but I am unclear if there was any possible solutions. I have a web app that uses the package 'org.apache.commons.upload' to upload a file to the server. It is running on IIS 6 with isapi_redirector2.dll. The issue is that some users get a Stream terminated unexpectedly error when they try to upload a file. If I use port 8080 users have no problems. Is there any possible workaround without going back to the older redirector or using Tomcat standalone? Thanks! Greg Ellis The information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by email ([EMAIL PROTECTED]), and destroy the original message. Thank you.
Commons FileUpload
Could someone please describe this to me, it looks interesting, and perhaps useful to me, and the site doesn't have the greatest description of the project. Basically a brief description of how it functions, and what its capabilities are after a file has been uploaded. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Commons FileUpload
Howdy, This is not the list for commons-fileupload discussion, so please mark your subject as [OFF-TOPIC] if you choose to pursue it. The commons-user list is the right place. I find commons-fileupload's site to be complete and informative. What do you think it's missing. Try reading the page titled Using, then writing your own simple servlet, and go from there. The navigation bar at the left side of fileupload's site is suboptimal. Take a look through the very bottom section, Project Info and Project Reports, for a lot more information including JavaDocs which show what you can do with FileItem (which is the class representing an uploaded file). Yoav Shapira Millennium ChemInformatics -Original Message- From: Luc Foisy [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 9:17 AM To: Tomcat User List (E-mail) Subject: Commons FileUpload Could someone please describe this to me, it looks interesting, and perhaps useful to me, and the site doesn't have the greatest description of the project. Basically a brief description of how it functions, and what its capabilities are after a file has been uploaded. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat-4.1.24 compile error issue with commons-fileupload????
Either: 1) get the HTMLManagerServlet.java file from 4.1.27 2) look in the CVS, and apply the patch to your copy 3) get commons-fileupload-B1 David Kramer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Im trying to compile tomcat 4.1.24 from source and Im receiving the below error: [javac] Compiling 46 source files to /opt/tomcat/catalina/build/server/classes [javac] This version of java does not support the classic compiler; upgrading to modern [javac] /opt/tomcat/catalina/src/share/org/apache/catalina/servlets/HTMLManagerServl et.java:205: cannot resolve symbol [javac] symbol : method setRepositoryPath (java.lang.String) [javac] location: class org.apache.commons.fileupload.FileUpload [javac] upload.setRepositoryPath(tempdir.getCanonicalPath()); [javac] ^ [javac] /opt/tomcat/catalina/src/share/org/apache/catalina/servlets/HTMLManagerServl et.java:262: write(java.io.File) in org.apache.commons.fileupload.FileItem cannot be applied to (java.lang.String) [javac] warUpload.write(file.getCanonicalPath()); [javac] I found the same error online, apparently a developer changed the API within commons fileuploads around the 21st of July(atleast thats when the email was posted to the archives). The email mentioned something about using a new fileupload version where the missing method is found(DiskFileUpload). The email also said to not use an older version of commons-fileupload. Does anyone have any ideas or recommendations on resolving this issue? Im completely stumped and need to get Tomcat up and running ASAP. Unfortunately Im being forced to compile this from scratch, so just getting the Tomcat binaries isnt an option. Any insight is appreciated. Thanks, DK David Kramer Software Developer Reflect.com Direct: 415.369.4856 Cell: 650.302.7889 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat-4.1.24 compile error issue with commons-fileupload????
Howdy, Get the 4.1.27 source and fileupload-1.0 final, not a beta or release candidate. Yoav Shapira Millennium ChemInformatics -Original Message- From: David Kramer [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 6:01 PM To: '[EMAIL PROTECTED]' Subject: tomcat-4.1.24 compile error issue with commons-fileupload Im trying to compile tomcat 4.1.24 from source and Im receiving the below error: [javac] Compiling 46 source files to /opt/tomcat/catalina/build/server/classes [javac] This version of java does not support the classic compiler; upgrading to modern [javac] /opt/tomcat/catalina/src/share/org/apache/catalina/servlets/HTMLManager Serv l et.java:205: cannot resolve symbol [javac] symbol : method setRepositoryPath (java.lang.String) [javac] location: class org.apache.commons.fileupload.FileUpload [javac] upload.setRepositoryPath(tempdir.getCanonicalPath()); [javac] ^ [javac] /opt/tomcat/catalina/src/share/org/apache/catalina/servlets/HTMLManager Serv l et.java:262: write(java.io.File) in org.apache.commons.fileupload.FileItem cannot be applied to (java.lang.String) [javac] warUpload.write(file.getCanonicalPath()); [javac] I found the same error online, apparently a developer changed the API within commons fileuploads around the 21st of July(atleast thats when the email was posted to the archives). The email mentioned something about using a new fileupload version where the missing method is found(DiskFileUpload). The email also said to not use an older version of commons-fileupload. Does anyone have any ideas or recommendations on resolving this issue? Im completely stumped and need to get Tomcat up and running ASAP. Unfortunately Im being forced to compile this from scratch, so just getting the Tomcat binaries isnt an option. Any insight is appreciated. Thanks, DK David Kramer Software Developer Reflect.com Direct: 415.369.4856 Cell: 650.302.7889 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat-4.1.24 compile error issue with commons-fileupload????
Im trying to compile tomcat 4.1.24 from source and Im receiving the below error: [javac] Compiling 46 source files to /opt/tomcat/catalina/build/server/classes [javac] This version of java does not support the classic compiler; upgrading to modern [javac] /opt/tomcat/catalina/src/share/org/apache/catalina/servlets/HTMLManagerServl et.java:205: cannot resolve symbol [javac] symbol : method setRepositoryPath (java.lang.String) [javac] location: class org.apache.commons.fileupload.FileUpload [javac] upload.setRepositoryPath(tempdir.getCanonicalPath()); [javac] ^ [javac] /opt/tomcat/catalina/src/share/org/apache/catalina/servlets/HTMLManagerServl et.java:262: write(java.io.File) in org.apache.commons.fileupload.FileItem cannot be applied to (java.lang.String) [javac] warUpload.write(file.getCanonicalPath()); [javac] I found the same error online, apparently a developer changed the API within commons fileuploads around the 21st of July(atleast thats when the email was posted to the archives). The email mentioned something about using a new fileupload version where the missing method is found(DiskFileUpload). The email also said to not use an older version of commons-fileupload. Does anyone have any ideas or recommendations on resolving this issue? Im completely stumped and need to get Tomcat up and running ASAP. Unfortunately Im being forced to compile this from scratch, so just getting the Tomcat binaries isnt an option. Any insight is appreciated. Thanks, DK David Kramer Software Developer Reflect.com Direct: 415.369.4856 Cell: 650.302.7889 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fileupload](java newbie):cannot resolve symbol
I had posted the following to the jakarta commons list but maybe it has more to do with Tomcat administration (or my bad programming). Any advice is much appreciated. /j-p. ** Hello List... My plan is to to stream uploaded files directly into a database. This may be a bit ambitious for my little programming experience nevertheless here goes. I've placed commons-fileupload-1.0.jar into WEB-INF/lib directory of my tomcat context. I've added the package statement: package org.apache.commons.fileupload; The following statement has been added to the import section of my test servlet: import org.apache.commons.fileupload.*; The compile chokes at the first assignment: boolean isMultipart = FileUpload.isMultipartContent(req); with a cannot resolve symbol on the FileUpload object. btw the context log shows the jar being loaded: 2003-07-28 17:05:43 ContextConfig[/mlist]: Scanning JARs in /WEB-INF/lib subdirectory 2003-07-28 17:05:43 ContextConfig[/mlist]:Adding path '/WEB-INF/lib/commons-fileupload-1.0.jar' 2003-07-28 17:05:43 ContextConfig[/mlist]: Scanning JAR at resource path '/WEB-INF/lib/commons-fileupload-1.0.jar' What am I doing wrong? Thanks, /j-p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fileupload](java newbie):cannot resolve symbol
On Mon, 28 Jul 2003, john-paul delaney wrote: The compile chokes at the first assignment: boolean isMultipart = FileUpload.isMultipartContent(req); with a cannot resolve symbol on the FileUpload object. btw the context log shows the jar being loaded: 2003-07-28 17:05:43 ContextConfig[/mlist]: Scanning JARs in /WEB-INF/lib subdirectory 2003-07-28 17:05:43 ContextConfig[/mlist]:Adding path '/WEB-INF/lib/commons-fileupload-1.0.jar' 2003-07-28 17:05:43 ContextConfig[/mlist]: Scanning JAR at resource path '/WEB-INF/lib/commons-fileupload-1.0.jar' It working now. I added a reference to the jarfile in the $CLASSPATH environment variable and then it compiled ok. Nevertheless I seem to have read somewhere that tomcat ignored the java classpath and relied on loading classes from it's various lib directories? Is this presumption incorrect? Thanks /j-p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fileupload](java newbie):cannot resolve symbol
Compiling a servlet is different than having it run under Tomcat. You needed to compile your servlet, so either send in the path to the jar file with a javac parameter (-cp) or put it on your system classpath, or any one of a number of different options. That's compiling, and it's just like any other java class. Once it's compiled, putting it in the appropriate Tomcat directory is sufficient, and you're right; Tomcat ignores Classpath -Original Message- From: john-paul delaney [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 4:51 PM To: Tomcat Users List Subject: Re: [Fileupload](java newbie):cannot resolve symbol On Mon, 28 Jul 2003, john-paul delaney wrote: The compile chokes at the first assignment: boolean isMultipart = FileUpload.isMultipartContent(req); with a cannot resolve symbol on the FileUpload object. btw the context log shows the jar being loaded: 2003-07-28 17:05:43 ContextConfig[/mlist]: Scanning JARs in /WEB-INF/lib subdirectory 2003-07-28 17:05:43 ContextConfig[/mlist]:Adding path '/WEB-INF/lib/commons-fileupload-1.0.jar' 2003-07-28 17:05:43 ContextConfig[/mlist]: Scanning JAR at resource path '/WEB-INF/lib/commons-fileupload-1.0.jar' It working now. I added a reference to the jarfile in the $CLASSPATH environment variable and then it compiled ok. Nevertheless I seem to have read somewhere that tomcat ignored the java classpath and relied on loading classes from it's various lib directories? Is this presumption incorrect? Thanks /j-p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fileupload](java newbie):cannot resolve symbol
Build != Run. Tomcat is not involved in the build process, only the run process. When your servlet is running, Tomcat ignores CLASSPATH so you will need to make sure your JAR files are in the appropriate location according to the ClassLoader HOWTO: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html John john-paul delaney wrote: On Mon, 28 Jul 2003, john-paul delaney wrote: The compile chokes at the first assignment: boolean isMultipart = FileUpload.isMultipartContent(req); with a cannot resolve symbol on the FileUpload object. btw the context log shows the jar being loaded: 2003-07-28 17:05:43 ContextConfig[/mlist]: Scanning JARs in /WEB-INF/lib subdirectory 2003-07-28 17:05:43 ContextConfig[/mlist]:Adding path '/WEB-INF/lib/commons-fileupload-1.0.jar' 2003-07-28 17:05:43 ContextConfig[/mlist]: Scanning JAR at resource path '/WEB-INF/lib/commons-fileupload-1.0.jar' It working now. I added a reference to the jarfile in the $CLASSPATH environment variable and then it compiled ok. Nevertheless I seem to have read somewhere that tomcat ignored the java classpath and relied on loading classes from it's various lib directories? Is this presumption incorrect? Thanks /j-p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fileupload](java newbie):cannot resolve symbol
Thanks Brian... I had tried removing the package line but the compiler complained the package couldn't be found. Is it overkill to have a package statement and an import statement for the same? In the end I just added the jar to the classpath... but I don't understand why it failed when the jar was loaded by the context. How will it be possible to install a war file on a new system if I'm relying on modifying the classpath? Apologies for the multiple newbie questions. thanks /j-p. On Mon, 28 Jul 2003, Brian wrote: Hi, Try removing the line: package org.appache.commons.fileupload; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fileupload](java newbie):cannot resolve symbol
On Mon, 28 Jul 2003, John Turner wrote: Build != Run. Tomcat is not involved in the build process, only the run process. When your servlet is running, Tomcat ignores CLASSPATH so you will need to make sure your JAR files are in the appropriate location according to the ClassLoader HOWTO: Succinct and clear; well explained, thanks. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html rtfm I know, I know. I confess to having read but the new terminology and pithy explanations just wouldn't sink in. I go back and try again. Best regards /j-p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fileupload](java newbie):cannot resolve symbol
For user-created classes, it pretty much comes down to three things: Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader. Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_HOME/shared/classes, as well as classes and resources in JAR files under $CATALINA_HOME/lib, are made visible through this class loader. WebappX - A class loader is created for each web application that is deployed in a single Tomcat 4 instance. All unpacked classes and resources in the /WEB-INF/classes directory of your web application archive, plus classes and resources in JAR files under the /WEB-INF/lib directory of your web application archive, are made visible to the containing web application, but to no others. All web applications PLUS Tomcat internals: Common All web applications BUT NOT Tomcat internals: Shared A specific web application: WEB-INF/classes, WEB-INF/lib John john-paul delaney wrote: On Mon, 28 Jul 2003, John Turner wrote: Build != Run. Tomcat is not involved in the build process, only the run process. When your servlet is running, Tomcat ignores CLASSPATH so you will need to make sure your JAR files are in the appropriate location according to the ClassLoader HOWTO: Succinct and clear; well explained, thanks. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html rtfm I know, I know. I confess to having read but the new terminology and pithy explanations just wouldn't sink in. I go back and try again. Best regards /j-p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FileUpload]
To the best of my knowlege, there is no way to preload the value of a file input field or to programmatically load it. I've tried with Mozilla and it throws a javascript security exception. (I haven't tried with MSIE). To do so would be a security threat. Any webpage could have a hidden form that looks for a particular file (or set of files) and submits itself as soon as the page loads. The user would have no way of stopping it or even knowing that it's going ont. On Thursday 24 July 2003 05:51 pm, you wrote: Can anyone tells me how to modify my form to ensure that the contents of an input type=file control are still present when I return to the form? My file upload servlet is working pretty well now except for one thing. I am doing edits on each of the files which are to be uploaded, including a check to see if the file is larger than an individual size threshold I have set. (This is something I've created myself because I want an individual size limit, not the aggregate limit provided by the Commons FileUpload team.) When an individual file size is too large, I create a message and display it, then invite my user to press the back button on their browser to go back to the form to modify the form - either replace the name of the overly large file with a smaller one or blank it out altogether. Everything works fine except that when the user gets back to the form, all of the fields that are input type=file are blank. The input type=text fields retain their original values. I would like the input type=file controls to also contain their original value. What do I need to do to make that happen? I've never seen this blanking behaviour in other forms but this is the first time I've written a servlet containing an input type=file control I am running Tomcat 4.1.24. My browser is IE 6.0.2800.xpsp2.030422-1633. My OS is Windows XP Pro with all critical service applied. Rhino --- rhino1 AT sympatico DOT ca If you want the best seat in the house, you'll have to move the cat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[FileUpload]
Can anyone tells me how to modify my form to ensure that the contents of an input type="file" control are still present when I return to the form? My file upload servlet is working pretty well now except for one thing. I am doing edits on each of the files which are to be uploaded, including a check to see if the file is larger than an individual size threshold I have set. (This is something I've created myself because I want an individual size limit, not the aggregate limit provided by the Commons FileUpload team.) When an individual file size is too large, I create a message and display it, then invite my user to press the back button on their browser to go back to the form to modify the form - either replace the name of the overly large file with a smaller one or blank it out altogether. Everything works fine except that when the user gets back to the form, all of the fields that are input type=file are blank. The input type=text fields retain their original values. I would like the input type=file controls to also contain their original value. What do I need to do to make that happen? I've never seen this "blanking" behaviour in other formsbutthis is the first time I've written a servlet containing an input type=file control I am running Tomcat 4.1.24. My browser is IE 6.0.2800.xpsp2.030422-1633. My OS is Windows XP Pro with all critical service applied. Rhino---rhino1 AT sympatico DOT ca"If you want the best seat in the house, you'll have to move the cat."
Fwd: Re: [FileUpload]
To the best of my knowlege, there is no way to preload the value of a file input field or to programmatically load it. I've tried with Mozilla and it throws a javascript security exception. (I haven't tried with MSIE). To do so would be a security threat. Any webpage could have a hidden form that looks for a particular file (or set of files) and submits itself as soon as the page loads. The user would have no way of stopping it or even knowing that it's going ont. On Thursday 24 July 2003 05:51 pm, you wrote: Can anyone tells me how to modify my form to ensure that the contents of an input type=file control are still present when I return to the form? My file upload servlet is working pretty well now except for one thing. I am doing edits on each of the files which are to be uploaded, including a check to see if the file is larger than an individual size threshold I have set. (This is something I've created myself because I want an individual size limit, not the aggregate limit provided by the Commons FileUpload team.) When an individual file size is too large, I create a message and display it, then invite my user to press the back button on their browser to go back to the form to modify the form - either replace the name of the overly large file with a smaller one or blank it out altogether. Everything works fine except that when the user gets back to the form, all of the fields that are input type=file are blank. The input type=text fields retain their original values. I would like the input type=file controls to also contain their original value. What do I need to do to make that happen? I've never seen this blanking behaviour in other forms but this is the first time I've written a servlet containing an input type=file control I am running Tomcat 4.1.24. My browser is IE 6.0.2800.xpsp2.030422-1633. My OS is Windows XP Pro with all critical service applied. Rhino --- rhino1 AT sympatico DOT ca If you want the best seat in the house, you'll have to move the cat. --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FileUpload]
It seems no way to save file field automatically in IE. My solution is let user upload each file to server temporary, I will create a file list for them so they can edit each file (to delete or what else). I will save all files to file system when user decided to submit all. It is same as Hotmail deal with your attachments. Hope it will help you. - Original Message - From: Rhino To: tomcat-user Sent: Friday, July 25, 2003 5:51 AM Subject: [FileUpload] Can anyone tells me how to modify my form to ensure that the contents of an input type=file control are still present when I return to the form? My file upload servlet is working pretty well now except for one thing. I am doing edits on each of the files which are to be uploaded, including a check to see if the file is larger than an individual size threshold I have set. (This is something I've created myself because I want an individual size limit, not the aggregate limit provided by the Commons FileUpload team.) When an individual file size is too large, I create a message and display it, then invite my user to press the back button on their browser to go back to the form to modify the form - either replace the name of the overly large file with a smaller one or blank it out altogether. Everything works fine except that when the user gets back to the form, all of the fields that are input type=file are blank. The input type=text fields retain their original values. I would like the input type=file controls to also contain their original value. What do I need to do to make that happen? I've never seen this blanking behaviour in other forms but this is the first time I've written a servlet containing an input type=file control I am running Tomcat 4.1.24. My browser is IE 6.0.2800.xpsp2.030422-1633. My OS is Windows XP Pro with all critical service applied. Rhino --- rhino1 AT sympatico DOT ca If you want the best seat in the house, you'll have to move the cat.
Re: [FileUpload]
You can do like this : If user upload a too big file, you can display a JSP file that does following things: - says that the file is too big - provides a link back to the upload file with the value of text field set to the uploading file. Or you must use rewrite URL technique. Either cases, your upload page must be a JSP page, not HTML, so it can take back value or rewritten URL. --- Tang [EMAIL PROTECTED] wrote: It seems no way to save file field automatically in IE. My solution is let user upload each file to server temporary, I will create a file list for them so they can edit each file (to delete or what else). I will save all files to file system when user decided to submit all. It is same as Hotmail deal with your attachments. Hope it will help you. - Original Message - From: Rhino To: tomcat-user Sent: Friday, July 25, 2003 5:51 AM Subject: [FileUpload] Can anyone tells me how to modify my form to ensure that the contents of an input type=file control are still present when I return to the form? My file upload servlet is working pretty well now except for one thing. I am doing edits on each of the files which are to be uploaded, including a check to see if the file is larger than an individual size threshold I have set. (This is something I've created myself because I want an individual size limit, not the aggregate limit provided by the Commons FileUpload team.) When an individual file size is too large, I create a message and display it, then invite my user to press the back button on their browser to go back to the form to modify the form - either replace the name of the overly large file with a smaller one or blank it out altogether. Everything works fine except that when the user gets back to the form, all of the fields that are input type=file are blank. The input type=text fields retain their original values. I would like the input type=file controls to also contain their original value. What do I need to do to make that happen? I've never seen this blanking behaviour in other forms but this is the first time I've written a servlet containing an input type=file control I am running Tomcat 4.1.24. My browser is IE 6.0.2800.xpsp2.030422-1633. My OS is Windows XP Pro with all critical service applied. Rhino --- rhino1 AT sympatico DOT ca If you want the best seat in the house, you'll have to move the cat. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1.24 and Commons FileUpload
Hi I've been trying to get a web application to work using the Commons FileUpload 1.0 with Tomcat 4.1.24; the servlet using FileUpload will compile (using NetBeans 3.5) but when Tomcat processes it, a ClassNotFoundException is thrown saying javax.servlet.ServletInputStream can't be found. This exception is traced to the following line: DiskFileUpload fileupload = new DiskFileUpload(); However, in the servlet, I *can* create an instance of ServletInputStream like this: ServletInputStream srvin = ServletRequest.getInputStream(); This line of code compiles without problems and is executed, no problem, in the servlet by Tomcat. So it seems that only the FileUpload stuff can't find the ServletInputStreamclass. I've tried putting the FileUpload .jar in the WEB-INF/lib directory of the webapp, as well as my Tomcat/common/lib and jdk/jre/lib/ext (which Tomcat uses) directories. Then, I uninstalled Tomcat 4.1.24 and installed Tomcat 4.1.18 and everything worked perfectly without changes. Any ideas? ~ Shaun Kenny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Still needing helping with jakarta-commons/fileupload
Hi guys, can anybody help me? I am trying to retrieve fields and one file from a submitted form. The question is simple: can jakarta-commons/fileupload does it? I am afraid it just can uploads files! should i use O'reilly package? Code sample would be appreciated. Thanks in advance, Euclides. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ENC: Still needing help with jakarta-commons/fileupload
Hi guys, can anybody help me? I am trying to retrieve fields and one file from a submitted form. The question is simple: can jakarta-commons/fileupload does it? I am afraid it just can uploads files! should i use O'reilly package? Code sample would be appreciated. Thanks in advance, Euclides. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is there a Bug at Jakarta-commons/fileupload when parsing?!
Hi guys, i guess that package FileUpload has a bug whenever it try to parse HTTPRequest. I always get the javaNullPointerException error message whenever this servlet runs. HERE IS THE CODE: ... boolean isMultipart = FileUpload.isMultipartContent(request); FileUpload upload = new FileUpload(); System.out.println(Passei 0); ERROR HERE= List items = upload.parseRequest(request); System.out.println(Passei 1); Iterator iter = items.iterator(); while (iter.hasNext()) { //String comment = ((FileItem)i.next()).getString(); FileItem item = (FileItem)iter.next(); if ( item.isFormField()) { String name = item.getFieldName(); String value = item.getString(); System.out.println(item eh: + name); } else { String nomeArq = item.getName(); long tamBytes = item.getSize(); int tam = (int) tamBytes; // InputStream uploadFile = item.getInputStream(); System.out.println(nome do arquivo eh: + nomeArq ); // uploadFile.close(); // byte [] conteudo; // conteudo.length( tam ); byte[] conteudo = item.get(); } } System.out.println (Passei fim); Any help would be appreciated! Thanks, Euclides. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question regarding jakarta-commons/fileupload
Hi friends, can anybody help me? I am trying to retrieve fields and one file from a submitted form. Is it possible, if i use jakarta-commons/fileupload? Or, i should use O'reilly package. Code sample would be appreciated. Thanks in advance, Euclides. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fileupload beta+tomcat release or filupload current+tomcat cvs?
Hello, thanks for the link to the tomcat sources. It took a while but we are willing to look at the code. We downloaded all tomcat sources (at least I hope so) and Ant to compile tomcat once, to see if it compiles before we begin to modify it. build-catalina: [javac] Compiling 335 source files to D:\tomcatunpacked\jakarta-tomcat-4.1.24-src\ catalina\build\server\classes [javac] This version of java does not support the classic compiler; upgrading to modern [javac] D:\tomcatunpacked\jakarta-tomcat-4.1.24-src\ catalina\src\share\org\apache\catalina\servlets\ HTMLManagerServlet.java:205: cannot resolve symbol [javac] symbol : method setRepositoryPath (java.lang.String) [javac] location: class org.apache.commons.fileupload.FileUpload [javac] upload.setRepositoryPath(tempdir.getCanonicalPath()); [javac] ^ [javac] D:\tomcatunpacked\jakarta-tomcat-4.1.24-src\ catalina\src\share\org\apache\catalina\servlets\ HTMLManagerServlet.java:262: write(java.io.File) in org.apache.commons.fileupload.FileItem cannot be applied to (java.lang.String) [javac] warUpload.write(file.getCanonicalPath()); [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 2 errors BUILD FAILED The fileupload package is commons-fileupload-current from http://www.apache.org/dist/jakarta/commons/fileupload/ from 25-Jun-2003 23:32, which seems to me being the newest available. When I use the commons-fileupload-1.0-beta-1 instead, these two errors disappear. My question is: is it safe to use the fileupload-beta with the tomcat 4.1.24 release or is it more safe to upgrade to a CVS version of tomcat and therefore using fileupload-current? Thanks for your opinion Thomas Weller -Ursprungliche Nachricht- Von: Shapira, Yoav [mailto:[EMAIL PROTECTED] Betreff: RE: Problems starting Tomcat from CD [snip] Look at the relevant code: http://cvs.apache.org/viewcvs/jakarta-tomcat-4.0/catalina/src/share/org/ apache/catalina/startup/ContextConfig.java?rev=1.67content-type=text/vn d.viewcvs-markup [snap] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bugzilla Bug 3534: FileUpload doesn't work with Apache, mod_webapp and tomcat 4.0 RC1
This bug has been marked as resolved and fixed. But has anyone had success uploading binary files through mod_webapp? I am currently trying with apache 1.3.22, tomcat 4.0.1, and mod_webapp 1.0.1-tc401. I am getting the same unexpected end of part exception from MultipartRequest that many others have mentioned. Yet the upload works perfectly if I go directly through tomcat. Has this bug decided to rear its ugly head again? Ryan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
fileupload handling
Hi, with a FORM INPUT TYPE=file files can be downloaded from the client but how can I read and extract the downloaded file from a servlet? The downloaded file can contain zip or gnu-tar files. -- Zsolt Koppany Intland GmbH www.intland.com Schulze-Delitzsch-Strasse 16 D-70565 Stuttgart Tel: +49-711-7871080 Fax: +49-711-7871017
RE: fileupload handling
Use the multi-part upload package from Jason Hunter. You can get it at www.servlets.com or www.oreilly.com. -Original Message- From: Zsolt Koppany [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 19, 2000 9:35 AM To: [EMAIL PROTECTED] Subject: fileupload handling Hi, with a FORM INPUT TYPE=file files can be downloaded from the client but how can I read and extract the downloaded file from a servlet? The downloaded file can contain zip or gnu-tar files. -- Zsolt Koppany Intland GmbH www.intland.com Schulze-Delitzsch-Strasse 16 D-70565 Stuttgart Tel: +49-711-7871080 Fax: +49-711-7871017