Wrong charset (is UTF-8 should be ISO 8859-1)
Hello. I'm a tomcat beginner but have experience of the apache http server. I have a character issue I can't figure out. Here are a simple example of a html-page. - 8 - !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=sv lang=sv head titlemin titel/title meta name=Title content=min sida / meta http-equiv=Content-type content=text/html; charset=ISO-8859-1 / meta http-equiv=Content-Script-Type content=text/javascript / meta http-equiv=Content-Style-Type content=text/css / meta http-equiv=content-language content=sv / meta name=robots content=Index, follow / meta name=Description content=[EMAIL PROTECTED] / meta name=Keywords content=mina keywords / link rel=schema.DC href=http://purl.org/DC/elements/1.0/; / meta name=DC.Format scheme=IMT content=text/html / meta name=DC.Type content=text / meta name=DC.Title content=titel / meta name=DC.Description content=[EMAIL PROTECTED] / meta name=DC.Subject content= / meta name=DC.Creator content=Jag / meta name=Date scheme=W3CDTF content=2006-12-15 / meta name=DC.Date scheme=W3CDTF content=2006-12-15 / meta name=DC.Date.Modified scheme=W3CDTF content=2006-12-15 / meta name=DC.Date.Created scheme=W3CDTF content=2006-11-27 / meta name=DC.Language scheme=RFC1766 content=sv / meta name=DC.Identifier scheme=URL content=www.minurl.se / meta name=DC.Publisher content=min content / meta name=DC.Rights content=comyright till mig / meta name=DC.Organisation content=organisation / /head body test /body /html Now, When I view the page with explorer/firefox/opera it still think the characterset should be UTF-8. I have looked in the config files of tomcat but can't find any parameters that corresponds to the defaultcharacterset that I'm used to from apache http server httpd.conf file. Is there such a parameter in tomcat? If not, why does the webbrowser think the page is in UTF8 when running the page on tomcat but ISO 8859-1 when running it on a apache http server? Fredrik Sköldheimer IT-konsult Telefon: Växel: Direkt: E-post: +46 36 32 65 64 +46 36 32 40 00 265 64 [EMAIL PROTECTED] IT-centrum Box 1024 551 11 Jönköping
Re: Presentation on Tomcat
On 1/4/07, Vijay Hatewar [EMAIL PROTECTED] wrote: Hi All I am very new to Tomcat and working as a QA Engineer , I have to deliver presentation on How web application can be deployed using tomcat , different configuration files and how they are used . basically I want to cover high level functional aspect . Please help me , as I am hardly acquainted to tomcat I really find it funny that so many jobs are being outsourced to Bangalore and all those other places. The reason we are told is always the same one: Highly qualified ppl working there fore little money. Now, what do we see here on the list? Guys who don't even bother to read the docs, begging for help on the most simple questions, on the same time showing off when it comes to outsourcing-contracts how smart and capable they are. Don't get me wrong, but do you really help that anyone here is trying to help you killing his / her job? Show at least a little effort! SCNR Jerome __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MOD_JK Redirection issues
OK, now I've got it. There is a special handling for encoded slashes in apache. Most other encoded chars will work transparent, but not slashes. You can set AllowEncodedSlashes On in Apache. Please read the docs at http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes to understand the consequences. The directive must be set at the global server or vhost level. Setting it only at the global server level will not be inherited to vhosts. I could reproduce your problem and it went away after setting this directive. Regards, Rainer Jagadeesh schrieb: I set the JkLogFile attribute and changed the JkRequestLogFormat to %w %V %T %B %q %U. Now whenever a request reaches the load balancer, the log file is getting updated and I am getting all the details like request header, status code etc. But when /APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API is sent to the server, the log file is not even getting updated and it seems mod jk is ignoring it. For all the other requests, the log file shows complete details except for the request with '%2F'. :( Any thoughts ?? Thanks Jagadeesh -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 03, 2007 11:21 PM To: Tomcat Users List Subject: Re: MOD_JK Redirection issues You need to use JkLogFile to configure a log file for mod_jk. This will tell us, what is happening. Have a look at the docs for mod_jk concerning JkLogFile. Have a look at http://tomcat.apache.org/connectors-doc/reference/apache.html Beware, that there is no default for this directive for version 1.2.19. The documented default only applies to 1.2.20. So please set JkLogFile explicitely. Rainer Jagadeesh schrieb: I changed the loglevel to TRACE, But I couldn't find any new log file. The access_log now shows 61.17.42.35 - - [03/Jan/2007:03:48:05 +] GET /APIServer/authz/list/master/AB?apikey=WEB_INTERFACE_API HTTP/1.1 200 1350 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9 61.17.42.35 - - [03/Jan/2007:03:48:44 +] GET /APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API HTTP/1.1 404 314 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9 Where the first request returns HTTP/1.1 200 and the 2nd request returns HTTP/1.1 404. error_log doesn't have any entries. I tried sending the same request directly to tomcat and both /APIServer/authz/list/master/AB?apikey=WEB_INTERFACE_API and /APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API gave the correct response and the status was HTTP/1.1 200. The second request returns 404 only when it is passed through mod jk. Thanks Jagadeesh -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 03, 2007 2:03 PM To: Tomcat Users List Subject: Re: MOD_JK Redirection issues Set JkLogLevel to trace and have a look at the JkLogFile. Jagadeesh wrote: Thanks for the tip and I will delete the cachelines. I want jkmod to redirect all the requests to tomcat and it is working fine except for the request which has %2f in the url before the parameter part. For eg: http://loadbalancer.xxx.com/authenticate%2Fjagadeesh?key=12345678 will not be redirected to tomcat servlet container, however http://loadbalancer.xxx.com/authenticate/jagadeesh?key=12345678 http://loadbalancer.xxx.com/authenticate/jagadeesh%2C/abcd?key=12345678 http://loadbalancer.xxx.com/authenticate/jagadeesh?key=12345678test=%2F are all getting redirected properly to tomcat. Only those request with %2F in the URI before the parameter (?) part is being ignored and they are not going past apache (load balancer). The error_log says [Sun Dec 31 04:02:03 2006] [notice] Digest: generating secret for digest authentication ... [Sun Dec 31 04:02:03 2006] [notice] Digest: done [Sun Dec 31 04:02:03 2006] [notice] Apache/2.2.2 (Fedora) configured -- resuming normal operations [Sun Dec 31 14:55:17 2006] [error] [client 212.241.200.196] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) [Sun Dec 31 21:58:25 2006] [error] [client 87.118.100.232] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) Thanks Jugs -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 03, 2007 1:42 PM To: Tomcat Users List Subject: Re: MOD_JK Redirection issues OK, from the config I would guess, that you actually forward the request to tomcat, but get the 404 from there. What does the debug log tell you about the request in question? Small hint not related to your problem: delete the cachesize lines if you've got no special reason for them. Jagadeesh wrote: Thanks for the reply Rainer. I am using tomcat-connectors-1.2.19 and jBoss 4.0.5GA in Fedora
RE: Presentation on Tomcat
I am not sure if I should take effort, answering your question but still... Jerome .. Yes you are right , I perhaps made very simple request. But is it fair and right , you putting every Indian in the same bracket. I believe everything is getting outsourced in India since long time and we are doing good. If we had been as bad as you have mentioned this process would not have had continued. I believe this is a help group, and nobody have told me for what is the level of help which this group can offer. If you find this as very simple, not worth of concern you better ignore it. I don't really see you helping everyone and answering every appropriate question. What I can clearly see is you are High Time frustrated person who can not do anything but like a Old witch cursing a beautiful dream. Regards Vijay -Original Message- From: The Schneider Company [mailto:[EMAIL PROTECTED] Sent: Thursday, January 04, 2007 2:50 PM To: users@tomcat.apache.org Subject: Re: Presentation on Tomcat On 1/4/07, Vijay Hatewar [EMAIL PROTECTED] wrote: Hi All I am very new to Tomcat and working as a QA Engineer , I have to deliver presentation on How web application can be deployed using tomcat , different configuration files and how they are used . basically I want to cover high level functional aspect . Please help me , as I am hardly acquainted to tomcat I really find it funny that so many jobs are being outsourced to Bangalore and all those other places. The reason we are told is always the same one: Highly qualified ppl working there fore little money. Now, what do we see here on the list? Guys who don't even bother to read the docs, begging for help on the most simple questions, on the same time showing off when it comes to outsourcing-contracts how smart and capable they are. Don't get me wrong, but do you really help that anyone here is trying to help you killing his / her job? Show at least a little effort! SCNR Jerome __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Presentation on Tomcat
Vijay, for a start try reading up the documentation. You'll find it at http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html Cheers Greg -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MOD_JK Redirection issues
Thanks Rainer That solved my problem, Thank you very much!!! Regards Jagadeesh -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Thursday, January 04, 2007 3:09 PM To: Tomcat Users List Subject: Re: MOD_JK Redirection issues OK, now I've got it. There is a special handling for encoded slashes in apache. Most other encoded chars will work transparent, but not slashes. You can set AllowEncodedSlashes On in Apache. Please read the docs at http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes to understand the consequences. The directive must be set at the global server or vhost level. Setting it only at the global server level will not be inherited to vhosts. I could reproduce your problem and it went away after setting this directive. Regards, Rainer Jagadeesh schrieb: I set the JkLogFile attribute and changed the JkRequestLogFormat to %w %V %T %B %q %U. Now whenever a request reaches the load balancer, the log file is getting updated and I am getting all the details like request header, status code etc. But when /APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API is sent to the server, the log file is not even getting updated and it seems mod jk is ignoring it. For all the other requests, the log file shows complete details except for the request with '%2F'. :( Any thoughts ?? Thanks Jagadeesh -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 03, 2007 11:21 PM To: Tomcat Users List Subject: Re: MOD_JK Redirection issues You need to use JkLogFile to configure a log file for mod_jk. This will tell us, what is happening. Have a look at the docs for mod_jk concerning JkLogFile. Have a look at http://tomcat.apache.org/connectors-doc/reference/apache.html Beware, that there is no default for this directive for version 1.2.19. The documented default only applies to 1.2.20. So please set JkLogFile explicitely. Rainer Jagadeesh schrieb: I changed the loglevel to TRACE, But I couldn't find any new log file. The access_log now shows 61.17.42.35 - - [03/Jan/2007:03:48:05 +] GET /APIServer/authz/list/master/AB?apikey=WEB_INTERFACE_API HTTP/1.1 200 1350 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9 61.17.42.35 - - [03/Jan/2007:03:48:44 +] GET /APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API HTTP/1.1 404 314 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9 Where the first request returns HTTP/1.1 200 and the 2nd request returns HTTP/1.1 404. error_log doesn't have any entries. I tried sending the same request directly to tomcat and both /APIServer/authz/list/master/AB?apikey=WEB_INTERFACE_API and /APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API gave the correct response and the status was HTTP/1.1 200. The second request returns 404 only when it is passed through mod jk. Thanks Jagadeesh -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 03, 2007 2:03 PM To: Tomcat Users List Subject: Re: MOD_JK Redirection issues Set JkLogLevel to trace and have a look at the JkLogFile. Jagadeesh wrote: Thanks for the tip and I will delete the cachelines. I want jkmod to redirect all the requests to tomcat and it is working fine except for the request which has %2f in the url before the parameter part. For eg: http://loadbalancer.xxx.com/authenticate%2Fjagadeesh?key=12345678 will not be redirected to tomcat servlet container, however http://loadbalancer.xxx.com/authenticate/jagadeesh?key=12345678 http://loadbalancer.xxx.com/authenticate/jagadeesh%2C/abcd?key=12345678 http://loadbalancer.xxx.com/authenticate/jagadeesh?key=12345678test=%2F are all getting redirected properly to tomcat. Only those request with %2F in the URI before the parameter (?) part is being ignored and they are not going past apache (load balancer). The error_log says [Sun Dec 31 04:02:03 2006] [notice] Digest: generating secret for digest authentication ... [Sun Dec 31 04:02:03 2006] [notice] Digest: done [Sun Dec 31 04:02:03 2006] [notice] Apache/2.2.2 (Fedora) configured -- resuming normal operations [Sun Dec 31 14:55:17 2006] [error] [client 212.241.200.196] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) [Sun Dec 31 21:58:25 2006] [error] [client 87.118.100.232] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:) Thanks Jugs -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 03, 2007 1:42 PM To: Tomcat Users List Subject: Re: MOD_JK Redirection issues OK, from the config I would guess, that you actually forward the request to tomcat, but get the 404 from there. What does the debug log tell you
tomcat 5.5.x problem on solaris 10/11
I've experience problem with web app deployments under Solaris. I have one web app that serves all requests.Context path=(default app).But requests for dirs such bin,conf,work,webapp and other in CATALINA_HOME don't go o my app and served by tomcat. Under Linux and windows same config works well. Is this known?Have you some workarounds or fixes for this? exists in versions 5.5.15-20(lower no tested) -- --- Server port=8005 shutdown=SHUTDOWN Service name=Catalina Connector port=80 enableLookups=false useBodyEncodingForURI=true maxSpareThreads=100 compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata compressableMimeType=text/html,text/xml,text/plain / Engine name=Catalina defaultHost=host Host name=host autoDeploy=false deployXML=false /Host /Engine /Service /Server - Context path= docBase=/opt/app/ debug=0 reloadable=false/ Thanks,Sergey - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 Memory Leak
Hi, Our java based application is running on tomcat 5.0.3 on linux with JRE 1.4.2_08. Since the migration from tomcat 5.0.27 to 5.0.30, a bunch of our application's sessions are not correctly closed and so they stay in live using memory. In using a leak tracker tool, a memory leak has been found in org.apache.tomcat.util.threads.ThreadWithAttributes. I have found some information about this issue dealing with swallowOutput however the application doesn't use it and that doesn't correspond to our exact tomcat version. (http://mail-archives.apache.org/mod_mbox/tomcat-users/200502.mbox/%3CBAY16- [EMAIL PROTECTED]) Unfortunately at this time we don't have any more detail about it. Can somebody help? Denis B. Following the stack trace from leak tracker tool : com.one2team.one2web.common.Session2web org.apache.tomcat.util.threads.ThreadWithAttributes org.apache.tomcat.util.threads.ThreadPool$ControlRunnable org.apache.tomcat.util.threads.ThreadPool org.apache.jk.common.ChannelSocket java.util.Hashtable$Entry java.util.Hashtable org.apache.jk.core.WorkerEnv org.apache.jk.server.JkMain org.apache.jk.server.JkCoyoteHandler org.apache.coyote.tomcat5.CoyoteConnector org.apache.coyote.tomcat5.CoyoteRequest org.apache.coyote.Request org.apache.coyote.RequestInfo java.util.ArrayList org.apache.coyote.RequestGroupInfo org.apache.coyote.RequestInfo org.apache.commons.modeler.BaseModelMBean mx4j.server.MX4JMBeanMetaData java.util.HashMap$Entry java.util.HashMap mx4j.server.DefaultMBeanRepository mx4j.server.MX4JMBeanServer org.apache.catalina.core.StandardWrapper org.apache.tomcat.util.http.mapper.Mapper$Wrapper org.apache.tomcat.util.http.mapper.Mapper$Context org.apache.tomcat.util.http.mapper.Mapper java.lang.String - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 Memory Leak
On 1/4/07, Denis Barthélemy [EMAIL PROTECTED] wrote: Hi, Our java based application is running on tomcat 5.0.3 on linux with JRE 1.4.2_08. Since the migration from tomcat 5.0.27 to 5.0.30, a bunch of our application's sessions are not correctly closed and so they stay in live using memory. Why don't you try a stable version for alternation? 5.0.30 is a beta :-) Leon In using a leak tracker tool, a memory leak has been found in org.apache.tomcat.util.threads.ThreadWithAttributes. I have found some information about this issue dealing with swallowOutput however the application doesn't use it and that doesn't correspond to our exact tomcat version. (http://mail-archives.apache.org/mod_mbox/tomcat-users/200502.mbox/%3CBAY16- [EMAIL PROTECTED])Unfortunately at this time we don't have any more detail about it. Can somebody help? Denis B. Following the stack trace from leak tracker tool : com.one2team.one2web.common.Session2web org.apache.tomcat.util.threads.ThreadWithAttributes org.apache.tomcat.util.threads.ThreadPool$ControlRunnable org.apache.tomcat.util.threads.ThreadPool org.apache.jk.common.ChannelSocket java.util.Hashtable$Entry java.util.Hashtable org.apache.jk.core.WorkerEnv org.apache.jk.server.JkMain org.apache.jk.server.JkCoyoteHandler org.apache.coyote.tomcat5.CoyoteConnector org.apache.coyote.tomcat5.CoyoteRequest org.apache.coyote.Request org.apache.coyote.RequestInfo java.util.ArrayList org.apache.coyote.RequestGroupInfo org.apache.coyote.RequestInfo org.apache.commons.modeler.BaseModelMBean mx4j.server.MX4JMBeanMetaData java.util.HashMap$Entry java.util.HashMap mx4j.server.DefaultMBeanRepository mx4j.server.MX4JMBeanServer org.apache.catalina.core.StandardWrapper org.apache.tomcat.util.http.mapper.Mapper$Wrapper org.apache.tomcat.util.http.mapper.Mapper$Context org.apache.tomcat.util.http.mapper.Mapper java.lang.String - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't register Tomcat as Windows service on some computers
When I use Java 1.6.0: Tomcat started using startup.bat works fine. When started using tomcat5.exe does nothing, and exits. When registered as a Windows service, and started using: net start tomcat5 There is a meaningless error message on the console, but in jakarta_service.log I find: [2006-12-21 16:59:48] [173 javajni.c] [error] Can't create the specified module. [2006-12-21 16:59:48] [764 prunsrv.c] [error] Failed creating java D:\Programs\Java\jdk1.6.0\jre\bin\server\jvm.dll [2006-12-21 16:59:48] [982 prunsrv.c] [error] ServiceStart returned 1 This problem occurs on Tomcat 5.0.28, and Tomcat 6. When I use Java 1.5.0 everything works fine. What's more strange: This problem occurs on Celeron 3000. On other computers with Intel Core 2 Duo E6300 or Pentium 4 3000 everything works fine. All the computers have the same OS (Windows XP SP2). Is this a problem with Tomcat or Java? How to solve this problem? -- Jestes kierowca? To poczytaj! http://link.interia.pl/f199e - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Strange behaviour after upgrade to 5.5.20
I think you're going to have to be a bit less vague if you want any real responses. A description of the actual symptoms, exact error messages, log entries, etc., would help. Strange behaviour doesn't give anyone much to go on. Sorry, Im still grappling with the new Tomcat. There are no error messages and the servlet doesn't fail. However, the servlet puts state information into a hashmap that is stored in the session object. I am getting occassional strange behaviour that is consistant with the hashmap getting out of sync with the application. The same servlet works fine under Tomcat 4.1.31, which was I was wondering if/how session handling had changed dramatically. And yes, a lot changed between 4.1.31 and 5.5.20. The changelog is very detailed - and long. I know :) I've started wading through it, but I'm under time pressure to get the migration completed. I was hoping someone could short-circuit the effort and provide that Ah-ha moment. Regards Roger ___ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. ___ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange behaviour after upgrade to 5.5.20
Hi Roger, just a shot from the hip: Maybe you want to overwrite the method public int hashcode() for the objects being put into the hashmap - you should not rely on the default implementation of java.lang.Object.hashcode(). Besides, HashMap is not thread-safe, have you tried it with a thread-safe implementaion (i.e. Map m = Collections.synchronizedMap(new HashMap(...));) HTH Greg -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: from https to http?
Chris, Chuck: Thanks a lot by the explanation. Looks like Tomcat (or maybe the Servlet specification?) needs a mechanism to switch from https to http when this access is declared by a security-constrains otherwise is forcing programmers to always use programatic security to made this switch; anyway we get paid to do this stuff ;-) May be a workarround is to use the rewrite filter located at http://tuckey.org/urlrewrite/ Somebody is using it? is reliable? Cheers! - Pablo On 1/3/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: John Doe [mailto:[EMAIL PROTECTED] Subject: from https to http? _but_ when I want to go from restricted.jsp back to index.jsp using the anchor defined in it the URL is not replace by the standard http URL and then gets stuck with a https://localhost:8443/testSSL/index.jsp; To expand a bit on what Chris said: Look at the form of the link in restricted.jsp: a href=../index.jspBack to index/a It's a relative link, so the browser (not Tomcat) resolves it based on the URL of the current page. The same happened when you went from index.jsp to ssl/restricted.jsp, except Tomcat recognized that ssl was controlled with a security-constraint, so it generated a redirect back to the browser with the http protocol and port replaced by https and the redirect port; the browser then made the actual https request. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: from https to http?
Hi Joe, Have a look at the Acegi Security [1] stuff if your using spring. This will allow you to configure what paths require https and redirect the incomming requests if they are not https. There is a catalina project too [2] but im not to sure what that does, but you never know it might be of help. Regards Ben [1] http://acegisecurity.org/docbook/acegi.html#channel-security [2] http://acegisecurity.org/multiproject/acegi-security-catalina/downloads.html On 1/4/07, John Doe [EMAIL PROTECTED] wrote: Chris, Chuck: Thanks a lot by the explanation. Looks like Tomcat (or maybe the Servlet specification?) needs a mechanism to switch from https to http when this access is declared by a security-constrains otherwise is forcing programmers to always use programatic security to made this switch; anyway we get paid to do this stuff ;-) May be a workarround is to use the rewrite filter located at http://tuckey.org/urlrewrite/ Somebody is using it? is reliable? Cheers! - Pablo On 1/3/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: John Doe [mailto:[EMAIL PROTECTED] Subject: from https to http? _but_ when I want to go from restricted.jsp back to index.jsp using the anchor defined in it the URL is not replace by the standard http URL and then gets stuck with a https://localhost:8443/testSSL/index.jsp; To expand a bit on what Chris said: Look at the form of the link in restricted.jsp: a href=../index.jspBack to index/a It's a relative link, so the browser (not Tomcat) resolves it based on the URL of the current page. The same happened when you went from index.jsp to ssl/restricted.jsp, except Tomcat recognized that ssl was controlled with a security-constraint, so it generated a redirect back to the browser with the http protocol and port replaced by https and the redirect port; the browser then made the actual https request. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: installing the admin on 5.5
I ran Tomcat using the .bat and I experience the same issue. Yes, it is the version that I believe it to be as the version number is reported in the manager console and I'm not running a distro of Eclipse that bundles any server. Fran Caldarale, Charles R wrote: From: Fran Varin [mailto:[EMAIL PROTECTED] Subject: RE: installing the admin on 5.5 Hi, thanks for responding...I'll address your questions based on my original step numbers: The one you didn't answer is this: What happens if you start Tomcat from a command prompt with bin\startup.bat, rather than indirectly, via Eclipse? Are you sure you're running the Tomcat you think you are, versus one that might be bundled with Eclipse? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/installing-the-admin-on-5.5-tf2542730.html#a8158859 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL rewriting For Session Tracking
Or if you use the JSP standard tag lib (JSTL) you can do: c:url value= second.jspsecond page/c:url -- Len On 1/4/07, Bill Barker [EMAIL PROTECTED] wrote: Usually you would use a tag lib for this sort of thing. With struts, it would look something like: html:a href=second.jspsecond page /html:a [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Your reply answered another question that I had. But I think I still haven't described my current question clearly. suppose I have 3 JSP pages in my application. -- first.jsp second.jsp third.jsp -- Now, in my first.jsp, I have nothing but 2 links to the other two JSP pages. If I want the session to be maintain when use clicks on the links to go to the other pages, then can first.jsp be the following: -- a href=second.jspsecond page/a a href=third.jspthird page/a -- Or, the code in first.jsp must be the following: -- a href='%=response.encodeURL(second.jsp)%'second page/a a href='%=response.encodeURL(second.jsp)'%second page/a Note: If I use the first syntax, then unless Tomcat or some patch or filter parse the code and add the jsessionid to the link automatically, then the user will be losing the session when to goes from first.jsp to the other ones. And that's my question; can I use the first syntax. Or there is no way but to use the second syntax if I want the session to be kept. Thanks, Kasra - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, January 03, 2007 9:56 PM Subject: RE: URL rewriting For Session Tracking From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: Re: URL rewriting For Session Tracking Basically I have a webapp and I want to have a session for each user that connects to my server (just the usual servlet session that is created with jsessionid). Do I have to wrap every link that I have in my webapp with an Httpservletresponse.encodeURL()? No. As I recall, Tomcat will not create a session automatically unless it's absolutely necessary (e.g., tracking authenticated users) or the application requests it. I'm not aware of any config parameter that will force creation of sessions for all clients, but all you should have to do is put the following somewhere in the request processing path of each servlet: request.getSession(true); This doesn't need to go into your servlet or JSP code - you can write a simple filter class that does nothing but run the above code to force the creation of a session if one doesn't already exist. The filter mapping can go into conf/web.xml so it will apply to all apps deployed within your Tomcat instance, or in each appropriate webapp's web.xml file. Note that per the servlet spec, Tomcat will use cookies not URL rewriting for session tracking; it will fall back to URL rewriting if the client refuses cookies. You can also disable use of cookies by setting cookies=false in your Context elements (or the global conf/context.xml file). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Strange behaviour after upgrade to 5.5.20
Besides, HashMap is not thread-safe, have you tried it with a thread-safe implementaion (i.e. Map m = Collections.synchronizedMap(new HashMap(...));) Yep, that fixed it. Interestingly, the original servlet using the hashmap continues to work fine with Tomcat 4.1.31. I can only surmise that at one time, multiple accesses by the same client/session were serialised, either by Tomcat or by IIS. Anyone know? Thanks for everyomes help. Regards Roger ___ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. ___ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange behaviour after upgrade to 5.5.20
Well, haven't looked at the code of either version (4.x, 5.x), however, I figured that 5.x makes a bit more use of Java's threading-features. Besides, unsynchronized hashmaps are a #1-candidate for errors that are either strange, not reproducible and in cases where you think you should file a bug-report ;) Cheers Greg -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: from https to http?
Hi Ben, Unfortunately I not using any framework in the webapplication, just raw java scriplets and html (is a small webapp). Anyway thanks a lot by the links. Cheers! - Pablo On 1/4/07, ben short [EMAIL PROTECTED] wrote: Hi Joe, Have a look at the Acegi Security [1] stuff if your using spring. This will allow you to configure what paths require https and redirect the incomming requests if they are not https. There is a catalina project too [2] but im not to sure what that does, but you never know it might be of help. Regards Ben [1] http://acegisecurity.org/docbook/acegi.html#channel-security [2] http://acegisecurity.org/multiproject/acegi-security-catalina/downloads.html On 1/4/07, John Doe [EMAIL PROTECTED] wrote: Chris, Chuck: Thanks a lot by the explanation. Looks like Tomcat (or maybe the Servlet specification?) needs a mechanism to switch from https to http when this access is declared by a security-constrains otherwise is forcing programmers to always use programatic security to made this switch; anyway we get paid to do this stuff ;-) May be a workarround is to use the rewrite filter located at http://tuckey.org/urlrewrite/ Somebody is using it? is reliable? Cheers! - Pablo On 1/3/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: John Doe [mailto:[EMAIL PROTECTED] Subject: from https to http? _but_ when I want to go from restricted.jsp back to index.jsp using the anchor defined in it the URL is not replace by the standard http URL and then gets stuck with a https://localhost:8443/testSSL/index.jsp; To expand a bit on what Chris said: Look at the form of the link in restricted.jsp: a href=../index.jspBack to index/a It's a relative link, so the browser (not Tomcat) resolves it based on the URL of the current page. The same happened when you went from index.jsp to ssl/restricted.jsp, except Tomcat recognized that ssl was controlled with a security-constraint, so it generated a redirect back to the browser with the http protocol and port replaced by https and the redirect port; the browser then made the actual https request. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL rewriting For Session Tracking
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: Re: URL rewriting For Session Tracking Do I have to wrap every link that I have in my webapp with an Httpservletresponse.encodeURL()? No. As I recall, Tomcat will not create a session automatically unless it's absolutely necessary (e.g., tracking authenticated users) or the application requests it. I think you are misinterpreting the OP's question... I think he wants to /force/ the use of URL rewriting to include the jsessionid. In that case, he /must/ run all his links through HttpServletResponse.encodeURL. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFnQLt9CaO5/Lv0PARAvMmAJ97y7GDRY3fY9XsAH9GCKL9lGz86QCfS1CA k7lL+g3W3pq7tQGGlCzEYIk= =Tiss -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL rewriting For Session Tracking
[EMAIL PROTECTED] wrote: All I want to do is 'URL rewriting For Session Tracking'. Do I have to do this manually in my code (using response.encodeURL), or is there an automatic way of doing this in Tomcat (such as using a filter or value) that would handle this for me? Add cookies=false to context.xml of your application and use JSTL c:url, Struts html:link, etc depending on your application design. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html -- Mikolaj Rydzewski [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: from https to http?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pablo, John Doe wrote: Thanks a lot by the explanation. Looks like Tomcat (or maybe the Servlet specification?) needs a mechanism to switch from https to http when this access is declared by a security-constrains otherwise is forcing programmers to always use programmatic security to made this switch It isn't Tomcat's job to guess when you want to go back to http, it's yours. It isn't very difficult to build a complete URL (including protocol) for a link. I would imagine that you have very few places in your application where you need to: 1. Switch from HTTP to HTTPS and 2. Switch from HTTPS to HTTP I recommend that you treat those as special cases and hand-code them as appropriate. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFnQT89CaO5/Lv0PARAgrAAJ9mC1jWsr5rYmD7El+d6OGO3rIJzACeOiN2 D2fSjZ+YlIfUXzaXatPV0Kg= =mxZ3 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: from https to http?
Hi all I have one question regarding http and https: Lets say I open a pop up page from https, pop window will be opened in https mode as main window is opened in https and I have action in pop up where it leave https mode and enter in to http modeIf i want put value from pop window to main window it gives security violation java script error...How to resolve this.. Thanks Suresh On 1/4/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pablo, John Doe wrote: Thanks a lot by the explanation. Looks like Tomcat (or maybe the Servlet specification?) needs a mechanism to switch from https to http when this access is declared by a security-constrains otherwise is forcing programmers to always use programmatic security to made this switch It isn't Tomcat's job to guess when you want to go back to http, it's yours. It isn't very difficult to build a complete URL (including protocol) for a link. I would imagine that you have very few places in your application where you need to: 1. Switch from HTTP to HTTPS and 2. Switch from HTTPS to HTTP I recommend that you treat those as special cases and hand-code them as appropriate. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFnQT89CaO5/Lv0PARAgrAAJ9mC1jWsr5rYmD7El+d6OGO3rIJzACeOiN2 D2fSjZ+YlIfUXzaXatPV0Kg= =mxZ3 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Suresh Babu, Software Engineer, Computer Associates-India
Re: from https to http?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pablo, John Doe wrote: Of course that is not a Tomcat's job, but if exists a redirection from http to https I wonder why does not exists a reverse way in the declarative security mechanism provided by the servlet specification. Oh, I understand what you're saying. But I still disagree. The servlet spec offers a transport guarantee that a particular page will only be available via HTTPS (by setting the transport to CONFIDENTIAL, as you have done). This is an upgrade in service. There is no alternate transport guarantee that states that the request be made in cleartext, because that's not actually a guarantee. :) It looks like what you want is to forbid the use of HTTPS in a selection of URLs (probably because SSL handshakes are very heavy operations). If that's the case, you will really have to do this manually (or use some kind of outside filter; I am ignorant of any such filters or valves). But like you point, there are not so many places where a programmer must resolve this kind of situations. Yeah. It turns out that these situations are usually not that big of a deal to simply do the extra little bit of coding necessary. As others have pointed out, some JSP tag libraries are useful for detecting the correct protocol to use, as well as forcing a switch from HTTPS to HTTP. I'm sure similar tools exist for other presentation strategies. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFnQq09CaO5/Lv0PARAgPbAJ983CQEX6GV0x83qXQRX2bBM/BdxgCgmqar EgFHmYVRjvRHmR+CrJmCt+Q= =Mb+c -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: J2EE option missing in Eclipse environment for Servlet.
Thanks its working On 1/4/07, Kristian Rink [EMAIL PROTECTED] wrote: athula bogoda schrieb: I install eclipse 3.2 with Tomcat 5.0 to run servlets under J2EE. [...] But in Open Perspective J2EE option is not available. Also Dinamic web Project option also not available. What's the wrong on it. Did you try to run eclipse -clean after installing the plugins? Did you recieve any error messages while goin' through the installation procedure? Cheers best, Kristian PS: As this appears to be a tomcat mailing list and this issue is inherently an Eclise one, the eclise newsgroups probably would be a better place to get helpful answers. ;) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mir Kasim Ali Software Consultant WOIL-GTEC,Pune Desk No ..:: 020-66056181 Mobile No..::+919423424146
RE: URL rewriting For Session Tracking
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: URL rewriting For Session Tracking I think you are misinterpreting the OP's question... I think he wants to /force/ the use of URL rewriting to include the jsessionid. In that case, he /must/ run all his links through HttpServletResponse.encodeURL. So setting cookies=false in the Context element isn't sufficient? (Assuming a session has been created via request.getSession(true), of course.) I haven't tried it, but that's the implication I got from reading the doc. What does cookies=false actually do, then? To step back a little: why would it be important to use URL encoding to track sessions rather than do it with cookies? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL rewriting For Session Tracking
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: So setting cookies=false in the Context element isn't sufficient? That just tells Tomcat not to use cookies to send session identification to the browser. Yes, the alternative to cookies is the use of URL rewriting to put the jsessionid into the URL, but that actually has to be done somewhere. To step back a little: why would it be important to use URL encoding to track sessions rather than do it with cookies? Maybe they have a no cookies requirement or something like that. I personally write all my apps so that the widest audience can use them. Cookies are not requires in any of the apps I have written in the last few years. In order to achieve that, one must encode every URL that gets put into a web page. Some JSP taglibs provide this capability so you don't have to worry about it. But, that means that every URL you emit must go through one of those tags. I mostly use Velocity (not JSP) and there are niceties in the Velocity-Tools package (that work with Struts, which is a bonus) that do the same thing. It all comes down to the same thing: you must run your URLs through HttpServletResponse.encodeURL if you want to use URL rewriting at all. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFnRnI9CaO5/Lv0PARAtfpAJ4qW0hrjvzbXhRGg3CrF3tsMUmuLQCbBz05 5bu0ZELNsuHss9CoJQDnaJ8= =2D9m -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat clustering broken - Unable to send message through cluster sender
In TC 5.x.x message senders are removed when a multicast heartbeat is missed. so if your sender is null, then most likely your multicasting has a few hickups. in TC6 there is a safeguard against multicast failures using the TCP failure detector. Filip Spurlock, Robert J wrote: All, We've had Tomcat clustering working in test and production for months. We run on HP UX 11.11. We recently upgraded the OS and I think Tomcat clustering quit working at that point. I'm not sure of the OS connection but the session data is not being replicated throughout the cluster. We are running Tomcat 5.0.28. Apparently clustering is failing at ReplicationTransmitter.sendMessageData() on a null sender. My question is what are the likely causes of the sender not being available? Is there a way to pickup additional logging that might indicate why the sender is not available? Are there any known Tomcat clustering bugs or problems related to HP UX 11.11 versions? How should I debug this problem? Some things I've tried: 1. Completely rebuilt the Tomcat environment in test and still got the same SEVERE error. 2. Changed all the multicast port and TCP port stuff and it still did not work. 3. Switched from using the org.apache.catalina.cluster.session.SimpleTcpReplicationManager to org.apache.catalina.cluster.session.DeltaManager but that didn't help either. Thanks, Jack Reference problem: Dec 16, 2006 12:52:22 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster send SEVERE: Unable to send message through cluster sender. java.io.IOException: Sender not available. Make sure sender information is available to the ReplicationTransmitter. at org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessageData(R eplicationTransmitter.java:112) at org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessage(Repli cationTransmitter.java:136) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.j ava:457) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR eceived(SimpleTcpReplicationManager.java:539) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD ataReceived(SimpleTcpReplicationManager.java:593) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim pleTcpCluster.java:576) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70 ) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:129) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:67) Dec 16, 2006 12:54:11 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.54.4.16:40 09,192.54.4.16,4009, alive=135220] Here's the Tomcat 5.0.28 code from ReplicationTransmitter.java - sendMessageData - line 112 = if ( sender == null ) throw protected void sendMessageData(String sessionId, byte[] data, IDataSender sender) throws java.io.IOException { if ( sender == null ) throw new java.io.IOException(Sender not available. Make sure sender information is available to the ReplicationTransmitter.); try { if (!sender.isConnected()) sender.connect(); sender.sendMessage(sessionId,data); sender.setSuspect(false); addStats(data.length); }catch ( Exception x) { if ( !sender.getSuspect() ) { log.warn(Unable to send replicated message, is server down?, x); } sender.setSuspect(true); } Here's the Tomcat 5.0.28 code from ReplicationTransmitter.java - sendMessageData - line 136 = sendMessageData() public void sendMessage(String sessionId, byte[] indata, Member member) throws java.io.IOException { byte[] data = XByteBuffer.createDataPackage(indata); String key = member.getHost()+:+member.getPort(); IDataSender sender = (IDataSender)map.get(key); sender is apparently null at this point sendMessageData(sessionId,data,sender); } Also get an error like the following when the second server in the cluster is starting: 2006-12-17 11:18:26,259 ERROR (DeltaManager.java:663) - Manager[/toolbox/tasks], No session state received, timing out. Example cluster configuration from server.xml Using SimpleTcpReplicationManager in production Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.SimpleTcpReplicati onManager expireSessionsOnShutdown=false name=clusterProd useDirtyFlag=false Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.5 mcastPort=45565 mcastFrequency=500
Re: URL rewriting For Session Tracking
En l'instant précis du 01/04/07 16:04, Caldarale, Charles R s'exprimait dans toute sa noblesse: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: URL rewriting For Session Tracking I think you are misinterpreting the OP's question... I think he wants to /force/ the use of URL rewriting to include the jsessionid. In that case, he /must/ run all his links through HttpServletResponse.encodeURL. So setting cookies=false in the Context element isn't sufficient? no, setting cookies=false just disable session tracking using cookies. Proper link to your webapplication should travel inside encodeUrl() at some point before rendering it to outputstream. Most tag that output urls are doing it internally (struts:link/, c:url/ amongst other are doing it) (Assuming a session has been created via request.getSession(true), of course.) I haven't tried it, but that's the implication I got from reading the doc. Strange, reading the doc i see this Set to false if you want to disable the use of cookies for session identifier communication, and rely only on URL rewriting by the application. . That is clear, if you set to false, you must use url rewriting in your application to track session identifier. Setting cookies to false won't magically parse all your pages to add session identifier. (See J2EE specifications for details) What does cookies=false actually do, then? It disables use of cookies for session tracking To step back a little: why would it be important to use URL encoding to track sessions rather than do it with cookies? Because 1) not everyone has cookies enabled in their browser 2) in some cases it can be useful to have 2 sessions in same browser (something you can't do with cookies) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL rewriting For Session Tracking
David Delbecq wrote: 2) in some cases it can be useful to have 2 sessions in same browser (something you can't do with cookies) Hello David, I've never thought about that; it looks interesting. Do you have a real use case for that? Thank you in advance. _F_M - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6.0 vs Tomcat 5.5 Clustering Changes
Mainly its been refactored, farming as in 5.5 is still pretty broken and hasn't been worked on. What has been worked on is the separation of session replication vs cluster/group communication. These are two separate packages now o.a.catalina.tribes (group com, simple overview at http://people.apache.org/~fhanik/tribes/docs/introduction.html) o.a.catalina.ha (data replication) The cluster config has been documented in the reference, in 5.x it wasn't. Some new features added (but not limited to) 1. primary/backup replication using shadow maps 2. context attribute replication 3. Ability to use per context managers when clustering contexts, ie, one can use a BackupManager and the other a DeltaManager and so on, to get the documentation up to date is still on the todo list Filip Troy Davidson wrote: I am trying to find a list of the differences between Tomcat 6.0 and Tomcat 5.5 clustering and farming. Does anyone have a list like this or where to find the information. Thanks. ++ Troy Davidson - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL rewriting For Session Tracking
From: fausto mancini [mailto:[EMAIL PROTECTED] 2) in some cases it can be useful to have 2 sessions in same browser (something you can't do with cookies) Hello David, I've never thought about that; it looks interesting. Do you have a real use case for that? Here's one: Principle of least privilege. I regularly have a normal (user) session on a Web application open. Sometimes I want to perform administrative actions on that same webapp, and at that point it's useful to be able to create a short-lived second admin session without closing my user session. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL rewriting For Session Tracking
From: David Delbecq [mailto:[EMAIL PROTECTED] Subject: Re: URL rewriting For Session Tracking Many thanks to Chris and David for the enlightenment. Another question: How would one handle links embedded in static content? Is it simply a matter of don't do that? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL rewriting For Session Tracking
Caldarale, Charles R wrote: To step back a little: why would it be important to use URL encoding to track sessions rather than do it with cookies? Some log analyzers use such information to generate user profiles, etc. -- Mikolaj Rydzewski [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: URL rewriting For Session Tracking
En l'instant précis du 01/04/07 16:32, fausto mancini s'exprimait dans toute sa noblesse: David Delbecq wrote: 2) in some cases it can be useful to have 2 sessions in same browser (something you can't do with cookies) Hello David, I've never thought about that; it looks interesting. Do you have a real use case for that? Thank you in advance. _F_M - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Several 1) you need to debug a concurrency problem with 2 users in your webapp. It's easier to reproduce it if you can log in as 2 different users at the same time (just disable cookies on browser and done) 2) A site admin want to have on the site the 'look of the site as anonymous' without having to logout/log in 3) You want to check how webapp behave when one user has 2 sessions (active on 2 different terminals for example) Of course, first is anyway incompatible with http based authentification, can only work on form based authentification (because browser caches the user/pass) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL rewriting For Session Tracking
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: David Delbecq [mailto:[EMAIL PROTECTED] Subject: Re: URL rewriting For Session Tracking Many thanks to Chris and David for the enlightenment. Another question: How would one handle links embedded in static content? Is it simply a matter of don't do that? Yeah, it's basically a don't do that kind of situation. If cookies aren't being used for whatever reason, static content will certainly trip you up. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFnSLf9CaO5/Lv0PARAo9FAKC4S46+6J6YKCLVBkDYnlpF9E+ovQCdE6bN WHOKs9dEHz8SYOgBe21I6aE= =C972 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Moving Tomcat
I want to thank everyone for the insightful information yesterday on my query about moving Tomcat. I have not moved anything at this time but I have made a copy onto CD of everything that resides on the /usr/local/src directory. This does include the jakarta-tomcat-5.5.9 directory and all of its content. Again, as far as I can determine everything associated with our website does reside in this directory. Martin, there is a lib and a classes directory in the /shared directory but there are no files in those directories. However, there are lib and classes directories with files in the /usr/local/src/jakarta-tomcat-5.5.9/common directory. I have read through the link you provided below. There are a few .jar files that reside in the folder that the howto article does not discuss. Here is a list of the .jar files in /usr/local/src/jakarta-tomcat-5.5.9/common/lib: Commons-el.jar Jasper-compiler.jar Jasper-compiler-jdt.jar Jasper-runtime.jar Jsp-api.jar Naming-factory.jar Naming-factory-dbcp.jar Naming-resources.jar Servlet-api.jar There is one file in /usr/local/src/jakarta-tomcat-5.5.9/common/classes/: Logging.properties Here are the files in /usr/local/src/jakarta-tomcat-5.5.9/server/lib/: Catalina.jar Catalina-ant.jar Catalina-cluster.jar Catalina-optional.jar Commons-modeler.jar Servlets-cgi.renametojar Servlets-default.jar Servlets-invoker.jar Servlets-ssi.renametojar Servlets-webdav.jar Tomcat-ajp.jar Tomcat-coyote.jar Tomcat-http.jar Tomcat-util.jar There are no files in the /usr/local/src/jakarta-tomcat-5.5.9/server/classes directory. I do not see a .war file in the /usr/local/src/jakarta-tomcat-5.5.9/webapps directory or any other directories. I do believe that all the web site content does reside in the webapps/online directory. There are several files and folders in the online directory. I have not seen anything that indicates the content resides anywhere else. If it is not obvious that there would be any files outside of the /usr/local/src directory except the JDK which I see resides at /usr/java/jdk1.5.0 can I then assume everything needed is going to be found in the /usr/local/src/ directory under the various appropriate directories? Other questions, could I download tomcat and java fresh onto the new server that I am moving the web site onto? If I download updated versions of these programs would the web site function normally if I just copy the content files from /webapps/online on the old server into the same directories on the new server? Or, would I have some additional configuring to do? Thanks, Steve I'm glad to hear that Steve! to recap-- Get same version JVM installed on new tomcat Get same version Tomcat installed (with manager and admin working) on new Tomcat copy over jars from $CATALINA_BASE/shared/lib/*.* copy over class files from $CATALINA_BASE/shared/classes/*.* if you see extra jars or class files located in either $CATALINA_HOME/common/lib or $CATALINA_HOME/common/classes read this http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html once you feel you grasp the implications of what jars should be located in the common folder then copy jars and classes only on a as-needed basis All of your webapps live in a self contained package called WebAppName.war (confirm by viewing folders located at $CATALINA_BASE/webapps and all war files located at $CATALINA_BASE/webapps/*.war) you should use the manager of the new server to open each war file and carefully note any error messages at top of manager screen If the top of the manager screen displays errors then view the tail end of the log file located at $CATALINA_BASE/logs/HostName.-MM-DD.log As always we are here to help HTH M- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: EDMOND KEMOKAI [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, January 03, 2007 1:52 PM Subject: Re: Moving Tomcat If you have the second server setup then you can install tomcat and copy the webapps folder over and see what happens. Once you start
Re: Applets not loading after upgrade
The appBase is webapps, and the doc base is cdo. Mark Thomas-11 wrote: may.brian wrote: This seems to indicate a problem with the classpath, but there have been no changes to the directory structure or the html generated. What are the appBase and docBase settings for this host / app? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Applets-not-loading-after-upgrade-tf2894640.html#a8161522 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL rewriting For Session Tracking
From: David Delbecq [mailto:[EMAIL PROTECTED] Of course, first is anyway incompatible with http based authentification, can only work on form based authentification (because browser caches the user/pass) Not true - if the app uses in-memory session cookies (true for ASP, ASP.Net and JSP) you just need two browser processes. I regularly start two instances of Internet Exploder... sorry, Explorer... to allow me to have multiple sessions to the same application. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL rewriting For Session Tracking
En l'instant précis du 01/04/07 16:37, Caldarale, Charles R s'exprimait dans toute sa noblesse: From: David Delbecq [mailto:[EMAIL PROTECTED] Subject: Re: URL rewriting For Session Tracking Many thanks to Chris and David for the enlightenment. Another question: How would one handle links embedded in static content? Is it simply a matter of don't do that? Yes and no :) Don't do that if you intend to use default static resource serving (the servlet you don't see and that tomcat maps to your static ressources) But there are ways around it 1) as suggested earlier in this thread, create a filter that will try to locate your links and rewrite them (quite tricky) 2) creates a servlet that maps to *.xhtml and does the parsing (less tricky as none of the urls inside static ressources are already encoded) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: installing the admin on 5.5
From: Fran Varin [mailto:[EMAIL PROTECTED] Subject: RE: installing the admin on 5.5 I ran Tomcat using the .bat and I experience the same issue. O.k., let's try the following: 1) Shut down any existing Tomcat instances. 2) If it exists, delete C:\apache-tomcat-5.5.20 and everything under it. 3) Download and install a fresh, clean copy of Tomcat using the .zip distribution into the default Tomcat directory - don't rename or move anything around. 4) Download and expand a fresh, clean copy of the admin.zip package into the default Tomcat directory structure. 5) Update C:\apache-tomcat-5.5.20\conf\tomcat-users.xml with a userid having an admin role. 6) From a command promptr, run the C:\apache-tomcat-5.5.20\bin\startup.bat script. 7) From a browser, try running the admin app: http://localhost:8080/admin If the above works, do a directory/file comparison between the clean install and your regular Tomcat one and see what the differences are. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Own logging formatter in webapps
Hello together, I'm a newbie using Java/Tomcat/JSF-MyFaces all together. Can somebody help me, I have problems with the logging mechanism. - I want to use the JDK logging mechanism in my webapp. - I want to use my own class uxspiweb.log.DebugFormatter for the ConsoleHandler channel. - I put the following content in UXSPI-WEB/WEB-INF/classes/logging.properties - handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler org.apache.juli.FileHandler.level = FINE org.apache.juli.FileHandler.directory = ${catalina.base}/logs org.apache.juli.FileHandler.prefix = UXSPIWEB. java.util.logging.ConsoleHandler.level = FINEST # Want to use OWN Formatter java.util.logging.ConsoleHandler.formatter = uxspiweb.log.DebugFormatter - - DebugFormatter is available in webapps/UXSPI-WEB/WEB-INF/classes/uxspiweb/log/DebugFormatter.class - The class uxspiweb.log.DebugFormatter is working well with standalone applications. - In the webapp (JSF) I'm use the following class - managed-bean managed-bean-nametreeCtrl/managed-bean-name managed-bean-class uxspiweb.TreeController /managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean - - In the uxspi.TreeController I'm using the following code snippet: - package uxspi; import ; static private Logger logger = Logger.getLogger(TreeController.class.getName()); public TreeController () { logger.info (Program started); logger.info (Log: + logger.getClass()); - - The class DebugFormatter is NOT used/found/applied/accessable? - Other classes from the webapps don't have any problem. - BUT I belief, that the UXSPI-WEB/WEB-INF/classes/logging.properties is evaluated, because the following entry org.apache.juli.FileHandler.prefix = UXSPIWEB. is active. If I modify this entry, another logfile is created. - I also have tried things like this: (in the class TreeController) - static { String logConfig = ./webapps/UXSPI-WEB/WEB-INF/classes/logging.properties; // String logConfig = WEB-INF/classes/logging.properties; System.setProperty(java.util.logging.config.file, logConfig); System.out.println(ConfigFile: + System.getProperty(java.util.logging.config.file)); System.out.println( System.getProperties().toString().replace( ',', '\n' ) .replace( '{', ' ' ) .replace( '}', ' ' ) ); -- in the log I see the property is set. - - I don't have found any information/errors about DebugFormatter in the logs from tomcat. Any ideas? Uwe Environment: JDK 1.5.0_06-b05 Tomcat 5.5.16 Windows XP - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Moving Tomcat
From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: Moving Tomcat Here is a list of the .jar files in /usr/local/src/jakarta-tomcat-5.5.9/common/lib: The noted jars are all part of the standard Tomcat distribution. There is one file in /usr/local/src/jakarta-tomcat-5.5.9/common/classes/: Logging.properties The above is not part of the standard distribution (at least not the current one). It would be there to define a standard logging configuration for all of your webapps. You will need it in the new server installation. Here are the files in /usr/local/src/jakarta-tomcat-5.5.9/server/lib/: Again, these are all part of the standard distribution. There are no files in the /usr/local/src/jakarta-tomcat-5.5.9/server/classes directory. That's normal. That directory is typically used only to override a class in a server/lib jar with a patched version. can I then assume everything needed is going to be found in the /usr/local/src/ directory under the various appropriate directories? Assumptions are always suspect, but in this case the app environment seems to be relatively straightforward, so that's probably safe. Other questions, could I download tomcat and java fresh onto the new server that I am moving the web site onto? I would, but it does open up the potential for introducing incompatibilities that you may not have the experience to deal with handily. You could try it, test everything you can, and fall back to the older Tomcat and JRE versions if something breaks and it's not readily fixable. If I download updated versions of these programs would the web site function normally if I just copy the content files from /webapps/online on the old server into the same directories on the new server? Or, would I have some additional configuring to do? You would need to compare all the .xml files in the conf directory tree to look for differences and apply them when appropriate. Tomcat comes in a rather development-oriented configuration, and several properties should be changed in a production environment. This may or may not have been done on the current server. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Moving Tomcat
Thanks Chuck for the info. I appreciate your and everyone else's replies. I will be continuing on with resolving this problem and may have some other questions but you guys have answered a lot for me already. Thanks, Steve -- From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: Moving Tomcat Here is a list of the .jar files in /usr/local/src/jakarta-tomcat-5.5.9/common/lib: The noted jars are all part of the standard Tomcat distribution. There is one file in /usr/local/src/jakarta-tomcat-5.5.9/common/classes/: Logging.properties The above is not part of the standard distribution (at least not the current one). It would be there to define a standard logging configuration for all of your webapps. You will need it in the new server installation. Here are the files in /usr/local/src/jakarta-tomcat-5.5.9/server/lib/: Again, these are all part of the standard distribution. There are no files in the /usr/local/src/jakarta-tomcat-5.5.9/server/classes directory. That's normal. That directory is typically used only to override a class in a server/lib jar with a patched version. can I then assume everything needed is going to be found in the /usr/local/src/ directory under the various appropriate directories? Assumptions are always suspect, but in this case the app environment seems to be relatively straightforward, so that's probably safe. Other questions, could I download tomcat and java fresh onto the new server that I am moving the web site onto? I would, but it does open up the potential for introducing incompatibilities that you may not have the experience to deal with handily. You could try it, test everything you can, and fall back to the older Tomcat and JRE versions if something breaks and it's not readily fixable. If I download updated versions of these programs would the web site function normally if I just copy the content files from /webapps/online on the old server into the same directories on the new server? Or, would I have some additional configuring to do? You would need to compare all the .xml files in the conf directory tree to look for differences and apply them when appropriate. Tomcat comes in a rather development-oriented configuration, and several properties should be changed in a production environment. This may or may not have been done on the current server. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deploy from ant
Hi all, how do I deploy a webapp from the ant deploy task avoiding it to copy the entire application under tomcat/webapps? The point is to simply update my build directory with modified jsps to make tomcat aware of the changes. If this build directory, which of course is not under webapps, is first copied under webapps by the ant deploy task, then nothing is updated there each time I build the app, and instead I have to explicitly redeploy it. One solution that comes to my mind is to deploy an xml context descriptor instead of a exploded war directory. But anyway, from the documentation here: http://tomcat.apache.org/tomcat-6.0-doc/appdev/source.html http://tomcat.apache.org/tomcat-6.0-doc/appdev/processes.html I would infer that deploying my application by means of a target like target name=tomcat-deploy depends=init,build,init-ant description=Deploy application to servlet container tomcat-deploy url=${tomcat.manager.url} username=${tomcat.manager.username} password=${tomcat.manager.password} path=${tomcat.context.path} war=file://${project.build.path} / /target will in principle install the application into tomcat without copying it into webapps, which in practice it doesn't. The following excerpts from the above links seem to support my supposition: For interactive development and testing of your web application using Tomcat 5, the following additional targets are defined: * install - Tell the currently running Tomcat 5 to make the application you are developing immediately available for execution and testing. This action does not require Tomcat 5 to be restarted, but it is also not remembered after Tomcat is restarted the next time. (notice that the install target uses the deploy task, despite of its name) # Modify and rebuild as needed. As you discover that changes are required, make those changes in the original source files, not in the output build directory, and re-issue the ant compile command. This ensures that your changes will be available to be saved (via cvs commit) later on -- the output build directory is deleted and recreated as necessary. # Reload the application. Tomcat will recognize changes in JSP pages automatically, but it will continue to use the old versions of any servlet or JavaBean classes until the application is reloaded. You can trigger this by executing the ant reload command. Can you help me? I find this very confusing. Thank you in advance. Regards, Carlos - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to configure tomcat for Turkey?
(1) i want my JSP application to run with Turkey locale. how should i configure apache Tomcat 5.x for Turkey? (2) at present, i want to find out about an error message --- java.lang.NumberFormatException : For input string: 0,00 at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang.Float.parseFloat(Unknown Source) what is it? thx -- View this message in context: http://www.nabble.com/how-to-configure-tomcat-for-Turkey--tf2921907.html#a8167002 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Moving Tomcat
you can also install Tomcat from the .tar.gz (on apache's website), that creates a location independent layout for you Filip Steve Ingraham wrote: I have a website running with jakarta-tomcat-5.5.9. The server this website resides on is going to have to be rebuilt so I am needing to move everything off of it onto another server. I know very little about tomcat, ok, I really know nothing about tomcat. This website was created before I started managing this network so I was not involved in its construction. My question is this. I believe that all of the content for the webpage(s) reside in /usr/local/src/jakarta-tomcat-5.5.9/webapps. If I copy everything from /usr/local/src from the old server onto the new server will this capture everything needed for the website? Is there anything else I need to know about or that needs moved in order for the website to be accessible from the new server? Any information would be appreciated. Steve No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.3/614 - Release Date: 1/2/2007 2:58 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy from ant
Why not just drop in the new war file created from the ant war task? Tomcat will reload the app automatically. On a half-way fast pc it will last 10 seconds (depending on the size of the webapp of course, and the amount of work need to be done on undeploy/deploy) Leon target name=war depends=init,compile,complete.web war destfile=${output}/${webapp.name}.war webxml=${web.xml.file} fileset dir=${output.webapp}/ /war /target target name=deploy.web depends=war copy tofile=${servletcontainer.home}/webapps/${webapp.name}.war fileset file=${output}/${webapp.name}.war/ /copy /target and you are done. On 1/4/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, how do I deploy a webapp from the ant deploy task avoiding it to copy the entire application under tomcat/webapps? The point is to simply update my build directory with modified jsps to make tomcat aware of the changes. If this build directory, which of course is not under webapps, is first copied under webapps by the ant deploy task, then nothing is updated there each time I build the app, and instead I have to explicitly redeploy it. One solution that comes to my mind is to deploy an xml context descriptor instead of a exploded war directory. But anyway, from the documentation here: http://tomcat.apache.org/tomcat-6.0-doc/appdev/source.html http://tomcat.apache.org/tomcat-6.0-doc/appdev/processes.html I would infer that deploying my application by means of a target like target name=tomcat-deploy depends=init,build,init-ant description=Deploy application to servlet container tomcat-deploy url=${tomcat.manager.url} username=${tomcat.manager.username} password=${tomcat.manager.password} path=${tomcat.context.path} war=file://${project.build.path} / /target will in principle install the application into tomcat without copying it into webapps, which in practice it doesn't. The following excerpts from the above links seem to support my supposition: For interactive development and testing of your web application using Tomcat 5, the following additional targets are defined: * install - Tell the currently running Tomcat 5 to make the application you are developing immediately available for execution and testing. This action does not require Tomcat 5 to be restarted, but it is also not remembered after Tomcat is restarted the next time. (notice that the install target uses the deploy task, despite of its name) # Modify and rebuild as needed. As you discover that changes are required, make those changes in the original source files, not in the output build directory, and re-issue the ant compile command. This ensures that your changes will be available to be saved (via cvs commit) later on -- the output build directory is deleted and recreated as necessary. # Reload the application. Tomcat will recognize changes in JSP pages automatically, but it will continue to use the old versions of any servlet or JavaBean classes until the application is reloaded. You can trigger this by executing the ant reload command. Can you help me? I find this very confusing. Thank you in advance. Regards, Carlos - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to configure tomcat for Turkey?
Dharma General wrote: (2) at present, i want to find out about an error message --- java.lang.NumberFormatException: For input string: 0,00 at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang.Float.parseFloat(Unknown Source) what is it? thx Read the java api docs for java.lang.NumberFormatException and java.lang.Float. Specifically the following link should shed some light on the exception: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Float.html#valueOf(java.lang.String) There's also a link there to java.text.NumberFormat which should provide some methods for localized parsing of values. --David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy from ant
Why not just drop in the new war file created from the ant war task? Tomcat will reload the app automatically. Copy the entire app war, explode it, deploy it (and of course recompile the requested jsp), all that just to check, say, that a typo in the view was corrected or that some cell contents are now correctly aligned? On a half-way fast pc it will last 10 seconds (depending on the size of the webapp of course, That's just about what it last on my pc. It seems overkilling for checking tiny changes in jsps to me. Anyway, the documentation I referred from my previous post seems to suggest that the task is able to deploy the app without copying it (not to mention without waring it). Best regards, Carlos On 1/4/07, Leon Rosenberg [EMAIL PROTECTED] wrote: and the amount of work need to be done on undeploy/deploy) Leon target name=war depends=init,compile,complete.web war destfile=${output}/${webapp.name}.war webxml=${web.xml.file} fileset dir=${output.webapp}/ /war /target target name=deploy.web depends=war copy tofile=${servletcontainer.home}/webapps/${webapp.name}.war fileset file=${output}/${webapp.name}.war/ /copy /target and you are done. On 1/4/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, how do I deploy a webapp from the ant deploy task avoiding it to copy the entire application under tomcat/webapps? The point is to simply update my build directory with modified jsps to make tomcat aware of the changes. If this build directory, which of course is not under webapps, is first copied under webapps by the ant deploy task, then nothing is updated there each time I build the app, and instead I have to explicitly redeploy it. One solution that comes to my mind is to deploy an xml context descriptor instead of a exploded war directory. But anyway, from the documentation here: http://tomcat.apache.org/tomcat-6.0-doc/appdev/source.html http://tomcat.apache.org/tomcat-6.0-doc/appdev/processes.html I would infer that deploying my application by means of a target like target name=tomcat-deploy depends=init,build,init-ant description=Deploy application to servlet container tomcat-deploy url=${tomcat.manager.url} username=${tomcat.manager.username} password=${tomcat.manager.password} path=${tomcat.context.path} war=file://${project.build.path} / /target will in principle install the application into tomcat without copying it into webapps, which in practice it doesn't. The following excerpts from the above links seem to support my supposition: For interactive development and testing of your web application using Tomcat 5, the following additional targets are defined: * install - Tell the currently running Tomcat 5 to make the application you are developing immediately available for execution and testing. This action does not require Tomcat 5 to be restarted, but it is also not remembered after Tomcat is restarted the next time. (notice that the install target uses the deploy task, despite of its name) # Modify and rebuild as needed. As you discover that changes are required, make those changes in the original source files, not in the output build directory, and re-issue the ant compile command. This ensures that your changes will be available to be saved (via cvs commit) later on -- the output build directory is deleted and recreated as necessary. # Reload the application. Tomcat will recognize changes in JSP pages automatically, but it will continue to use the old versions of any servlet or JavaBean classes until the application is reloaded. You can trigger this by executing the ant reload command. Can you help me? I find this very confusing. Thank you in advance. Regards, Carlos - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy from ant
On 1/4/07, Carlos Pita [EMAIL PROTECTED] wrote: Copy the entire app war, explode it, deploy it (and of course recompile the requested jsp), all that just to check, say, that a typo in the view was corrected or that some cell contents are now correctly aligned? It seems overkilling for checking tiny changes in jsps to me. Amen to that :-) So why not just use the deployment directory as the development directory? Edit your JSP, click browser's reload, done. YMMV, of course :-) -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy from ant
target name=copy_jsps copy todir=${output.webapp} fileset dir=${web.dir} include name=**/*/ /fileset fileset dir=${src.dir} include name=**/*.vm/ include name=**/*.jsp/ /fileset /copy /target and copy_jsps 1 second and you are done, and don't have to change your project structure, neither your deployment. On 1/4/07, Carlos Pita [EMAIL PROTECTED] wrote: Why not just drop in the new war file created from the ant war task? Tomcat will reload the app automatically. Copy the entire app war, explode it, deploy it (and of course recompile the requested jsp), all that just to check, say, that a typo in the view was corrected or that some cell contents are now correctly aligned? On a half-way fast pc it will last 10 seconds (depending on the size of the webapp of course, That's just about what it last on my pc. It seems overkilling for checking tiny changes in jsps to me. Anyway, the documentation I referred from my previous post seems to suggest that the task is able to deploy the app without copying it (not to mention without waring it). Best regards, Carlos On 1/4/07, Leon Rosenberg [EMAIL PROTECTED] wrote: and the amount of work need to be done on undeploy/deploy) Leon target name=war depends=init,compile,complete.web war destfile=${output}/${webapp.name}.war webxml=${web.xml.file} fileset dir=${output.webapp}/ /war /target target name=deploy.web depends=war copy tofile=${servletcontainer.home}/webapps/${webapp.name}.war fileset file=${output}/${webapp.name}.war/ /copy /target and you are done. On 1/4/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, how do I deploy a webapp from the ant deploy task avoiding it to copy the entire application under tomcat/webapps? The point is to simply update my build directory with modified jsps to make tomcat aware of the changes. If this build directory, which of course is not under webapps, is first copied under webapps by the ant deploy task, then nothing is updated there each time I build the app, and instead I have to explicitly redeploy it. One solution that comes to my mind is to deploy an xml context descriptor instead of a exploded war directory. But anyway, from the documentation here: http://tomcat.apache.org/tomcat-6.0-doc/appdev/source.html http://tomcat.apache.org/tomcat-6.0-doc/appdev/processes.html I would infer that deploying my application by means of a target like target name=tomcat-deploy depends=init,build,init-ant description=Deploy application to servlet container tomcat-deploy url=${tomcat.manager.url} username=${tomcat.manager.username} password=${tomcat.manager.password} path=${tomcat.context.path} war=file://${project.build.path} / /target will in principle install the application into tomcat without copying it into webapps, which in practice it doesn't. The following excerpts from the above links seem to support my supposition: For interactive development and testing of your web application using Tomcat 5, the following additional targets are defined: * install - Tell the currently running Tomcat 5 to make the application you are developing immediately available for execution and testing. This action does not require Tomcat 5 to be restarted, but it is also not remembered after Tomcat is restarted the next time. (notice that the install target uses the deploy task, despite of its name) # Modify and rebuild as needed. As you discover that changes are required, make those changes in the original source files, not in the output build directory, and re-issue the ant compile command. This ensures that your changes will be available to be saved (via cvs commit) later on -- the output build directory is deleted and recreated as necessary. # Reload the application. Tomcat will recognize changes in JSP pages automatically, but it will continue to use the old versions of any servlet or JavaBean classes until the application is reloaded. You can trigger this by executing the ant reload command. Can you help me? I find this very confusing. Thank you in advance. Regards, Carlos - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED]
Re: Tomcat cache problem?
Hello, We tried reloading the website in the managers section and we were still able to duplicate the issue without restarting Tomcat. So do we think this is an issue with the webpage itself? david.delbecq wrote: To make it short, tomcat does no caching of servlet / jsp output. Your webapp is at fault All tomcat does is handle the 'if-modified-since' header when serving static data (what is not served by a servlet or a jsp, mainly pictures, static html, css). The fact it goes back well when you restart tomcat points out it's a problem with you specific web application. As you have no knowledge of what is inside this web application, i suggest you check with the vendor and or developpers of that specific web application. If you want confirmation, just restart your webapplication without restarting tomcat (use the manager or lambda probe for that) reference: tomcat manager http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html lambda probe http://www.lambdaprobe.org markx3 a écrit : Hello, I have a server running Windows 2003 server SP1. 8 GB of RAM. Sun Java J2SE 5.0 update 7 and Tomcat 5.5.20. Tomcat is used as our web server to review archived email. The email is stored in folders on the server and the archival system uses MS SQL 2000 SP4 on the backend. The problem is when we use Tomcat as our web server to review the email, and we click on several emails, after awhile regardless of the different email we click on, we get the same data displayed in our web browser. This really appears to be a caching issue with Tomcat, because every time we restart the tomcat service, the problem goes away for a few days and then it happens again. To try to fix the issue we gave Tomcat more memory in the Tomcat Properties / Java tab. We set initial memory pool to 128 MB of RAM and maximum memory pool to 512 MB of RAM. We also tried setting the IE 6.0 and 7.0 browsers to check for newer versions of the page every time I visit the webpage. Both of these attempts didn’t resolve the issue. Since I’m not a web developer I don’t know what to tell you about the website tomcat is hosting. Except for that it was a .war file that tomcat extracts once we place in into the tomcat5.5\webapps directory. If you need specifics on what this website is, please let me know and I can get that info for you. But looking through it there are all the usual files like .jsp, .htm, etc. Also there isn’t a proxy server on the network. When users connect to the website tomcat is hosting, the browser on the local machine is making a direct connection since it’s on the same subnet. Please let me know what suggestions we can use to try to resolve this issue. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-cache-problem--tf2909995.html#a8168104 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy from ant
Amen to that :-) So why not just use the deployment directory as the development directory? Edit your JSP, click browser's reload, done. Yes, of course I thought of that, and also of just deploying the xml context descriptor with the docBase pointing to my build directory, just in case I preferred to keep it outside tomcat/webapps. But I'm asking about the way to deploy the app via the deploy ant task because it seems to be the recommended practice (according to http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html). So I'm not sure if that document is wrong regarding this task, or if it's outdated, or if I'm misunderstanding it (I mean, perhaps it doesn't really imply that the app won't be copied to webapps, but then how do you explain this affirmations?: # This action (depploy) does not require Tomcat 5 to be restarted, but it is also not remembered after Tomcat is restarted the next time. # Tomcat will recognize changes in JSP pages automatically (after just building the app, which copies modified jsps to the build directory) ). Best regards, Carlos On 1/4/07, Hassan Schroeder [EMAIL PROTECTED] wrote: On 1/4/07, Carlos Pita [EMAIL PROTECTED] wrote: Copy the entire app war, explode it, deploy it (and of course recompile the requested jsp), all that just to check, say, that a typo in the view was corrected or that some cell contents are now correctly aligned? It seems overkilling for checking tiny changes in jsps to me. YMMV, of course :-) -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy from ant
Thank you for your prompt answer, really, but please notice the original question was: how do I deploy a webapp ***from the ant deploy task*** avoiding it to copy the entire application under tomcat/webapps? I was trying to follow the development process described at http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html until I found out that in practice it doesn't work exactly as explained there, so the intention of the post was to clarify the use of ant deploy task. Best regards, Carlos On 1/4/07, Leon Rosenberg [EMAIL PROTECTED] wrote: target name=copy_jsps copy todir=${output.webapp} fileset dir=${web.dir} include name=**/*/ /fileset fileset dir=${src.dir} include name=**/*.vm/ include name=**/*.jsp/ /fileset /copy /target and copy_jsps 1 second and you are done, and don't have to change your project structure, neither your deployment. On 1/4/07, Carlos Pita [EMAIL PROTECTED] wrote: Why not just drop in the new war file created from the ant war task? Tomcat will reload the app automatically. Copy the entire app war, explode it, deploy it (and of course recompile the requested jsp), all that just to check, say, that a typo in the view was corrected or that some cell contents are now correctly aligned? On a half-way fast pc it will last 10 seconds (depending on the size of the webapp of course, That's just about what it last on my pc. It seems overkilling for checking tiny changes in jsps to me. Anyway, the documentation I referred from my previous post seems to suggest that the task is able to deploy the app without copying it (not to mention without waring it). Best regards, Carlos On 1/4/07, Leon Rosenberg [EMAIL PROTECTED] wrote: and the amount of work need to be done on undeploy/deploy) Leon target name=war depends=init,compile,complete.web war destfile=${output}/${webapp.name}.war webxml=${web.xml.file} fileset dir=${output.webapp}/ /war /target target name=deploy.web depends=war copy tofile=${servletcontainer.home}/webapps/${webapp.name}.war fileset file=${output}/${webapp.name}.war/ /copy /target and you are done. On 1/4/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, how do I deploy a webapp from the ant deploy task avoiding it to copy the entire application under tomcat/webapps? The point is to simply update my build directory with modified jsps to make tomcat aware of the changes. If this build directory, which of course is not under webapps, is first copied under webapps by the ant deploy task, then nothing is updated there each time I build the app, and instead I have to explicitly redeploy it. One solution that comes to my mind is to deploy an xml context descriptor instead of a exploded war directory. But anyway, from the documentation here: http://tomcat.apache.org/tomcat-6.0-doc/appdev/source.html http://tomcat.apache.org/tomcat-6.0-doc/appdev/processes.html I would infer that deploying my application by means of a target like target name=tomcat-deploy depends=init,build,init-ant description=Deploy application to servlet container tomcat-deploy url=${tomcat.manager.url} username=${tomcat.manager.username} password=${tomcat.manager.password} path=${tomcat.context.path} war=file://${project.build.path} / /target will in principle install the application into tomcat without copying it into webapps, which in practice it doesn't. The following excerpts from the above links seem to support my supposition: For interactive development and testing of your web application using Tomcat 5, the following additional targets are defined: * install - Tell the currently running Tomcat 5 to make the application you are developing immediately available for execution and testing. This action does not require Tomcat 5 to be restarted, but it is also not remembered after Tomcat is restarted the next time. (notice that the install target uses the deploy task, despite of its name) # Modify and rebuild as needed. As you discover that changes are required, make those changes in the original source files, not in the output build directory, and re-issue the ant compile command. This ensures that your changes will be available to be saved (via cvs commit) later on -- the output build directory is deleted and recreated as necessary. # Reload the application. Tomcat will recognize changes in JSP pages automatically, but it will continue to use the old
Re: Wrong charset (is UTF-8 should be ISO 8859-1)
On 1/4/07, Sköldheimer Fredrik [EMAIL PROTECTED] wrote: I have a character issue I can't figure out. Here are a simple example of a html-page. I have looked in the config files of tomcat but can't find any parameters that corresponds to the defaultcharacterset that I'm used to from apache http server httpd.conf file. Try: grep -i encoding $CATALINA_HOME/conf/web.xml HTH! -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy from ant
Hi. All I can say is, that you don't want to deploy your war file through an ant task to tomcat. Believe me. Not for development. For a small change in the webcontent you have to redeploy the whole app - very annoying. I used that half a year. Now I use the Eclipse WTP Project for development with hot-code-replace and webdeployment. Sure it isn't perfect, but changes are instantly accessible in the webapp - and that's what one is looking for. It takes some time to figure out, how it works, but when finally configured, you won't miss it anymore! Take a look at it: http://www.eclipse.org/webtools/ Hope that helps. regards, Veit - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
strange tomcat 5.5 problem/session handling?
Hi all, I have got a rather strange problem with am application running on tomcat. The aplication is based on Jetspeed, which uses Turbine. The problem is with login, since user handling is session based I think it could be a problem with tomcat session handling. Ok, it's a jetspeed 1.6 running in tomcat 5.5.20 on a debian machine. If a user logs in sometimes he is logged out again as soon as clicking on any link. If he logs in a second time, it works fine. It seems the problem is restricted to that machine and to firefox (tested also konqueror and IE). This is really one of these ugly hard-to-solve problems. Help would be much appreciated. Stefan -- Stefan Kuhn B. Sc. M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 Fax: +49 (0) 221-470-7786 My public PGP key is available at http://pgp.mit.edu - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy from ant
I'm currently using WTP just for editing xml and jsp (btw, I would love that it supported EL autocompletion for the MVC model). OTOH I'm a bit reluctant to adopt the entire web WTP proyect approach, I prefer to control my vanilla java project from ant targets. Anyway, regarding the ant deploy task, I will follow advice from you all and stop worrying about making sense of what the developer manual suggests in this respect. I will put my build directory under webapps, or alternatively a symlink to it, or I will just deploy an xml context descriptor pointing to my build directory anywhere in the filesystem. Thank you all. Cheers, Carlos On 1/4/07, Veit Guna [EMAIL PROTECTED] wrote: Hi. All I can say is, that you don't want to deploy your war file through an ant task to tomcat. Believe me. Not for development. For a small change in the webcontent you have to redeploy the whole app - very annoying. I used that half a year. Now I use the Eclipse WTP Project for development with hot-code-replace and webdeployment. Sure it isn't perfect, but changes are instantly accessible in the webapp - and that's what one is looking for. It takes some time to figure out, how it works, but when finally configured, you won't miss it anymore! Take a look at it: http://www.eclipse.org/webtools/ Hope that helps. regards, Veit - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: strange tomcat 5.5 problem/session handling?
On the tomcat side, you can enable the RequestDumperValve to see what is going on, on the browser side use Firefox with a little plugin called LiveHttpHeaders, lets you see all the traffic going back and forward Filip Stefan Kuhn wrote: Hi all, I have got a rather strange problem with am application running on tomcat. The aplication is based on Jetspeed, which uses Turbine. The problem is with login, since user handling is session based I think it could be a problem with tomcat session handling. Ok, it's a jetspeed 1.6 running in tomcat 5.5.20 on a debian machine. If a user logs in sometimes he is logged out again as soon as clicking on any link. If he logs in a second time, it works fine. It seems the problem is restricted to that machine and to firefox (tested also konqueror and IE). This is really one of these ugly hard-to-solve problems. Help would be much appreciated. Stefan -- Stefan Kuhn B. Sc. M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 Fax: +49 (0) 221-470-7786 My public PGP key is available at http://pgp.mit.edu - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to configure tomcat for Turkey?
it's your , character. you need to use the java.text.DecimalFormat class Filip Dharma General wrote: hello, (1) i want my JSP application to run with Turkey locale. how should i configure apache Tomcat 5.x for Turkey? (2) at present, i want to find out about an error message --- java.lang.NumberFormatException: For input string: 0,00 at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang.Float.parseFloat(Unknown Source) what is it? thx No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.4/615 - Release Date: 1/3/2007 1:34 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat cache problem?
the caching behaviour of the modern browsers is really a rocket science. One of the way to try to control it is to put the according meta-tags into your files: META http-equiv=pragma content=no-cache META http-equiv=Cache-Control content=no-cache, must-revalidate META name=Expires content=0 Furthermore I'd suggest you add a unique timestemp (System.currentTimeMillis()) to each link (and change it on each page reload). This way you can force the browser to believe he hasn't visited the page yet. That been said, you should really look into using a program which displays browser-webserver communication. For firefox its LiveHttpHeaders or TamperData , for IE a version of LiveIEHttpHeaders exists somewhere on the net. When you see that your browser sends a valid new request and the servers sends old data back you should start to check your webapp :-) regards Leon On 1/4/07, markx3 [EMAIL PROTECTED] wrote: Hello, What do you mean by and you probably should check the pragmas in the pages (expire, no-cache, etc). If they aren't present - you are screwed :-) Can you please give me more info on what to do? Thank you! Leon Rosenberg-3 wrote: and you probably should check the pragmas in the pages (expire, no-cache, etc). If they aren't present - you are screwed :-) alternatively you could try to set your browser to get the page explicitely each time you request it (works with ie, firefox is dumb enough to ignore it, thinking it knows more about the actuallity of the page than you). Have you actually check with TamperData or LiveHttpHeaders if the browser really sends GET requests upon refresh? Leon On 1/3/07, david.delbecq [EMAIL PROTECTED] wrote: To make it short, tomcat does no caching of servlet / jsp output. Your webapp is at fault All tomcat does is handle the 'if-modified-since' header when serving static data (what is not served by a servlet or a jsp, mainly pictures, static html, css). The fact it goes back well when you restart tomcat points out it's a problem with you specific web application. As you have no knowledge of what is inside this web application, i suggest you check with the vendor and or developpers of that specific web application. If you want confirmation, just restart your webapplication without restarting tomcat (use the manager or lambda probe for that) reference: tomcat manager http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html lambda probe http://www.lambdaprobe.org markx3 a écrit : Hello, I have a server running Windows 2003 server SP1. 8 GB of RAM. Sun Java J2SE 5.0 update 7 and Tomcat 5.5.20. Tomcat is used as our web server to review archived email. The email is stored in folders on the server and the archival system uses MS SQL 2000 SP4 on the backend. The problem is when we use Tomcat as our web server to review the email, and we click on several emails, after awhile regardless of the different email we click on, we get the same data displayed in our web browser. This really appears to be a caching issue with Tomcat, because every time we restart the tomcat service, the problem goes away for a few days and then it happens again. To try to fix the issue we gave Tomcat more memory in the Tomcat Properties / Java tab. We set initial memory pool to 128 MB of RAM and maximum memory pool to 512 MB of RAM. We also tried setting the IE 6.0 and 7.0 browsers to check for newer versions of the page every time I visit the webpage. Both of these attempts didn't resolve the issue. Since I'm not a web developer I don't know what to tell you about the website tomcat is hosting. Except for that it was a .war file that tomcat extracts once we place in into the tomcat5.5\webapps directory. If you need specifics on what this website is, please let me know and I can get that info for you. But looking through it there are all the usual files like .jsp, .htm, etc. Also there isn't a proxy server on the network. When users connect to the website tomcat is hosting, the browser on the local machine is making a direct connection since it's on the same subnet. Please let me know what suggestions we can use to try to resolve this issue. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-cache-problem--tf2909995.html#a8168648 Sent from the Tomcat - User mailing list archive at Nabble.com.
Re: URL rewriting For Session Tracking
Hi Bill, In my case, I can't use taglibs since I am generating the code dynamically. But even if I could use taglibs, then part of what the taglib does is really using response.encodeURL(second.jsp) to do the URL rewriting without you having to worry about it. So, I think the ultimate answer is that yes, I need to do URL rewriting for each individual link in my server manually if I want user connections to have a session associated with them; any link that I don't do this for, and the user clicks on will cause the session to be lost. And as a result, there is no magic switch that Tomcat or any filter has that I can turn on to have this automatically done. This is really what I want to know, that there is no magic switch that I am missing on. The problem is that I have thousands of links in my pages, and now I have to go in and change each one of them so that they do URL rewriting in case the user's doesn't allow cookies. Am I correct in assuming that there is no magic switch in Tomcat or anywhere to have url rewriting done for me? By the way, I know that I can write a servlet filter that would parse the response being sent to the user and do URL rewriting for any link in the response, but I think that is considered a bad practice since then every link will have the jsessionid with it. Suppose I am linking to www.yahoo.com which is outside my application, then the jsessionid will be associated with that link as well which someone had mentioned it is not a safe practice. Thanks, Kasra - Original Message - From: Bill Barker [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, January 03, 2007 11:51 PM Subject: Re: URL rewriting For Session Tracking Usually you would use a tag lib for this sort of thing. With struts, it would look something like: html:a href=second.jspsecond page /html:a [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Your reply answered another question that I had. But I think I still haven't described my current question clearly. suppose I have 3 JSP pages in my application. -- first.jsp second.jsp third.jsp -- Now, in my first.jsp, I have nothing but 2 links to the other two JSP pages. If I want the session to be maintain when use clicks on the links to go to the other pages, then can first.jsp be the following: -- a href=second.jspsecond page/a a href=third.jspthird page/a -- Or, the code in first.jsp must be the following: -- a href='%=response.encodeURL(second.jsp)%'second page/a a href='%=response.encodeURL(second.jsp)'%second page/a Note: If I use the first syntax, then unless Tomcat or some patch or filter parse the code and add the jsessionid to the link automatically, then the user will be losing the session when to goes from first.jsp to the other ones. And that's my question; can I use the first syntax. Or there is no way but to use the second syntax if I want the session to be kept. Thanks, Kasra - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, January 03, 2007 9:56 PM Subject: RE: URL rewriting For Session Tracking From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: Re: URL rewriting For Session Tracking Basically I have a webapp and I want to have a session for each user that connects to my server (just the usual servlet session that is created with jsessionid). Do I have to wrap every link that I have in my webapp with an Httpservletresponse.encodeURL()? No. As I recall, Tomcat will not create a session automatically unless it's absolutely necessary (e.g., tracking authenticated users) or the application requests it. I'm not aware of any config parameter that will force creation of sessions for all clients, but all you should have to do is put the following somewhere in the request processing path of each servlet: request.getSession(true); This doesn't need to go into your servlet or JSP code - you can write a simple filter class that does nothing but run the above code to force the creation of a session if one doesn't already exist. The filter mapping can go into conf/web.xml so it will apply to all apps deployed within your Tomcat instance, or in each appropriate webapp's web.xml file. Note that per the servlet spec, Tomcat will use cookies not URL rewriting for session tracking; it will fall back to URL rewriting if the client refuses cookies. You can also disable use of cookies by setting cookies=false in your Context elements (or the global conf/context.xml file). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL
RE: Presentation on Tomcat
http://www.google.co.in/search?hl=enas_qdr=allq=Tomcat+filetype%3Appt+ inurl%3Aedumeta= - 908 valid presentations :) . Regards, Mohan -Original Message- From: Vijay Hatewar [mailto:[EMAIL PROTECTED] Sent: Thursday, January 04, 2007 3:10 PM To: 'Tomcat Users List' Subject: RE: Presentation on Tomcat I am not sure if I should take effort, answering your question but still... Jerome .. Yes you are right , I perhaps made very simple request. But is it fair and right , you putting every Indian in the same bracket. I believe everything is getting outsourced in India since long time and we are doing good. If we had been as bad as you have mentioned this process would not have had continued. I believe this is a help group, and nobody have told me for what is the level of help which this group can offer. If you find this as very simple, not worth of concern you better ignore it. I don't really see you helping everyone and answering every appropriate question. What I can clearly see is you are High Time frustrated person who can not do anything but like a Old witch cursing a beautiful dream. Regards Vijay -Original Message- From: The Schneider Company [mailto:[EMAIL PROTECTED] Sent: Thursday, January 04, 2007 2:50 PM To: users@tomcat.apache.org Subject: Re: Presentation on Tomcat On 1/4/07, Vijay Hatewar [EMAIL PROTECTED] wrote: Hi All I am very new to Tomcat and working as a QA Engineer , I have to deliver presentation on How web application can be deployed using tomcat , different configuration files and how they are used . basically I want to cover high level functional aspect . Please help me , as I am hardly acquainted to tomcat I really find it funny that so many jobs are being outsourced to Bangalore and all those other places. The reason we are told is always the same one: Highly qualified ppl working there fore little money. Now, what do we see here on the list? Guys who don't even bother to read the docs, begging for help on the most simple questions, on the same time showing off when it comes to outsourcing-contracts how smart and capable they are. Don't get me wrong, but do you really help that anyone here is trying to help you killing his / her job? Show at least a little effort! SCNR Jerome __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email is confidential. If you are not the addressee tell the sender immediately and destroy this email without using, sending or storing it. Emails are not secure and may suffer errors, viruses, delay, interception and amendment. Standard Chartered PLC and subsidiaries (SCGroup) do not accept liability for damage caused by this email and may monitor email traffic. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache+Tomcat+mod_jk+cookie+Rewrite
Hello, I notice that because of url rewriting [RewriteRule] my cookie is not being passed to Tomcat. This is what I am doing: I have mod_jk as connector between Tomcat and Apache. I have an HTML page where I set my cookie - username. Now If I call the servlet directly from html page then cookie gets passed e.g. /MyApp/MyServlet it works well. But I have added a redirection as follows: RewriteRule ^/url1$ /MyApp/MyServlet [PT] MyApp is a web application in Tomcat. Now in my HTML page in the onSubmit function I call /url1 instead of servlet directly - this redirects to the servlet but the cookie is not set. How do i go about passing the cookie to the servlet using RewriteRule ? Thank you in advance Deval - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]