Re: help plz urgent
you _have_ to set the encoding on your form : form method=POST action=/some_url enctype=multipart/form-data [some_form_inputs] /form bye David - Original Message - From: # Lalit Nagpal # [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 06, 2002 4:12 PM Subject: help plz urgent i use the MultipartRequest class getParameter function to receive html form data apart from the files which are uploaded too. i do not know why i get the error saying posted content type is not multi part form data. when i upload files with this servlet without any input type=text type data upload works fine. when i try to get other fields alongwith the input type=file at the server end file upload does not work. plz help. i want to receive both textual data typed by the user and a file attached by the user at the server from a single form. but when i try to do this i get content type is not multipart form-data error. someone plz help urgent. thanx a lot # Lalit Nagpal # - Do You Yahoo!? Yahoo! Health - your guide to health and wellness -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: help plz urgent
well, first of all, YOU DON'T HAVE TO CAPITALIZE YOUR TEXT IT'S ANNOYING TO READ i'm trying to _help_ here try to send some of your html code (the multi part form) and the code of the server component in which you initialize the wrapper/read the parameters by the way, some extra info might help : what multipart library are you using (o'reilly ? version ?) same question about tomcat and web connector since you didn't send any code, i assumed it might be an obvious problem... David -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to redirect the log file from the command window to a file?
you still have output on the console because you redirect the standard output to your file (see the ' %ACTION%-server.log' ?) the remaining output is most surely the error output which you might also want to redirect to your file i don't know the windows command for linux, i add '21' before the classic redirect that tells the system to redirect the second output (ie the error output) to the 1st output (ie the standard output) somepath/mycommand 21 someotherpath/mylogfile you can also separate the files somepath/mycommand 2 someotherpath/errorlog someotherpath/standardlog another solution would be to tell java that System.out and System.err must be redirected to a file see java.lang.System javadoc, i know there is a setter for both streams something like System.setOut(new java.io.FileWriter(somepath/somefile); System.setErr(new java.io.FileWriter(somepath/someotherfile); bye David - Original Message - From: Louis Voo [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, May 02, 2002 3:21 PM Subject: Re: How to redirect the log file from the command window to a file? Hi Jon Thanks for your tip, but I still got problem, the start-server.log file is created, but no content in it, there are many print out from the command window, but the file is still empty. Somewhere goes wrong? Louis - Original Message - From: Jon Wingfield [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, May 02, 2002 12:01 PM Subject: RE: How to redirect the log file from the command window to a file? 1) alter the catalina.bat file: ... extract ... %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -classpath %CLASSPATH% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_H OME% -Djava.io.tmpdir=%CATALINA_TMPDIR% %MAINCLASS% %CMD_LINE_ARGS% %ACTION% %ACTION%-server.log ... extract end ... this puts all the system.out into a file start-server.log in the tomcat bin directory. 2) use the jakarta log4j logging package with a ConsoleAppender ;) Hope this helps, Jon -Original Message- From: Louis Voo [mailto:[EMAIL PROTECTED]] Sent: 02 May 2002 08:17 To: Tomcat Users List Subject: How to redirect the log file from the command window to a file? Hi, I'm using tomcat 4.04b2 for window. After I start my tomcat, all the system.out log will print out in that command window, can I redirect it to a file? Please tell me how to do that. Thank you Louis -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: What does IMHO mean?
i guess a good answer would look like STFW (and so that no one replies to ask what it means : Search The Fucking Web) google: afaik 1st answer: as fas as i know David - Original Message - From: Philip M. Meier [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, April 15, 2002 1:27 PM Subject: Re: What does IMHO mean? Hi! What means afaik? Regards, Philip M. Meier Philip M. Meier [EMAIL PROTECTED] AmambaSoft http://www.amambasoft.com Diese E-Mail Nachricht und alle beigefügten Anlagen sind nur für die Adresse bestimmt, an die sie geschickt wurde und kann vertrauliche und privilegierte Informationen enthalten. Wenn der Leser dieser Meldung nicht der beabsichtigte Empfänger ist, ist jegliche Weitergabe der enthaltenen Informationen streng verboten. Wenn Sie diese Meldung irrtümlicherweise empfangen haben, benachrichtigen Sie uns bitte sofort und löschen Sie die Meldungvon Ihrem System. - Original Message - From: Abhishek Pamecha [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, April 15, 2002 1:21 PM Subject: RE: What does IMHO mean? or is it in my humble opinion... ?? -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:49 PM To: Tomcat Users List Subject: RE: What does IMHO mean? IMHO = In My Honest Opinion -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 15 April 2002 12:17 To: 'Tomcat Users List' Subject: RE: What does IMHO mean? -Original Message- From: Darrin [mailto:[EMAIL PROTECTED]] LMAO (laughing my ass off) is what you probably are talking about (a lot of fonts its hard to distinguish between 1 (one) l (lowercase L), and i (lowercase I) Possibly, but imao is also a common acronym... http://www.diveinstruct.org.uk/terms.html Not that any of this has _anything_ to do with TC, imao ;-) - tex -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: tomcat 4.0.3 multiple instance catalina_base set-up.. stand-alone on linux
Why don't you plug tomcat on an apache ? with warp_connector thus you can start multiple instances of tomcat on different port link each instance in the same (virtual) host in apache (declare one connector for each instance) this way, all your application has accessible through the same adress:port (the web server's) hope this helps (by the way, it works, i've done it!) David - Original Message - From: Jakarta Tomcat Newsgroup @[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 12, 2002 9:10 AM Subject: tomcat 4.0.3 multiple instance catalina_base set-up.. stand-alone on linux Subject: tomcat 4.0.3 multiple instance catalina_base set-up.. stand-alone on linux From: Hyunjin Kim [EMAIL PROTECTED] === is it possible to set up catalina_base for multiple instaces all using same port? I am in an environment where the web server and java container is the same (TOMCAT stand alone) and adding a new webapp should not interfere with existing webapps... (working for a web agency.. should eventually run 10+ webapps on one server..) has anyone done this?? all success stories regarding setting up catalina_base says we should differ ports for each of catalina_bases... -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Adobe Acrobat
hi all there is an open source library for generating pdf in Java see http://www.lowagie.com/iText/ sorry if this has already been posted, i didn't see it :) David - Original Message - From: Adrian Beech [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 12:05 PM Subject: Re: Adobe Acrobat Huh, there is a printer driver that produces PDF files? Tell me more... oh please tell me more! This could be an answer to an issue I have with trying to read reports generated in Crystal reports within a browser, h... Adrian [EMAIL PROTECTED] - Original Message - From: John Burgess [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 6:55 PM Subject: RE: Adobe Acrobat Or alternatively use a printer driver that produces pdf files (Adobe Acrobat or Xeon Docucom are two) and print to file from the servlet, then return the file produced. The other suggestions are probably neater and open source but this does definitely work :-) Best Wishes John Burgess [EMAIL PROTECTED] Tel: 01865 718666 Fax: 01865 718600 -Original Message- From: Ravindra K. Bhat [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 10:39 PM To: Tomcat Users List Subject: Adobe Acrobat Hi: How do I render my html pages to pdf for printing. My servelet generated html table is too wide and columns get cut off if I print directly using the print icon on the browser... Thanks -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.343 / Virus Database: 190 - Release Date: 22/03/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.343 / Virus Database: 190 - Release Date: 22/03/02 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: multiple init() calls
hi i think there may be a misunderstanding (or i misunderstood your message ?!) the servlet must create _only_ one instance of each servlet class per web application then this instance must receive _one_ message init() at this point user request may be served for each user request, a thread is started and executes the service(...) method on the _shared_ instance the singleThreadModel only tells the servlet engine not to serve several request simultaneously this is the behaviour required by the J2EE specs as for your problem, i'm doing servlet for about 2 years now and i never saw that kind of behaviour... may be a look at your code would help... have fun! David -Original Message- From: Serge A. Redchuk [mailto:[EMAIL PROTECTED]] Hi All ! I've encountered a problem with creating threads of init servlet. Forgive me if I'm wrong. As I think, catalina must call init() method of init servlet _once_. And then just must make only copies of init servlet instance for new user requests. But I've encountered that the init() method called again and again ! At every creation of new action router. Does your servlet implement SingleThreadModel? If so you got what you wanted, AFAIK. It is not the thing that I need !!! Platform: pc Os: linux JDK: IBM Java web.xml: ... !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-class.ActionRouterServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param ... Anton -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: com.oreilly.servlet.MultipartRequest IO Error
i got the same problem two or three weeks ago the problem is a (corrected) bug in the mod_webapp java classes the bugged class is org.apache.catalina.connector.warp.WarpRequestHandler i think the cvs contains a correct one (you just need to compile the java part) and replace the tomcat_home/server/lib/warp.jar with the new compiled files i can email you the patched jar if you want (connector for tomcat 4.0.1 with only this patch) David - Original Message - From: J S (l) [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, January 28, 2002 7:49 PM Subject: RE: com.oreilly.servlet.MultipartRequest IO Error Thanks for your quick response. I just have one more question...would I have to completely recompile tomcat to recompile the WARP connector or not? J Sears On Mon, 2002-01-28 at 12:41, Brian Adams wrote: I saw it in the past 6 weeks come across the list and I believe it is in the Warp connector. hte guy was saying that the file did not end or start with (can't remember which) FF. Maybe download from the CVS and build yourself... I'm sure someone else will have better memory. goodluck, B -Original Message- From: J S (l) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 12:39 PM To: Tomcat Users List Subject: com.oreilly.servlet.MultipartRequest IO Error Please, anyone with information regarding the following error, either post a reply or email me asap. We are attempting to allow users to upload image files via form on our jsp site. We get the following error upon trying to parse the posted data: java.io.IOException: unexpected end of part We are running tomcat 4.0.1 JDK 1.3.1 modwebApp Apache 1.3.22 I have read where this might be a bug with either Tomcat itself or the WARP connector, but have been unable to find any responses to the bug report. Any assistance is greatly appreciated. J Sears -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: apache-tomcat4 connection via WARP
something that may help (if it works now) is apache's mod_rewrite i tried it with a beta version mod_webapp and it was overriding all others modules may be this has been corrected with the final module if that's the case, then one just needs to define a rewrite rule (must be one of the apache rewriting example!!) in apache to rewrite /foo into /foo/ if someone tries it, let me know if it's working David - Original Message - From: Anton Brazhnyk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, January 18, 2002 11:28 AM Subject: RE: apache-tomcat4 connection via WARP -Original Message- From: Young Jun Kim [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 11:35 AM To: [EMAIL PROTECTED] Subject: apache-tomcat4 connection via WARP i have apache+tomcat4 with WARP connector(mod_webapp.so). everything works fine except one thing... when i tried http://hostname/examples/ default webpage (such as index.jsp, index.html) is displayed correctly. but, when i tried http://hostname/examples -- no slash(/) i got internal error (500 error). the strange thing is when i tried http://hostname:8080/examples (when directly access to tomcat4) default page is displayed correctly. other directories not connected to tomcat work fine. does anyone know what's wrong this configuration? is this apache problem? or tomcat4 problem? I think the question is more general, is it problem? Or, maybe, its a favour Apache and Tomcat HttpConnector is doing to us? I mean there isn't any single word in Servlet spec. about serving contexts without trailing slash. Yeah, I know we all get used to omit slashes, but it still not obvious it MUST work. I think we can ask for such feature (but not complain) and so hope (but not expect). I hope they hear our wishes. :) Anton. P.S. Anyone and always can suggest patches :) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: 500 Internal Server Error usually after ~ 6 hours of use
hi there do you have a router or firewall between some of your components (webserver, tomcat server, database, etc.) ? if so may be you could check if timeout settings match your problem i met the problem with a websphere 3.5.x talking to a sql server through a router it (websphere datasource system) wasn't aware that the router had cut the connection after some time of inactivity hope this helps David - Original Message - From: Sébastien Caillaud [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 13, 2002 8:58 PM Subject: 500 Internal Server Error usually after ~ 6 hours of use Hi. My configuration is Apache 1.3.14 Tomcat 3.2 I receive 500 Internal Server Error usually after ~ 6 hours of use. At this moment i need to restart tomcat and it's work fine again on mod_jk.log file, i have this line more and more up to the crash : [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111 [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1 and this line : [jk_ajp12_worker.c (601)]: ajpv12_handle_response, error writing back to server else i have a great number of this line ( i think this is normally) : [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters Can you help me? Thanks... NB: my connection pooling to the database is enable and works fine. Sébastien Caillaud -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
bug in mod_webapp for binary uploads
hi everybody i found something that looks a lot like a bug to me i got a linux 2.4 running apache 1.3.20 and tomcat 4.0.1 with webapp-module-1.0-tc40 i am using com.oreilly.servlet package and i can't upload binary files well actually i can, but all FF bytes in the files are lost! quite annoying indeed all binary files are corrupted it works well for text files (they don't have FF bytes!) of course there is no logs available as the file writing performs ok it's just that some bytes are not transfered to the servlet engine (well i think so...) i tested the same code with a stand-alone tomcat 4.0.1 and it works fine! so i looked in the archives and found this link which seems related to my pb: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg39837.html does anyone have a clue on a possible workaround ? or is a patch available ? or when will a patch be available/released ? thanks a lot anyway David -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: File file = new File(path);
may be a stupid sugestion but... anyway have you checked the unix rights of the user you run tomcat as for the file /usr/share/tomcat/webapps/spankroot/WEB-INF/classes/properties.txt ?? David - Original Message - From: Todd Fulton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 21, 2001 4:54 PM Subject: File file = new File(path); Anyone, I've been trying to create a File (and FileInputStream) from within Tomcat 3.3 now for hours now. I'm using the TOMCAT_HOME environment variable to get the path, but keep getting nothing but java.io.FileNotFoundException: /usr/share/tomcat/webapps/spankroot/WEB-INF/classes/properties.txt (No such file or directory) java.sql.SQLException: The url cannot be null with the code: String path = System.getProperty(tomcat.home) + /webapps/spankroot/WEB-INF/classes/properties.txt ; File file = new File(path); FileInputStream stream = new FileInputStream(file); But, the file is there!!! Can anyone help? Todd -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]