set header in all responses
Hi all! Is possible to put this headers in all responses generated by Tomcat? response.setHeader(Pragma,no-cache); response.setHeader (Cache-Control,no-history); response.setDateHeader(Expires,-1); Thanks the attetion. -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br
Re: set header in all responses
right... I need to all apps in an TC instance use these headers... how I do it? I don't know how use filters / valves... Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] How to determine whether a session or request is SSL
To know if the user use ssl, try the boolean request.isSecure(). On Fri, 11 Mar 2005 13:27:09 +0100, Jan Behrens [EMAIL PROTECTED] wrote: Hi list, I would like to evaluate the current encription status of a users session or request from out of a taglib or servlet. E.g. know whether the user is using https and possibly the encryption strength used... This must be easy (I hope) but I couldn't work out how to so far and wondered whether anybody out there could point me into the right direction. TIA Jan Jan Behrens OFFIS FuE-Bereich Betriebliches Informations- und Wissensmanagement Escherweg 2 - 26121 Oldenburg - Germany Fon: +49 4 41 97 22 - 187 - Fax: +49 4 41 97 22-102 E-mail: [EMAIL PROTECTED] - URL: http://www.offis.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: [OT] How to determine whether a session or request is SSL
Sincerily... I don know. But, reading [http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html], I see this tip: To access the SSL session ID from the request, use: String sslID = (String)request.getAttribute(javax.servlet.request.ssl_session); And, in the ServletRequest javadoc [http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html#getAttribute(java.lang.String)], I found: For example, for requests made using HTTPS, the attribute javax.servlet.request.X509Certificate can be used to retrieve information on the certificate of the client. I don't know, but maybe exist more attributes than that. I hope it helps! On Fri, 11 Mar 2005 14:09:18 +0100, Jan Behrens [EMAIL PROTECTED] wrote: Thanks Rodrigo, do you know of a way to get the encryption level of the request as well? (40bit, 128bit, ...) TIA Jan Jan Behrens OFFIS FuE-Bereich Betriebliches Informations- und Wissensmanagement Escherweg 2 - 26121 Oldenburg - Germany Fon: +49 4 41 97 22 - 187 - Fax: +49 4 41 97 22-102 E-mail: [EMAIL PROTECTED] - URL: http://www.offis.de Rodrigo Avila [EMAIL PROTECTED] 11.03.2005 09:58 Bitte antworten an Tomcat Users List tomcat-user@jakarta.apache.org An Tomcat Users List tomcat-user@jakarta.apache.org Kopie Thema Re: [OT] How to determine whether a session or request is SSL To know if the user use ssl, try the boolean request.isSecure(). On Fri, 11 Mar 2005 13:27:09 +0100, Jan Behrens [EMAIL PROTECTED] wrote: Hi list, I would like to evaluate the current encription status of a users session or request from out of a taglib or servlet. E.g. know whether the user is using https and possibly the encryption strength used... This must be easy (I hope) but I couldn't work out how to so far and wondered whether anybody out there could point me into the right direction. TIA Jan Jan Behrens OFFIS FuE-Bereich Betriebliches Informations- und Wissensmanagement Escherweg 2 - 26121 Oldenburg - Germany Fon: +49 4 41 97 22 - 187 - Fax: +49 4 41 97 22-102 E-mail: [EMAIL PROTECTED] - URL: http://www.offis.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - 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] -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using new JDK 5.0 language features with Tomcat 5.5?
since we're talking about that... I have a system running *perfectly* using Tomcat 5.0.28 and Java 1.4.2_07. But I think in migrate this system to Java 1.5.0_01 using Tomcat 1.5.7, in an Production server. My question is: have any problem in make this migration? What is the group opinion? Restrictions? Problems in using an newer jre in an production server? Thanks the help! On Mon, 7 Mar 2005 13:09:37 -, Allistair Crossley [EMAIL PROTECTED] wrote: Hi, We've been fine with for loops and generics with Tomcat 5.5, but we have only used JSTL in JSPs, no scriplet. Allistair. -Original Message- From: Christoph Kutzinski [mailto:[EMAIL PROTECTED] Sent: 07 March 2005 11:44 To: Tomcat Users List Subject: Re: Using new JDK 5.0 language features with Tomcat 5.5? AFAIK the eclipse JDT compiler, that is used per default to compile the JSPs, doesn't support JDK 5.0 features. So you mustn't use these features in JSPs or change the JSP compiler. Christoph Petr Jiricka wrote: Hello list, is it safe to use the new JDK 5.0 language features, e.g. annotations and generic types, with Tomcat 5.5? Do people do this in practice? Was this tested extensively? Are there any known issues in this area? Please let me know your experience with using new JDK 5.0 constructs with Tomcat. The reason I am asking is because the J2EE 1.4 specification mandates JDK 1.4 as the baseline, and all compliant servers must work reliably with JDK 1.4. There is no such requirement for JDK 5.0, so any applications that exploit the new JDK 5.0 constructs are technically non-portable and non-compliant with J2EE 1.4. Thanks Petr - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache 1.3 + mod_jk: Segmentation fault
Hi! Does anyone see this error in Apache error_log? [...] child pid 6645 exit signal Segmentation fault (11) It only happen when I use mod_jk 1.2.8 compiled by me (./configure--with=apxs=/usr/sbin/apxs; make; make install), using the instructions at http://jakarta.apache.org/tomcat/connectors-doc/index.html. I use Apache 1.3.33 (slackware package found at www.linuxpackages.net) and Tomcat 5.0.28 (binary distribution). Thanks the atention! -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache 1.3 + mod_jk: Segmentation fault
On Fri, 25 Feb 2005 16:19:23 +0100, Mladen Turk [EMAIL PROTECTED] wrote: Do you have ForwardDirectories enabled? Remove 'JkOptions ForwardDirectories' and there shouldn't be segfaults any more. This has been fixed in the cvs, and will not be present in next release scheduled for next month. Yes, I have... I remove it, and the problem was gone... but, now is displayed the Java code, not the page... why? Thanks the attention!! -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using tomcat session
Hi, When two clients are connected to my server, is possible to an third client use the sessions of the other two users? If it is possible, how I catch the sessions? Thanks! -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Path in web.xml
Ok, but in getResourceAsStream() i need to pass a String with the name of the file, right? But, is the path/name of the file I store in an parameter in web.xml... and I get this name again using config.getInitParameter( nameOfTheFile ). For now, I use the full-path in the nameOfTheFile parameter in web.xml... but, how I can use just an relative path in this parameter? Sorry if I misundestood... my english is very poor. Thanks again! On Fri, 11 Feb 2005 06:35:51 -0500, Tim Funk [EMAIL PROTECTED] wrote: If you wish to load a file relative to the context root of your webapp - look at ServletContext.getResourceAsStream() -Tim Rodrigo Avila wrote: Hi, is possible to make a Propertie, in the web.xml file, poiting to a file using the relative path of the file? Something like: propertie: fooProp value: conf/file.txt (file.txt is in $CATALINA_HOME/conf directory, or /usr/local/tomcat/conf) Thanks the help! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Relative Path in web.xml
Hi, is possible to make a Propertie, in the web.xml file, poiting to a file using the relative path of the file? Something like: propertie: fooProp value: conf/file.txt (file.txt is in $CATALINA_HOME/conf directory, or /usr/local/tomcat/conf) Thanks the help! -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.awt.headless=true in tomcat startup
Hi! I try to use some awt\swing classes to convert rtf strings to html in an jsp page. But I receive the following Exception: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. But, to resolve this problem, I find the following tip: assuming you're using a 1.4 JVM, add the following line to your startup command: $JAVA_COMMAND -Djava.awt.headless=true ... But, how I put this option in the Tomcat startup? -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP Compilation Problem
Hi! When I create a new JSP file in tomcat 5.0.24 and try to run it, the Tomcat send me this error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file /usr/local/jakarta-tomcat-5.0.24/work/Catalina/localhost/intranet/org/apache/jsp/web/Test_jsp.java:7: org.apache.jsp.web.Test_jsp is not abstract and does not override abstract method getIncludes() in org.apache.jasper.runtime.HttpJspBase public final class Test_jsp extends org.apache.jasper.runtime.HttpJspBase ^ 1 error org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:83) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:306) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:398) [...] The jsp file is Test.jsp. I don try to compile it manually; that error appear when Tomcat try to compile it. I try clean work/ directory; no sucess. I try to change to newest Tomcat binary: no sucess. And, it occur in only one context. If I create another context, create a new .jsp file, all works ok. I make searches in Google, but nothing resolve my problem. Thanks the attention! -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Compilation Problem
Oh, my God... Idiot! I have in my classpath the jasper-runtime.jar (I use it in the Eclipse classpath)... duh! Clouse, it works now! Thanks the attention! On Thu, 03 Feb 2005 09:25:29 -0500, Tim Funk [EMAIL PROTECTED] wrote: 1) try a newer version 2) you might have older jasper libraries in your path -Tim Rodrigo Avila wrote: Hi! When I create a new JSP file in tomcat 5.0.24 and try to run it, the Tomcat send me this error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file /usr/local/jakarta-tomcat-5.0.24/work/Catalina/localhost/intranet/org/apache/jsp/web/Test_jsp.java:7: org.apache.jsp.web.Test_jsp is not abstract and does not override abstract method getIncludes() in org.apache.jasper.runtime.HttpJspBase public final class Test_jsp extends org.apache.jasper.runtime.HttpJspBase ^ 1 error org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:83) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:306) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:398) [...] The jsp file is Test.jsp. I don try to compile it manually; that error appear when Tomcat try to compile it. I try clean work/ directory; no sucess. I try to change to newest Tomcat binary: no sucess. And, it occur in only one context. If I create another context, create a new .jsp file, all works ok. I make searches in Google, but nothing resolve my problem. Thanks the attention! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rodrigo de Avila [EMAIL PROTECTED] http://www.avila.eti.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]