IIS / Tomcat - POST data size.
I have configured Tom-cat with IIS. When I try to upload a file of size greater than 100 KB, it displays an error Page cannot be displayed because Tom-cat was stopped. But when I run the same URL with 8080, that is, bypassing the IIS, it works fine. Can you help me ? Thank's Cleber - Brazil --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.516 / Virus Database: 313 - Release Date: 1/9/2003
Charset encoding issue (again :-))
Hi, everybody. I've some doubts about html form charset encoding. I will be glad if someone could answer questions above. 1 ) We have jsp files with directive %@ page language=java pageEncoding=utf-8 contentType=text/html;charset=utf-8 % and some classes with the following working code : if ( request.getEncoding() == null ) { String s = request.getParameter( some_param ); byte [] b = s.getBytes( iso-8859-1); s = new String( b, utf-8 ); } a) Will it work for any charset encoding ? If i replace utf-8 for windows-1251 this code will still work ? b) Is there another clean way to use utf-8 in my jsp pages ? I've read the document in http://tagunov.tripod.com/i18n/i18n.html but i'm not sure if i could understand it. :-( 2 ) When i use request.setEncoding( windows-1251) and request.getParameter( some_param ), which one of these sentences will be true ? a) request.getParameter() will do byte [] b = s.getBytes( iso-8859-1); return new String( b, windows-1251 ); b) request.getParameter() will do byte [] b = s.getBytes( windows-1251 ); return new String( b ); c) request.getParameter() will do byte [] b = s.getBytes( windows-1251 ); return new String( b, windows-1251 ); d) request.getParameter() will do byte [] b = s.getBytes(); return new String( b, windows-1251 ); Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Charset encoding issue (again :-))
But with this approach, all web apps running under the same JVM will use this encoding. We want to avoid this... Edson Alves Pereira wrote: The best way to solve that is to set -Dfile.encoding=ISO-8859-1 in JAVA_OPTS, with this you ensure that your JVM is using the encoding that you want. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Charset encoding issue (again :-))
But to do byte[ ]b = request.getParameter( MyParam ).getBytes( UTF-8 ); you must know the charset encoding of the form paramaters (utf-8 in this case) which leads us to original question. Edson Alves Pereira wrote: Then, you could create a class that would convert strings from some encoding that you don´t known and transform to UTF-8 and that class load its configuration from a local .properties file to make it flexible, for example: public String getParameter( String stName_ ) { //This will change the native encoding to you favorite one: byte[ ]b = request.getParameter( MyParam ).getBytes( UTF-8 ); return new String( b ); //To use default encoding: return new String( b, UTF-8 ); //Some different: } -- De: Daniel H A Lima[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada:quinta-feira, 9 de outubro de 2003 11:11 Para: Tomcat Users List Assunto:Re: Charset encoding issue (again :-)) But with this approach, all web apps running under the same JVM will use this encoding. We want to avoid this... Edson Alves Pereira wrote: The best way to solve that is to set -Dfile.encoding=ISO-8859-1 in JAVA_OPTS, with this you ensure that your JVM is using the encoding that you want. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re [ 4 ] : Charset encoding issue
Anton Tagunov wrote: Hello, Lima! Hi, Anton. lccb I've found a message (at lccb http://w6.metronet.com/~wjm/tomcat/2001/Mar/msg00547.html) : lccb Tomcat follows the HTML standard, Hmm.., to me it looks like a browser issue, not Tomcat. Hence its a bit OT here, but still we have started the discussion :-) (again, as I have suggested before, Lima, you may want to spy your browser-tomcat traffic to make sure what bytes are transferred exactly, then you'll be sure who is mangling the data: Tomcat or browser, my feeling is that this is browser) How can i spy the traffic between Tomcat and the browsers ? lccb which explicitly declares that MIME type lccb application/x-www-form-urlencoded is suitable ONLY for transferring ASCII practice seems to be different lccb (but will of course work for ISO 8859-1 as well). look, it's already funny: according to the standard application/x-www-form-urlencoded is suitable ONLY for transferring ASCII but according to this message the existing software will of course work for ISO 8859-1 did you enjoy this of course? ;-) lccb See lccb http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1 lccb It says: lccb The content type application/x-www-form-urlencoded is inefficient lccb for sending large quantities of binary data or text containing non-ASCII lccb characters. The content type multipart/form-data should be used for lccb submitting forms that contain files, non-ASCII data, and binary data. Yup, but in practice I beleive that we have succeded many times to send cyrillics this way. The browser was running on Windows however. All the browsers (huh, do I remember it correctly?) were using windows-1251 and koi8-r when the page was encoded with the respective encoding). ? lccb SO : Red Hat Linux 9 I assume, both browser and Tomcat, right? Galeon, Mozilla and Tomcat running in Linux. lccb Browsers : Galeon e Mozilla lccb Reg. Settings: English lccb Keyboard Set.: English (internacional) lccb Locale : Not modified. The JVM is using [us,EN], i think. But thats lccb ok because i prefer to test my application without change lccb locale to [pt,BR] (we never know when 2 webapp will run using differents lccb locale settings) what language are you typing in? what kind of characters get mungled? Characters from brazilian portuguese. Like 'á', 'ç', 'ã', ... lccb ((3)) I don't know why page contentType + form enctype multipart is lccb the only working combination but its ok for me. I just would like to lccb understand it :-| So do we :-) Thanks ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[3]: Charset encoding issue
Hi guys. I'll try to answer your questions : ((1)) I've found a message (at http://w6.metronet.com/~wjm/tomcat/2001/Mar/msg00547.html) that seems to explain this odd behaviour (but i'm not sure) : Tomcat follows the HTML standard, which explicitly declares that MIME type application/x-www-form-urlencoded is suitable ONLY for transferring ASCII (but will of course work for ISO 8859-1 as well). See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1 It says: The content type application/x-www-form-urlencoded is inefficient for sending large quantities of binary data or text containing non-ASCII characters. The content type multipart/form-data should be used for submitting forms that contain files, non-ASCII data, and binary data. ((2)) Fernandez wrote : Fernandez I've recently have a similar problem with spanish language. Fernandez What OS are you running Tomcat on? What are your LOCALE settings? Anton wrote : Anton What browser are you using? Anton What OS are you on? Anton If it is Windows, what are the regional settings? Anton Is it an English or a localized version of Windows? Anton What language are you typing in? SO : Red Hat Linux 9 Browsers : Galeon e Mozilla Reg. Settings: English Keyboard Set.: English (internacional) Locale : Not modified. The JVM is using [us,EN], i think. But thats ok because i prefer to test my application without change locale to [pt,BR] (we never know when 2 webapp will run using differents locale settings) ((3)) I don't know why page contentType + form enctype multipart is the only working combination but its ok for me. I just would like to understand it :-| Thanks again, guys !!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Charset encoding issue
But why when i modify or remove the enctype from form tag, the browser seems to forget the correct charset of these form fields ? Thanks. Hello Lima! lccb I have a jsp page with some form fields. I don't know how is the right way lccb to set the charset (because we're using portuguese characters). This is lccb the only configuration that have worked for me : lccb %@ page contentType=html/text; charset=UTF-8% To the best of my knowledge w3c standards do not prescribe the browser what charset to encode form fields with. In practice however this is generally the same charset that the page containing form is in. So yes, if you want the form data to be encoded with charset XXX you need your page to have content type with charset XXX. And this is what this [EMAIL PROTECTED] directive is doing. (In a servlet you would do response.setContentType()). I have written an elaborate essay on this, it should still be available at http://tagunov.tripod.com lccb form (...) enctype=multipart/form-data As far as I know enctype here is not required. lccb Is it right ? Is there other way ? Hope this mail and my old essay have answered at least part of your questions. WBR, Anton - 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]
Charset encoding issue
Hi, guys. How are you ? I have a jsp page with some form fields. I don't know how is the right way to set the charset (because we're using portuguese characters). This is the only configuration that have worked for me : %@ page contentType=html/text; charset=UTF-8% (...) form (...) enctype=multipart/form-data Is it right ? Is there other way ? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Includes desappearing
hi! On my JSP project with Tomcat4/Apache sometimes, in some pages, the page is returned incomplete. They come without the includes, that are other JSPs and without parts of the master JSP. It is not normal and I am worried by this... do somebody can help me?? Thank u in advance, Marcelo Mathias Lima Web Developer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: RES: How can I automatically start a servlet in a specific time?
nao dah pra colocar o tempo q vai demorar pra Servlet se carregar no web.xml?? soh pra saber... Edson Carlos Ericksson Richter wrote: Olá, Kelly. Existem alguns produtos para agendamento de tarefas (schedulers), e que são na verdade instalados como módulos ou serviços (depende do servidor utilizado). Até onde sei, pela especificação J2EE - da qual as Servlets e JSP fazem parte - não devemos utilizar threads. Eu sei que existem MLETS prontos para utilização com JBoss e com HP-AS, mas realmente não conheço nenhum para Jakarta/Tomcat. Uma boa fonte de pesquisa é o www.sourceforge.net. Boa sorte. Atenciosamente, Edson Carlos Ericksson Richter Gerente de Tecnologia ECONET Soluções Web +55 61 326 5115 -Mensagem original- De: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 10 de abril de 2002 19:20 Para: 'Tomcat Users List' Assunto: RES: How can I automatically start a servlet in a specific time? Yes Ken, I mean I don't want to load it until a specific time. I need to load it to do a specific job at a certain time. Do you know how can I do this? -Mensagem original- De: Ken Anderson [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 10 de abril de 2002 19:19 Para: Tomcat Users List Assunto: Re: How can I automatically start a servlet in a specific time? You mean you don't want to load it until a specific time, or you don't want it to respond to requests until a certain time? Ken Carlos Martins wrote: Kelly, Boa pergunta... não sei nenhuma maneira directa, mas podes sempre criar um servlet tipo scheduler que arranca automáticamente com o tomcat e que a determinadas horas arranca outros servlets. Carlos -Original Message- From: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 10 de Abril de 2002 23:04 To: '[EMAIL PROTECTED]' Subject: How can I automatically start a servlet in a specific time? Can anyone answer my question? How can I automatically start a servlet in a specific time? For example: at midnight. I don't want to start it when I start my webserver. Thanks in advanced, Kelly Prudente Pereira Analista de Sistemas - NDS [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Fóton® Informática e Serviços Fone: (61) 328 5060 R.: 221 -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/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]
Re: Includes desappearing
It is not a (my) program error... there is nothing different on the log... It only occurs on Mozilla and in some pages. Only some parts of the jsp are returned... I think it is a poltergeist problem... {:o) [EMAIL PROTECTED] wrote: You should check the logs. Probably some exceptions are being thrown. RS Marcelo Mathias Lima [EMAIL PROTECTED] on 04/11/2002 07:45:57 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: Subject: Includes desappearing hi! On my JSP project with Tomcat4/Apache sometimes, in some pages, the page is returned incomplete. They come without the includes, that are other JSPs and without parts of the master JSP. It is not normal and I am worried by this... do somebody can help me?? Thank u in advance, Marcelo Mathias Lima Web Developer -- 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]
Smart Upload
Did anyone already used it under linux/apache3/tomcat4?? It is not working here :((( -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Smart Upload
I don't understod correctly the virtual host concept... can u help me? can't that dir be a real/physical path? thank u. Micael Padraig Og mac Grene wrote: I have, works great. At 09:54 AM 3/11/02 -0300, you wrote: Did anyone already used it under linux/apache3/tomcat4?? It is not working here :((( -- 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]
Trouble with Jsp
Hello: I have a Red Hat Linux 7.2 box installed with: IBMJAVA 2-13 and TOMCAT 4.0.2, I Installed the binary rpm versions of this packages . When I try to access any Jsp page (tomcat jsp examples included) show me the following error: Exeption: javax.servlet.ServletExecption: /sun/tools/javac/Main root cause: java.lang.NoClassDefFoundError: /sun/tools/javac/Main Please help me. Ivan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
org.apache.tomcat.request.ParseMime
how can I download it? org.apache.tomcat.request.ParseMime thank u, Marcelo Mathias Lima -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problem with includes
hi! I've Tomcat 4.0/WinME and I'm with problem when I use a include tag like this jsp:include page=include/header.inc flush=true/ It generates this error: type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception java.lang.IllegalStateException at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:109) ... If the file isn't or if I don't use the tag this problem don't occurs. What is happening?? Thanks in advance, -- Marcelo Mathias Lima [EMAIL PROTECTED] Java/JSP Developer
Easy question
One more easy question that can help me so... How can I set a absolute path on windows in this element? is it right? (server.xml) Context path=/ docBase=c:\jsp\mydir debug=0/ I'm using WinME / Tomcat4.0. if it is right my problem must have by other causes. So, help me please... Thak u all, -- Marcelo Mathias Lima [EMAIL PROTECTED] Web Applications Developer
Connection Pool on Tomcat 4
Hi all! I'm a new Tomcat user and I'm trying to know how do I to get (on my JSPs) a java.sql.Connection from the Connection that I set with Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/authority?user=test;password=test userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name / This is a Connection Pool, isn't? Thank u, -- Marcelo Mathias Lima [EMAIL PROTECTED] Java/JSP Developer
DBPool on Tomcat
Hey guys... Does anyone can help me? I need to know if Tomcat has a DBPool and a fast example to know how to get these connections... I know that u can already answered this before, but I think that it is easy to who really knows. And u DO know, right? :) Thanks in advance, -- Marcelo Mathias Lima [EMAIL PROTECTED] Java/JSP Developer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: DBPool on Tomcat
Sorry... :)) I promess that I tried a documentation... but was the wrong documentation.. Very thank u... apologize me to be lammer... :)) - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 2:29 PM Subject: Re: DBPool on Tomcat On Thu, 14 Feb 2002, Marcelo Mathias Lima wrote: Date: Thu, 14 Feb 2002 15:00:23 -0300 From: Marcelo Mathias Lima [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: DBPool on Tomcat Hey guys... Does anyone can help me? I need to know if Tomcat has a DBPool and a fast example to know how to get these connections... I know that u can already answered this before, but I think that it is easy to who really knows. And u DO know, right? :) Sniff, sniff ... work my fingers to the bone writing documentation and nobody even *looks* at it ... :-) In your running Tomcat installation: http://localhost:8080/tomcat-docs/jndi-resources-howto.html Or online: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html Scroll down to the section on JDBC Data Sources. Thanks in advance, -- Marcelo Mathias Lima [EMAIL PROTECTED] Java/JSP Developer Craig -- 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: X Windows and Tomcat
Krasi, you need to install a dummie Xserver named Xvfb. With this Xserver running you can shut your Xwindows without stopping tomcat. You´re welcome Gustavo OPENGATE Gustavo P. M. Lima Supervisor de Sistemas http://www.opendf.com.br [EMAIL PROTECTED] - Original Message - From: Krasi Zlatev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 24, 2001 9:07 AM Subject: X Windows and Tomcat Why when I close X Windows, Tomcat exits? Thank you! = Krasi Zlatev Enjoy! __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
Servlet configuration
Hi there, I'm beginner with TOMCAT, which means maybe my question is too simple for you, but it is really advanced to me. I would like get help with the following: I have Cocoon installed together with TOMCAT and it is working perfectly. I would like to use cocoon to handle the presentation issues of my site. However, I would like to have my own servlet,which means, I would like to use my own directory (let's say, /webapps/cpl ) instead of having my things inside the Cocoon's directory (/webapps/cocoon). My problem starts when I try do display a xml page (lets say /cpl/prms/getparms.xml) that is placed within my directory. I configured my /cpl/web.xml as shown below and I think because of that the invocation of /cpl/prms/getparms.xml is not sent to Cocoon rather to my servlet /cpl. Is this correct and if it is, is there anything I can do in order to send that call directly to Cocoon? servlet-mapping servlet-namecpl/servlet-name url-pattern/cpl/url-pattern /servlet-mapping Thank you in advance for your kind attention, Celson