port redirection
Hello a servlet is running on port 9000 while apache in running on port 80. Is there a way to change this behavior so that users who type http://server1/OpenObject?doc=ERW will receive the same content of http://server1:9000/OpenObject?doc=ERW but the URL does not change (stays http://server1/OpenObject?doc=ERW) The change is needed in the servlet or the apache? thanks ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.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: sessionID moves to other PC
Hi, When I see this behaviour I don't see the output on the server (thanks Yuval) It is just suddenly on my browser.. Maybe it's my wireless Cable Modem...maybe caching or so... I'll do some more debugging in the weekend.. ta - Original Message - From: Christopher Schultz [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 27, 2008 3:44 AM Subject: Re: sessionID moves to other PC -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sascha, Sascha Monteiro wrote: | I now put % out.println(session.getId()); % in the page.. | I see my sessionID, but then navigate to another page and then see the | sessionID of the other user! | then I press reload in my browser, and I get my own session again, till | I navigate again... This sounds suspiciously like you are storing either the session object or the request object somewhere you should not be (such as in a member of one of your servlets or JSPs or something). Can you post a little bit of code from the servlet that ends up with the wrong session? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfEJdkACgkQ9CaO5/Lv0PAUgACgnBBJmJ1Mn4kbNKy0GlIEzmVA WEwAn1RHgNfHmkDpJ/uMwx40elrkxTWX =QCiV -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] - 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: port redirection
use mok_jk Melanie Pfefer wrote: Hello a servlet is running on port 9000 while apache in running on port 80. Is there a way to change this behavior so that users who type http://server1/OpenObject?doc=ERW will receive the same content of http://server1:9000/OpenObject?doc=ERW but the URL does not change (stays http://server1/OpenObject?doc=ERW) The change is needed in the servlet or the apache? thanks ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.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] - 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 Redirection
I have deployed an application under Tomcat, fronted by Apache. I am experiencing what looks like strange redirects when I try to use the application. The front page is a login screen, but if I try to login, Tomcat attempts to locate a resource called /Login.jsp, which doesn't exist. The page should attempt to load the servlet piston defined in my WEB-INF/web.xml I don't understand what is happening - any pointers or explanations would help enormously. Configs: Apache: VirtualHost 10.1.1.204 ProxyPass / ajp://localhost:8009/ ProxyPass /servlet ajp://localhost:8009/servlet ProxyPass /piston ajp://localhost:8009/piston ProxyPass /manager ajp://localhost:8009/manager ProxyPass /link ajp://localhost:8009/link ProxyPass /ajax ajp://localhost:8009/ajax ProxyVia on /VirtualHost Tomcat: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Tomcat-Standalone Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true proxyName=test.name.com proxyPort=80/ Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Engine name=Standalone defaultHost=localhost debug=0 Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ Host appBase=/home/sites/home liveDeploy=false autoDeploy=false debug=4 name=test.name.com Alias10.1.1.204/Alias Context cachingAllowed=true cookies=true crossContext=true debug=0 docBase=web path= privileged=false reloadable=true Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=test.name.com_log. suffix=.txt timestamp=true verbosity=1/ /Context /Host /Engine /Service /Server OS is RHEL 5, Apache is httpd-2.2.3-11.el5_1.3, Tomcat is 4.1.31 from binary release, Java is 1.4.2_11 Thanks in advance, S. - 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 Redirection
Stephen Nelson-Smith wrote: I have deployed an application under Tomcat, fronted by Apache. I am experiencing what looks like strange redirects when I try to use the application. The front page is a login screen, but if I try to login, Tomcat attempts to locate a resource called /Login.jsp, which doesn't exist. The page should attempt to load the servlet piston defined in my WEB-INF/web.xml what is the HTML / JSP source of the front page? p I don't understand what is happening - any pointers or explanations would help enormously. Configs: Apache: VirtualHost 10.1.1.204 ProxyPass / ajp://localhost:8009/ ProxyPass /servlet ajp://localhost:8009/servlet ProxyPass /piston ajp://localhost:8009/piston ProxyPass /manager ajp://localhost:8009/manager ProxyPass /link ajp://localhost:8009/link ProxyPass /ajax ajp://localhost:8009/ajax ProxyVia on /VirtualHost Tomcat: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Tomcat-Standalone Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true proxyName=test.name.com proxyPort=80/ Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Engine name=Standalone defaultHost=localhost debug=0 Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ Host appBase=/home/sites/home liveDeploy=false autoDeploy=false debug=4 name=test.name.com Alias10.1.1.204/Alias Context cachingAllowed=true cookies=true crossContext=true debug=0 docBase=web path= privileged=false reloadable=true Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=test.name.com_log. suffix=.txt timestamp=true verbosity=1/ /Context /Host /Engine /Service /Server OS is RHEL 5, Apache is httpd-2.2.3-11.el5_1.3, Tomcat is 4.1.31 from binary release, Java is 1.4.2_11 Thanks in advance, S. - 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 Redirection
On Thu, Feb 28, 2008 at 12:38 PM, Pid [EMAIL PROTECTED] wrote: Stephen Nelson-Smith wrote: I have deployed an application under Tomcat, fronted by Apache. I am experiencing what looks like strange redirects when I try to use the application. The front page is a login screen, but if I try to login, Tomcat attempts to locate a resource called /Login.jsp, which doesn't exist. The page should attempt to load the servlet piston defined in my WEB-INF/web.xml what is the HTML / JSP source of the front page? login.jsp I think it looks like the application has an exception throwing mechanism that was written under windows, and sends the user back to Login,jsp. Does my config look sane? I am not sure if I need all those proxy passes, as I had hoped just / - / would do the trick. S. - 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: Jmx with Java 1.4.2_16 and Tomcat 5.0
Farid Izem [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I'm used to deploy java 1.5.0 and Tomcat 5.5 with jmx enabled. With this i can easily connect to MbeanServer using JConsole. Is there a way to do exactly the same with Java 1.4.2_XX and Tomcat 5.0 ? I'm facing issue with this couple and i want be able To plug JMX JConsole. AS far as i have read on the net, JMX layer is provide as separates jar files. Can anyone explain how to deploy the jar files and how to configure tomcat 5.0 ? Is it exactly the same as java 1.5 with tomcat 5.5 ? In this day and age, my advice would be to not even try to deploy on a 1.4.x JVM. That having been said, you need to download and install the compatibility package, which makes mx4j your JMX provider. Kind Regards, Farid - 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] AdmID:C64B2EE558667D73B9843B9570878202 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JkRequestLogFormat Options
Hallo, I am logging the mod_jk Output through the Apache access_log - as written in the reference found under http://tomcat.apache.org/connectors-doc/reference/apache.html Because i want to get clearness about what exactly is going on in our system i use the following LogFormat: LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ \%{Cookie}i\ \%{Set-Cookie}o\ %{pid}P %{tid}P%T %{JK_WORKER_NAME}n %{JK_REQUEST_DURATON}n %{JK_WORKER_ROUTE}n %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_FIRST_VALUE}n %{JK_LB_FIRST_ACCESSED}n %{JK_LB_FIRST_READ}n %{JK_LB_FIRST_TRANSFERRED}n %{JK_LB_FIRST_ERRORS}n %{JK_LB_FIRST_ACTIVATION}n %{JK_LB_FIRST_STATE}n %{JK_LB_LAST_NAME}n mod_jk_log ...everthing works fine except the Options responsible for the Request Duration. Mostly neither %T nor %{JK_REQUEST_DURATON}n have a Value (%T mostly is 0 an the other Parameter is -). At some Requests i found the %T has a value like for example 2 or 3.. - and JK_REQUEST DURATION has - or %T is 0 and JK_REQUEST_DURATION has an value like 2 or 3 ... First - why are there not values at each request ? Second -i think both Options are measuring the same Value - why they are not the same ? Third - why they are not showing seconds.microseconds as written in the reference but only (I think so) rounded seconds. We use mod_jk 1.2.26 Thanks for help Best ahmed -- Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! http://games.entertainment.web.de/de/entertainment/games/free - 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 6 Cluster multicast problem
Hi, I am trying to upgrade two Tomcat 5.5 servers to version 6.0.16, but I´m having a problem with the cluster settings. The two current servers are using clustering now, and it is working fine, but when trying to port this to version 6, I get the following error: Feb 28, 2008 2:12:43 PM org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread run WARNING: Error receiving mcast package. Sleeping 500ms java.lang.IllegalArgumentException: Invalid package, should start with:{84, 82, 73, 66, 69, 83, 45, 66} at org.apache.catalina.tribes.membership.MemberImpl.getMember( MemberImpl.java:322) at org.apache.catalina.tribes.membership.MemberImpl.getMember( MemberImpl.java:298) at org.apache.catalina.tribes.membership.MemberImpl.getMember( MemberImpl.java:403) at org.apache.catalina.tribes.membership.McastServiceImpl.receive( McastServiceImpl.java:319) at org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run( McastServiceImpl.java:413) Both servers are starting up and working fine by themselves, but I need clustering to work. Can you help me please? Here is server.xml for server 1: Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Service name=Catalina Connector port=8080 protocol=HTTP/1.1 maxThreads=150 connectionTimeout=2 redirectPort=8443 / Connector port=11009 protocol=AJP/1.3 redirectPort=8443 / Engine name=Standalone defaultHost=localhost jvmRoute=tomcat1 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster channelSendOptions=8 Manager className=org.apache.catalina.ha.session.DeltaManager expireSessionsOnShutdown=false notifyListenersOnReplication=true/ Channel className=org.apache.catalina.tribes.group.GroupChannel Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver address=auto port=4001 autoBind=100 selectorTimeout=5000 maxThreads=6/ Sender className=org.apache.catalina.tribes.transport.ReplicationTransmitter Transport className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/ /Sender Interceptor className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector / Interceptor className= org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor Member className=org.apache.catalina.tribes.membership.StaticMember port=4000 securePort=-1 host=localhost domain=staging-cluster uniqueId={0,1,2,3,4,5,6,7,8,9}/ /Interceptor Interceptor className= org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor / /Channel Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.* \.html;.*\.css;.*\.txt;/ Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve/ Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer tempDir=/temp/war-temp deployDir=/temp/webapps/ watchDir=/temp/war-listen/ watchEnabled=false/ ClusterListener className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/ ClusterListener className=org.apache.catalina.ha.session.ClusterSessionListener/ /Cluster Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server Here is server.xml for server 2: Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Service name=Catalina Connector port=8080 protocol=HTTP/1.1 maxThreads=150 connectionTimeout=2 redirectPort=8443 / Connector port=11009 protocol=AJP/1.3 redirectPort=8443 / Engine name=Standalone defaultHost=localhost jvmRoute=tomcat2 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster channelSendOptions=8 Manager
Re: HOWTO: install a Tomcat web application on Fedora 7 [was: ...]
My own 2 cents; I'm a Debian guy and I spent at least a month trying to get Tomcat to run the way I wanted it. It so damn easy to do an apt-get install tomcat5.5 (or rpm), look at http://localhost:8180/ and see something working. But I didn't get predictable behavior until I install Tomcat from tomcat.apache.org. It took me 30 minutes - may be - to configure but it's behavior is so much more predictable. My 2 cents. Chris - Original Message From: Gabe Wong [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 27, 2008 8:09:56 PM Subject: Re: HOWTO: install a Tomcat web application on Fedora 7 [was: ...] John Pye wrote: Here are some instructions that hopefully will be of use to future users: 1. To install tomcat on Fedora 7, just run yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps. 2. Your configuration files are in /etc/tomcat5. You may need to edit server-minimal.xml to set the port that Tomcat listens on. You will need to edit the file tomcat-users.xml and add a user with the role 'manager' if you want to be able to use the Tomcat Manager application. 3. You can start and stop Tomcat by running '/etc/init.d/tomcat5 start' (or stop,restart, etc). 4. Any Tomcat web application that you want to serve should be dropped into /var/lib/tomcat5/webapps/ 5. You can view your Tomcat website via http://yourserver.example.com:8080/. This webpage had some good instructions: http://www.weiqigao.com/blog/2007/01/14/tomcat_5_on_fedora_core_6_in_five_easy_steps.html I have often felt that Java developers, with their 'completely platform independent' system don't acknowledge that platform-specific knowledge is often a barrier to getting those Java applications up and running. The above steps make maximum use of the packaging work that Fedora and JPackage maintainers have done, and made this job very much easier for me than downloading the platform independent packages and working out their particular conventions etc. The concern that some of us on this list has with the various Platform specific distros, is that they are usually altered from the original Apache distribution. As soon as anything is altered, you have incompatibility issues. Most applications are developed and tested on the Apache distributions. You may not notice incompatibilities until you try to deploy a real complex application. That said, I am not saying one is right or wrong. It is just that just as Java has become relatively stable (predictable), there enters the various Linux based distros to add to the equation. Some of these distros do not follow the generally accepted JAVA programming principles (what is acceptable today). These distros usually follow the principles of traditional Linux based programming, such as PHP, Python, etc. And that is primarily to make packages globally accessible on the system. This is where the distinction between traditional linux applications and present day java applications are being missed. Most Java applications are dependent on a specific version of an application server, JVM, libraries, etc. Thus a one package for all creates issues. So moving forward, are Java Applications now to be built for a specific Linux distro, in addition to supporting the traditional purist java programming environment. Or is it that a new generation of java programmers under the Linux distro environment will give raise. Will there then be two camps or platforms? Or will the new generation become the standard. I say this because as I speak, more and more I see java questions on Linux lists instead of pure java lists. I know I do not usually rant, but this is an issue that needs to be addressed. -- Regards Gabe Wong NGASI AppServer Manager JAVA AUTOMATION and SaaS Enablement http://www.ngasi.com NEW! 8.0 - Centrally manage multiple physical servers - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Re: Jmx with Java 1.4.2_16 and Tomcat 5.0
Farid Izem [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I'm used to deploy java 1.5.0 and Tomcat 5.5 with jmx enabled. With this i can easily connect to MbeanServer using JConsole. Is there a way to do exactly the same with Java 1.4.2_XX and Tomcat 5.0 ? I'm facing issue with this couple and i want be able To plug JMX JConsole. AS far as i have read on the net, JMX layer is provide as separates jar files. Can anyone explain how to deploy the jar files and how to configure tomcat 5.0 ? Is it exactly the same as java 1.5 with tomcat 5.5 ? In this day and age, my advice would be to not even try to deploy on a 1.4.x JVM. That having been said, you need to download and install the compatibility package, which makes mx4j your JMX provider. Kind Regards, Farid - 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] AdmID:C64B2EE558667D73B9843B9570878202 AdmID:A7AAD796517679D170D85E555D2D299E - 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.5, SSL and logs?
I have set up a Tomcat 5.5 server on a Windows machine. I modified the server.xml file to enable SSL, created and imported a self-signed cert using keytool, and it appears to be working. I can access https://myserver:8443 both locally and from another machine on the network. However, I am having trouble getting a device running Windows Mobile 2003 to connect to the server. It navigates fine to my non-ssl connection. I'm attempting to troubleshoot where the SSL connection isn't working. When I look at the localhost_access_log file, I can see the http requests come through, but nothing shows up for the https requests. Is there another log I can look at that will show me the ssl requests coming through? There are only a few basic logs in my logs directory, which show the startup information but nothing else. I modified the server.xml file and uncommented the ReqestDumperValve but it only shows the http stuff that comes through. I have also gone through the steps here: http://tomcat.apache.org/tomcat-5.5-doc/logging.html and while there is now a *lot* of stuff showing up in my log, none of it seems to correspond to the SSL requests. Can anyone point me in the right direction? Thanks, Jen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] AdmID:0F3058C46A8F10E4E914DD3552C50BE9 - 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: port redirection
use mok_jk Melanie Pfefer wrote: Hello a servlet is running on port 9000 while apache in running on port 80. Is there a way to change this behavior so that users who type http://server1/OpenObject?doc=ERW will receive the same content of http://server1:9000/OpenObject?doc=ERW but the URL does not change (stays http://server1/OpenObject?doc=ERW) The change is needed in the servlet or the apache? thanks ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] AdmID:89688353F6A00E46AC970BDB17B1C29E - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
port redirection
Hello a servlet is running on port 9000 while apache in running on port 80. Is there a way to change this behavior so that users who type http://server1/OpenObject?doc=ERW will receive the same content of http://server1:9000/OpenObject?doc=ERW but the URL does not change (stays http://server1/OpenObject?doc=ERW) The change is needed in the servlet or the apache? thanks ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.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] AdmID:2C0787D4E129851F90208AB1F7EF0325 - 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 6 on pure ipv6 solaris
I get this error when I start my server. I tried many ports thinking they were not free, but invain. 2008-02-28 13:22:21,380 6047 [main] ERROR org.apache.catalina.core.StandardServer - StandardServer.await: create[17008]: java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.init(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java :373) at org.apache.catalina.startup.Catalina.await(Catalina.java:630) at org.apache.catalina.startup.Catalina.start(Catalina.java:590) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 1 inet6 ::1/128 ce0: flags=2000841UP,RUNNING,MULTICAST,IPv6 mtu 1500 index 2 inet6 fe80::214:4fff:fe74:dc80/10 ether 0:14:4f:74:dc:80 ce0:1: flags=2080841UP,RUNNING,MULTICAST,ADDRCONF,IPv6 mtu 1500 index 2 inet6 2001:d(removed this part)c80/64 ce0:2: flags=2080841UP,RUNNING,MULTICAST,ADDRCONF,IPv6 mtu 1500 index 2 inet6 2002(removed this part)dc80/64 ce0:3: flags=2000841UP,RUNNING,MULTICAST,IPv6 mtu 1500 index 2 inet6 fd00(removed this part)dc80/128 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6206527 is this something to do? -- How easy it is to mock the sun: The light by which it is caught is its own !
RE: Incorrect cookie value in tomcat5.5.26
Filip, As for the actual code, what I gave below is all there is to the cookie code. The test case too would be what I described below. I hadn't checked before, but we are facing this issue even with tomcat 5.0 when I do cookie.setVersion(1). The other thing I noticed with cookie.setVersion(1) on tomcat5.5.26 and tomcat5.0 is the cookie file is not being written under - C:\Documents and Settings\Sushil\Cookies. If you are looking for some specific code or need me to describe further, please let me know Thanks, Sushil -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 1:49 PM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 hi Sushil that scenario works just fine for me. you would have to show your actual code (and a test case) for me to analyze your actual problem Filip Sushil Vegad wrote: Hello Filip, Please let me know your thoughts on this. Our scenario is: We set the username in the cookie when the user logs in. I open a new browser instance, log-in and the cookie is set. If I logout of the application and return to login screen (on the same browser instance) the cookie is found. PROBLEM: If I use a NEW browser instance to go to the login page, the cookie is NOT found. On login submit, we set the cookie - Cookie cookie = new Cookie(Constants.REMEMBERME, username); cookie.setVersion(1); cookie.setMaxAge(Integer.MAX_VALUE); response.addCookie(cookie); On requesting the login page, we check if the cookie was set - Cookie cookies[] = request.getCookies(); String username = ; for (int i = 0; i cookies.length; i++) { Cookie c = cookies[i]; if (c.getName().equals(Constants.REMEMBERME)) { username = c.getValue();//Set username in the login field break; } } This code did not have an issue with tomcat 5.0 Thanks, Sushil -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 6:54 PM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 what is your scenario, the following code worked for me, even though the browser doesn't send up cookie version % javax.servlet.http.Cookie[] cs = request.getCookies(); String value = null; for (Cookie co : cs) { if (test.equals(co.getName())) value = co.getValue(); } javax.servlet.http.Cookie c = new javax.servlet.http.Cookie(test,someemail=somedomain.com); c.setVersion(1); c.setMaxAge(100); response.addCookie(c); % done!br/ %=value% Sushil Vegad wrote: Hello, cookie.setVersion(1) remembers the cookie only for the browser session. A new browser does not have access to the cookie We did cookie.setMaxAge(Integer.MAX_VALUE) but that doesn't help. Any thoughts please? Thanks, Sushil Vegad Technical Lead, Scheduling Project Serebrum Corporation - translating strategy into results Work: 609.777.3563 Cell: 732.216.4908 Email: [EMAIL PROTECTED] Conference Dial-in: 1-218-486-1300, Bridge: 427526 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, February 11, 2008 11:54 AM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 not broken, corrected. the java doc says setValue public void *setValue*(String http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html newValue) Assigns a new value to a cookie after the cookie is created. If you use a binary value, you may want to use BASE64 encoding. With Version 0 cookies, values should not contain white space, brackets, parentheses, equals signs, commas, double quotes, slashes, question marks, at signs, colons, and semicolons. Empty values may not behave the same way on all browsers. *Parameters:* |newValue| - a |String| specifying the new value to fix this, all you need to do is cookie.setVersion(1); Filip Konstantin Kolinko wrote: I guess the cause is the same as for tomcat 6.0.16. See messages entitles Cookies are broken in 6.0.16?. http://www.nabble.com/Cookies-are-broken-in-6.0.16--to15369118.html - 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]
Support and development of versions
Hi, So, I'm running an app which the development house say *has* to run on 4.1.31. I'm not especially happy about this, and will try running it under 4.1.37, but the developers say they *might* be able to get it to run under 5.5. I seem to recall a conversation in which I was told that 5.5 isn't really actively supported or developed any more either. Is this the case? Am I best to try to pressure the developers to get the system to run on 6? Or will 4.1 be sound for a while yet, as long as I can keep on top of bug/security fixes? Thanks, S. - 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 send http response in several chunked package with Tomcat
Hi Filip, Yes it works. Thanks a lot! Christopher, in fact I'm writing a servlet to fool a management software, So I need make sure the servlet response is as close to real device as possible. Thanks for everyone's help. B.R Han -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 11:24 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat you don't need to do that, tomcat does it for you. all you need to do is while (havedata) { response.getOutputStream().println(some data) response.flushBuffer() } and tomcat takes care of the rest Filip Hanks Wang (hanwan) wrote: Hi Johnny, I try below method implement the chunk in code: String tmp = something very long; String hlen = Integer.toHexString(tmp.length()); hlen = hlen +\r\n + tmp.toString(); String chunkend = Integer.toHexString(0)+\r\n; response.getOutputStream().println(hlen); response.getOutputStream().println(chunkend); I created two http chunk successfully by this way. The first chunk is the data which wraps tmp, the second is the end chunk. But the question is, all these chunk and http header are in same frame (get it from wireshark.). How can I put them in different frame? Which means we need 3 frame for the case: the first frame will carry the http header, the second will carry the first chunk data, the last frame will carry the end chunk. Does it mean I need control the tcp/ip protocol? It's impossible, right? B.R Han -Original Message- From: Hanks Wang (hanwan) Sent: Wednesday, February 27, 2008 3:40 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Johnny, Thanks a lot. I read the http RFC and find something like this: The chunk-size field is a string of hex digits indicating the size of the chunk. The chunked encoding is ended by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line. Do u have any tutorial of ChunkedOutputFilter? I can't find anything from its API document.. Thanks Han -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 7:41 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat -- -- --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. -- -- --- - Original Message - From: Hanks Wang (hanwan) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, February 26, 2008 12:02 PM Subject: how to send http response in several chunked package with Tomcat Hi all, Is there a way to make tomcat generate http response in chunked-encoding style? suppose I have a file resp.log and I can parse it in byte[], how can I send the byte array in several chunked package? Hanks I have just started looking at this, so no expert but I did notice ChunkedInputFilter,ChunkedOutputFilter I think your answer is in setting a filter in normal Http I notice that chunking happens automatically if header size ommited, but with so much control of the socket I think you have to pump it thru a filter and then there must be a way to say last chuck... and start chuck... Short of that one would have to set headers themselves and add trailing 0's and end sequences, so I think those classes are specific to http11 a guess Any suggestion is welcome! Thanks Han - 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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Frustrating Issue with default host
I m trying to setup tomcat as below. The host blocks have ips in them. I have a proxy configured in front of the tomcat with an external ip which receives all the request for the sites from the external world and contacts the tomcat (with different hosts configured). The problem is with /Host Host name=10.7.0.81, 10.7.0.82 10.7.0.83 which are accesed via connector 8080 by the proxy server. When I use the http://x.x.x.x (external-ip), it works just fine and all three sites related to the three hostname above open but when I try accessing the sites via the dns name instead of the ips, all sites are defaulted to the defaulthost. Please suggest. Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define an Apache-Connector Service -- Service name=Tomcat-Apache !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat5.CoyoteConnector port=8009 minProcessors=5 maxProcessors=150 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / !-- Engine name=Apache defaultHost=10.7.0.63 debug=0 -- Engine name=Tomcat-Apache defaultHost=10.7.255.76 debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=apache_log. suffix=.txt timestamp=true/ !-- Access log processes all requests for this virtual host. -- Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ Host name=10.7.0.63 debug=0 appBase=/opt/jakarta-tomcat-5.0.18/webapps/RO OT/lnholdings Alias10.7.0.61/Alias Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve dire ctory=logs prefix=home_access_log. suffix=.txt pattern=common resolveHo sts=false/ /Host Host name=10.7.0.62 debug=0 appBase=/opt/jakarta-tomcat-5.0.18/web apps/ROOT/liquidnet Alias10.7.0.61/Alias Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve dir ectory=logs prefix=home_access_log. suffix=.txt pattern=common resolveH osts=false/ /Host Host name=10.7.0.64 debug=0 appBase=/opt/jakarta-tomcat-5.0.18/web apps/ROOT/legal Alias10.7.0.64/Alias Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve dir ectory=logs prefix=home_access_log. suffix=.txt pattern=common resolveH osts=false/ /Host Host name=10.7.0.81 debug=0 appBase=/opt/jakarta-tomcat-5.0.18/webapps/ROO T/lnholdings Alias10.7.0.58/Alias Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve dire ctory=logs prefix=home_access_log. suffix=.txt pattern=common resolveHo sts=false/ /Host Host name=10.7.0.82 debug=0 appBase=/opt/jakarta-tomcat-5.0.18/webapps/ROO T/liquidnet Alias10.7.0.66/Alias Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve di rectory=logs prefix=home_access_log. suffix=.txt pattern=common resolve Hosts=false/ /Host Host name=10.7.255.76 debug=0 appBase=/opt/jakarta-tomcat-5.0.18/webapps/R OOT/liquidnet Alias10.7.0.66/Alias Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve di rectory=logs prefix=home_access_log. suffix=.txt pattern=common resolve Hosts=false/ /Host Host name=10.7.255.77 debug=0 appBase=/opt/jakarta-tomcat-5.0.18/webapps/R OOT/legal Alias10.7.0.97/Alias Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve dir ectory=logs prefix=home_access_log. suffix=.txt pattern=common resolveH osts=false/ /Host Host name=10.7.0.83 debug=0 appBase=/opt/jakarta-tomcat-5.0.18/webapps/ROO T/legal Alias10.7.0.97/Alias Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve dir ectory=logs prefix=home_access_log. suffix=.txt pattern=common resolveH osts=false/ /Host /Engine /Service /Server - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] AdmID:3D566E6CC6E8FF1964FB3A7FF65275C3 - 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: Support and development of versions
Stephen Nelson-Smith wrote: Hi, So, I'm running an app which the development house say *has* to run on 4.1.31. I'm not especially happy about this, and will try running it under 4.1.37, but the developers say they *might* be able to get it to run under 5.5. I seem to recall a conversation in which I was told that 5.5 isn't really actively supported or developed any more either. Is this the case? Am I best to try to pressure the developers to get the system to run on 6? Or will 4.1 be sound for a while yet, as long as I can keep on top of bug/security fixes? 4.1.37 is probably your best short-term solution, and work toward 6.x in the mid-to-long term. Thanks, S. - 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: Support and development of versions
On Thu, Feb 28, 2008 at 2:37 PM, David kerber [EMAIL PROTECTED] wrote: 4.1.37 is probably your best short-term solution, and work toward 6.x in the mid-to-long term. That was my gut feeling. Could you explain why that is? Is 5.5 a wasteland? I'll need to understand the rationale behind the recommendation to make it stick with the development team. S. - 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: Support and development of versions
From: Stephen Nelson-Smith [mailto:[EMAIL PROTECTED] Subject: Re: Support and development of versions Is 5.5 a wasteland? It's not a wasteland, whereas 5.0 is. However, the most attention goes to the current level, while 4.1 and 5.5 activity is pretty much limited to only serious bug fixes. You definitely don't want to target for a level that's already outdated. - 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: Support and development of versions
Stephen Nelson-Smith wrote: On Thu, Feb 28, 2008 at 2:37 PM, David kerber [EMAIL PROTECTED] wrote: 4.1.37 is probably your best short-term solution, and work toward 6.x in the mid-to-long term. That was my gut feeling. Could you explain why that is? Is 5.5 a wasteland? I'll need to understand the rationale behind the recommendation to make it stick with the development team. Actually, 5.5.x is quite good and I use it in production, but it's in kind of a no-man's land development-wise. Since 6.x has been around for a year or so, it's stable, and it's most likely getting the bulk of the development effort, and you know that 5.5.x development is going to be stopped before 6.x is, at some point in the future. If you're porting an app from 4.x to something newer anyway, you might as well port to the one you know is going to have the longest lifetime, instead of using a mid-term version. If your app was already written for 5, I'd say stick with that line, but I wouldn't do new development or older-version porting to it. D - 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 send http response in several chunked package with Tomcat
Hi Filip, Seems the method has a problem : tomcat puts the http header and part of the body in the same chunk. But I hope to generate the response in below format: Suppose I need use String tmp as the response, tmp = part1 + part2 + part3+part4; we use 4 tcp frame totally for the http response: Frame 1: only carry the httpheader, no chunk in the frame Frame 2: includes the first chunk, carries part1+part2; Frame 3: includes the second chunk, carries part3+part4; Frame 4: includes a chunk whose length is 0, tells client it's the end of chunks; However Tomcat generate the response in such way: Frame 1: includes httpheader and the first chunk, 1st chunk carries part1; Frame 2: includes part2 + part3; Frame3 and Frame4 are same with above; So how can I make sure there is only http header in the first frame? Thanks. Han -Original Message- From: Hanks Wang (hanwan) Sent: Thursday, February 28, 2008 10:26 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Filip, Yes it works. Thanks a lot! Christopher, in fact I'm writing a servlet to fool a management software, So I need make sure the servlet response is as close to real device as possible. Thanks for everyone's help. B.R Han -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 11:24 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat you don't need to do that, tomcat does it for you. all you need to do is while (havedata) { response.getOutputStream().println(some data) response.flushBuffer() } and tomcat takes care of the rest Filip Hanks Wang (hanwan) wrote: Hi Johnny, I try below method implement the chunk in code: String tmp = something very long; String hlen = Integer.toHexString(tmp.length()); hlen = hlen +\r\n + tmp.toString(); String chunkend = Integer.toHexString(0)+\r\n; response.getOutputStream().println(hlen); response.getOutputStream().println(chunkend); I created two http chunk successfully by this way. The first chunk is the data which wraps tmp, the second is the end chunk. But the question is, all these chunk and http header are in same frame (get it from wireshark.). How can I put them in different frame? Which means we need 3 frame for the case: the first frame will carry the http header, the second will carry the first chunk data, the last frame will carry the end chunk. Does it mean I need control the tcp/ip protocol? It's impossible, right? B.R Han -Original Message- From: Hanks Wang (hanwan) Sent: Wednesday, February 27, 2008 3:40 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Johnny, Thanks a lot. I read the http RFC and find something like this: The chunk-size field is a string of hex digits indicating the size of the chunk. The chunked encoding is ended by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line. Do u have any tutorial of ChunkedOutputFilter? I can't find anything from its API document.. Thanks Han -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 7:41 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat -- -- --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. -- -- --- - Original Message - From: Hanks Wang (hanwan) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, February 26, 2008 12:02 PM Subject: how to send http response in several chunked package with Tomcat Hi all, Is there a way to make tomcat generate http response in chunked-encoding style? suppose I have a file resp.log and I can parse it in byte[], how can I send the byte array in several chunked package? Hanks I have just started looking at this, so no expert but I did notice ChunkedInputFilter,ChunkedOutputFilter I think your answer is in setting a filter in normal Http I notice that chunking happens automatically if header size ommited, but with so much control of the socket I think you have to pump it thru a filter and then there must be a way to say last chuck... and start chuck... Short of that one would have to set headers themselves and add trailing 0's and end sequences, so I think those classes are specific to http11 a guess Any suggestion is welcome! Thanks Han - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
Re: Incorrect cookie value in tomcat5.5.26
I haven't looked at the code, but give this is a shot Cookie cookie = new Cookie(Constants.REMEMBERME, \+username+\); cookie.setMaxAge(Integer.MAX_VALUE); response.addCookie(cookie); Filip Sushil Vegad wrote: Filip, As for the actual code, what I gave below is all there is to the cookie code. The test case too would be what I described below. I hadn't checked before, but we are facing this issue even with tomcat 5.0 when I do cookie.setVersion(1). The other thing I noticed with cookie.setVersion(1) on tomcat5.5.26 and tomcat5.0 is the cookie file is not being written under - C:\Documents and Settings\Sushil\Cookies. If you are looking for some specific code or need me to describe further, please let me know Thanks, Sushil -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 1:49 PM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 hi Sushil that scenario works just fine for me. you would have to show your actual code (and a test case) for me to analyze your actual problem Filip Sushil Vegad wrote: Hello Filip, Please let me know your thoughts on this. Our scenario is: We set the username in the cookie when the user logs in. I open a new browser instance, log-in and the cookie is set. If I logout of the application and return to login screen (on the same browser instance) the cookie is found. PROBLEM: If I use a NEW browser instance to go to the login page, the cookie is NOT found. On login submit, we set the cookie - Cookie cookie = new Cookie(Constants.REMEMBERME, username); cookie.setVersion(1); cookie.setMaxAge(Integer.MAX_VALUE); response.addCookie(cookie); On requesting the login page, we check if the cookie was set - Cookie cookies[] = request.getCookies(); String username = ; for (int i = 0; i cookies.length; i++) { Cookie c = cookies[i]; if (c.getName().equals(Constants.REMEMBERME)) { username = c.getValue();//Set username in the login field break; } } This code did not have an issue with tomcat 5.0 Thanks, Sushil -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 6:54 PM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 what is your scenario, the following code worked for me, even though the browser doesn't send up cookie version % javax.servlet.http.Cookie[] cs = request.getCookies(); String value = null; for (Cookie co : cs) { if (test.equals(co.getName())) value = co.getValue(); } javax.servlet.http.Cookie c = new javax.servlet.http.Cookie(test,someemail=somedomain.com); c.setVersion(1); c.setMaxAge(100); response.addCookie(c); % done!br/ %=value% Sushil Vegad wrote: Hello, cookie.setVersion(1) remembers the cookie only for the browser session. A new browser does not have access to the cookie We did cookie.setMaxAge(Integer.MAX_VALUE) but that doesn't help. Any thoughts please? Thanks, Sushil Vegad Technical Lead, Scheduling Project Serebrum Corporation - translating strategy into results Work: 609.777.3563 Cell: 732.216.4908 Email: [EMAIL PROTECTED] Conference Dial-in: 1-218-486-1300, Bridge: 427526 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, February 11, 2008 11:54 AM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 not broken, corrected. the java doc says setValue public void *setValue*(String http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html newValue) Assigns a new value to a cookie after the cookie is created. If you use a binary value, you may want to use BASE64 encoding. With Version 0 cookies, values should not contain white space, brackets, parentheses, equals signs, commas, double quotes, slashes, question marks, at signs, colons, and semicolons. Empty values may not behave the same way on all browsers. *Parameters:* |newValue| - a |String| specifying the new value to fix this, all you need to do is cookie.setVersion(1); Filip Konstantin Kolinko wrote: I guess the cause is the same as for tomcat 6.0.16. See messages entitles Cookies are broken in 6.0.16?. http://www.nabble.com/Cookies-are-broken-in-6.0.16--to15369118.html - 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
Re: Tomcat 6 Cluster multicast problem
you probably have a 5.5 instance running on the same multicast address somewhere, and so your 6.0.16 instance is getting packages from a node you don't know about give you TC6 instances a new multicast address or port Filip Martin Kristensen wrote: Hi, I am trying to upgrade two Tomcat 5.5 servers to version 6.0.16, but I´m having a problem with the cluster settings. The two current servers are using clustering now, and it is working fine, but when trying to port this to version 6, I get the following error: Feb 28, 2008 2:12:43 PM org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread run WARNING: Error receiving mcast package. Sleeping 500ms java.lang.IllegalArgumentException: Invalid package, should start with:{84, 82, 73, 66, 69, 83, 45, 66} at org.apache.catalina.tribes.membership.MemberImpl.getMember( MemberImpl.java:322) at org.apache.catalina.tribes.membership.MemberImpl.getMember( MemberImpl.java:298) at org.apache.catalina.tribes.membership.MemberImpl.getMember( MemberImpl.java:403) at org.apache.catalina.tribes.membership.McastServiceImpl.receive( McastServiceImpl.java:319) at org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run( McastServiceImpl.java:413) Both servers are starting up and working fine by themselves, but I need clustering to work. Can you help me please? Here is server.xml for server 1: Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Service name=Catalina Connector port=8080 protocol=HTTP/1.1 maxThreads=150 connectionTimeout=2 redirectPort=8443 / Connector port=11009 protocol=AJP/1.3 redirectPort=8443 / Engine name=Standalone defaultHost=localhost jvmRoute=tomcat1 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster channelSendOptions=8 Manager className=org.apache.catalina.ha.session.DeltaManager expireSessionsOnShutdown=false notifyListenersOnReplication=true/ Channel className=org.apache.catalina.tribes.group.GroupChannel Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver address=auto port=4001 autoBind=100 selectorTimeout=5000 maxThreads=6/ Sender className=org.apache.catalina.tribes.transport.ReplicationTransmitter Transport className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/ /Sender Interceptor className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector / Interceptor className= org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor Member className=org.apache.catalina.tribes.membership.StaticMember port=4000 securePort=-1 host=localhost domain=staging-cluster uniqueId={0,1,2,3,4,5,6,7,8,9}/ /Interceptor Interceptor className= org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor / /Channel Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.* \.html;.*\.css;.*\.txt;/ Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve/ Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer tempDir=/temp/war-temp deployDir=/temp/webapps/ watchDir=/temp/war-listen/ watchEnabled=false/ ClusterListener className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/ ClusterListener className=org.apache.catalina.ha.session.ClusterSessionListener/ /Cluster Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server Here is server.xml for server 2: Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Service name=Catalina Connector port=8080 protocol=HTTP/1.1 maxThreads=150 connectionTimeout=2 redirectPort=8443 / Connector port=11009 protocol=AJP/1.3
Re: how to send http response in several chunked package with Tomcat
//first flush headers response.flushBuffer() //then flush body while (havedata) { response.getOutputStream().println(some data) response.flushBuffer() } you need to put your thinker hat on Hanks :) Hanks Wang (hanwan) wrote: Hi Filip, Seems the method has a problem : tomcat puts the http header and part of the body in the same chunk. But I hope to generate the response in below format: Suppose I need use String tmp as the response, tmp = part1 + part2 + part3+part4; we use 4 tcp frame totally for the http response: Frame 1: only carry the httpheader, no chunk in the frame Frame 2: includes the first chunk, carries part1+part2; Frame 3: includes the second chunk, carries part3+part4; Frame 4: includes a chunk whose length is 0, tells client it's the end of chunks; However Tomcat generate the response in such way: Frame 1: includes httpheader and the first chunk, 1st chunk carries part1; Frame 2: includes part2 + part3; Frame3 and Frame4 are same with above; So how can I make sure there is only http header in the first frame? Thanks. Han -Original Message- From: Hanks Wang (hanwan) Sent: Thursday, February 28, 2008 10:26 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Filip, Yes it works. Thanks a lot! Christopher, in fact I'm writing a servlet to fool a management software, So I need make sure the servlet response is as close to real device as possible. Thanks for everyone's help. B.R Han -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 11:24 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat you don't need to do that, tomcat does it for you. all you need to do is while (havedata) { response.getOutputStream().println(some data) response.flushBuffer() } and tomcat takes care of the rest Filip Hanks Wang (hanwan) wrote: Hi Johnny, I try below method implement the chunk in code: String tmp = something very long; String hlen = Integer.toHexString(tmp.length()); hlen = hlen +\r\n + tmp.toString(); String chunkend = Integer.toHexString(0)+\r\n; response.getOutputStream().println(hlen); response.getOutputStream().println(chunkend); I created two http chunk successfully by this way. The first chunk is the data which wraps tmp, the second is the end chunk. But the question is, all these chunk and http header are in same frame (get it from wireshark.). How can I put them in different frame? Which means we need 3 frame for the case: the first frame will carry the http header, the second will carry the first chunk data, the last frame will carry the end chunk. Does it mean I need control the tcp/ip protocol? It's impossible, right? B.R Han -Original Message- From: Hanks Wang (hanwan) Sent: Wednesday, February 27, 2008 3:40 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Johnny, Thanks a lot. I read the http RFC and find something like this: The chunk-size field is a string of hex digits indicating the size of the chunk. The chunked encoding is ended by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line. Do u have any tutorial of ChunkedOutputFilter? I can't find anything from its API document.. Thanks Han -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 7:41 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat -- -- --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. -- -- --- - Original Message - From: Hanks Wang (hanwan) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, February 26, 2008 12:02 PM Subject: how to send http response in several chunked package with Tomcat Hi all, Is there a way to make tomcat generate http response in chunked-encoding style? suppose I have a file resp.log and I can parse it in byte[], how can I send the byte array in several chunked package? Hanks I have just started looking at this, so no expert but I did notice ChunkedInputFilter,ChunkedOutputFilter I think your answer is in setting a filter in normal Http I notice that chunking happens automatically if header size ommited, but with so much control of the socket I think you have to pump it thru a filter and then there must be a way to say last chuck... and start chuck... Short of that one would have to set headers themselves and add trailing 0's and end sequences, so I think those classes are
Does tomcat support multicores
Os - WinXP CPU - Intel Quad Core Hi I'm running a tomcat server, and would like to know if Tomcat can make use of multiple cores? When I max the server out, all 4 cores see little usage however the java process never uses more than 25%. So this makes me believe that Tomcat does not make use of a multicore system. Would I benefit from running more than one instance and setup load bearing between the two? Thanks James Law Search all of our current vacancies at www.generic-software.com The information contained within this message is intended for the addressee only and may contain confidential and/or privileged information. If you are not the addressee, please delete this message and notify the sender - you should not copy, distribute or disclose its contents to other parties. Any images, documents, views or opinions expressed in this message are those of the sender and do not necessarily represent those of Generic Software Consultants Ltd or any of its affiliates. No reliance may be placed on this message without written confirmation from an authorised company representative, and no actions should be taken based on its contents. Generic Software Consultants Ltd Registered in England No. 2830109 @ St. Andrews House, Caldecotte Lake Drive, Caldecotte Business Park, Milton Keynes. MK7 8LE Tel: 01908 278450 VAT Registered No: 608 6625 28
Re: Does tomcat support multicores
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James, James Law wrote: | Os - WinXP | | CPU - Intel Quad Core | | Hi I'm running a tomcat server, and would like to know if Tomcat can | make use of multiple cores? When I max the server out, all 4 cores see | little usage however the java process never uses more than 25%. Sounds like you haven't really maxed-out your server. What is your definition of maxed-out? | So this makes me believe that Tomcat does not make use of a multicore | system. Just like most hardware resource questions in Tomcat, it all comes down to the JVM + the OS. Tomcat itself neither enables nor disables this capability. The JVM supports multiple threads. The OS supports threads. Presumably, the OS is smart enough to allow threads from a single process to run on any CPU (or core). | Would I benefit from running more than one instance and setup load | bearing between the two? Probably not. I would venture a guess that you are seeing appropriate resource usage for your load scenario. What does maxed-out mean, and why do you think you are in that state? Can you see which processor(s) is(are) running java.exe (or whatever) processes, or are you just looking at the overall CPU-usage meter and seeing that it shows 25% total CPU usage? There's also the possibility that your application is I/O-bound instead of CPU bound, meaning that the CPU is spending most of the time waiting around for data to move around instead of performing calculations and whatnot. That wouldn't be a surprise given that network transfer speeds are relatively slow compared to bus speeds and the rate at which your CPU(s) can process information. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfG2xgACgkQ9CaO5/Lv0PARPACePFKMUrk6BWYH6Ym2sAsMtAmR VfwAn0/nesfQGN0I1NipHbuSY9dMyJl6 =wnSS -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: Realms and Remote Address
Chris, Thanks for all your help so far. I have the Security Filter working now (I had never used filters before, so I had a lot of reading to do), and my bespoke realm is now inheriting from SimpleSecurityRealmBase instead of Realm, and is now located in my application instead of in a jar in tomcat/server/lib). Although this still doesn't appear to give me access to the IP address. I have tried to find the FlexibleRealmInterface you mentioned, but can only find one mention of it on the entire internet, and that is in another post you made on a different mailing list. Where do I get this? Kerrin On 27/02/2008 at 14:19, in message [EMAIL PROTECTED], Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kerrin, Kerrin Hardy wrote: | I have investigated Security Filter, and I don't see how that gives | me access to the IP address of the client. You have to implement your own Realm. If you use FlexibleRealmInterface, you have access to the entire HttpServletRequest, including things like the IP address. I have used this technique myself to do exactly as you desire. | It is upmost importance that I log the IP address of both successful | and unsuccessful logon attempts, which is why this must be done | outside the application. In any case, you will have to either hack the Tomcat authentication code or disable container-manager authentication, since Tomcat intercepts all authentication requests and your code will never have a chance. That's why I suggested sf. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ( http://enigmail.mozdev.org/ ) iEYEARECAAYFAkfFcXsACgkQ9CaO5/Lv0PCk8wCgmedUvzj0F5anfYO8JV9bwu+i KjgAoKR4/RnUthp1naytQbIWYNT/8wa2 =xjlg -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: Does tomcat support multicores
From: James Law [mailto:[EMAIL PROTECTED] Subject: Does tomcat support multicores Hi I'm running a tomcat server, and would like to know if Tomcat can make use of multiple cores? Of course - assuming your JVM does (and any modern JVM does - but you didn't bother to mention which one you're using). The fact that you're not seeing much CPU utilization simply means your tests are limited by something else, such as I/O or database access. - 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: Does tomcat support multicores
From: Caldarale, Charles R Subject: RE: Does tomcat support multicores From: James Law [mailto:[EMAIL PROTECTED] Subject: Does tomcat support multicores Hi I'm running a tomcat server, and would like to know if Tomcat can make use of multiple cores? Of course - assuming your JVM does And your OS. Doesn't XP limit itself to two cores? - 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: Does tomcat support multicores
It works just fine! My guess would be that the load you're putting on it is single threaded, so there's only a single thread executing on the server. You're really only asking it to do one thing at a time. Make sure that you're running multiple concurrent loads. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 11:03 AM To: Tomcat Users List Subject: Re: Does tomcat support multicores -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James, James Law wrote: | Os - WinXP | | CPU - Intel Quad Core | | Hi I'm running a tomcat server, and would like to know if Tomcat can | make use of multiple cores? When I max the server out, all 4 cores see | little usage however the java process never uses more than 25%. Sounds like you haven't really maxed-out your server. What is your definition of maxed-out? | So this makes me believe that Tomcat does not make use of a multicore | system. Just like most hardware resource questions in Tomcat, it all comes down to the JVM + the OS. Tomcat itself neither enables nor disables this capability. The JVM supports multiple threads. The OS supports threads. Presumably, the OS is smart enough to allow threads from a single process to run on any CPU (or core). | Would I benefit from running more than one instance and setup load | bearing between the two? Probably not. I would venture a guess that you are seeing appropriate resource usage for your load scenario. What does maxed-out mean, and why do you think you are in that state? Can you see which processor(s) is(are) running java.exe (or whatever) processes, or are you just looking at the overall CPU-usage meter and seeing that it shows 25% total CPU usage? There's also the possibility that your application is I/O-bound instead of CPU bound, meaning that the CPU is spending most of the time waiting around for data to move around instead of performing calculations and whatnot. That wouldn't be a surprise given that network transfer speeds are relatively slow compared to bus speeds and the rate at which your CPU(s) can process information. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfG2xgACgkQ9CaO5/Lv0PARPACePFKMUrk6BWYH6Ym2sAsMtAmR VfwAn0/nesfQGN0I1NipHbuSY9dMyJl6 =wnSS -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: Does tomcat support multicores
We use a program called WAPT to ramp up the amount of requests sent to Tomcat, probably not the best way going off what has been said. It got to the point were it the Java process never go above 25% cpu usage while the memory usage increases accordingly. Which is why I assumed it would not making proper use of the cores. Currently using Java 1.6. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: 28 February 2008 16:03 To: Tomcat Users List Subject: Re: Does tomcat support multicores -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James, James Law wrote: | Os - WinXP | | CPU - Intel Quad Core | | Hi I'm running a tomcat server, and would like to know if Tomcat can | make use of multiple cores? When I max the server out, all 4 cores see | little usage however the java process never uses more than 25%. Sounds like you haven't really maxed-out your server. What is your definition of maxed-out? | So this makes me believe that Tomcat does not make use of a multicore | system. Just like most hardware resource questions in Tomcat, it all comes down to the JVM + the OS. Tomcat itself neither enables nor disables this capability. The JVM supports multiple threads. The OS supports threads. Presumably, the OS is smart enough to allow threads from a single process to run on any CPU (or core). | Would I benefit from running more than one instance and setup load | bearing between the two? Probably not. I would venture a guess that you are seeing appropriate resource usage for your load scenario. What does maxed-out mean, and why do you think you are in that state? Can you see which processor(s) is(are) running java.exe (or whatever) processes, or are you just looking at the overall CPU-usage meter and seeing that it shows 25% total CPU usage? There's also the possibility that your application is I/O-bound instead of CPU bound, meaning that the CPU is spending most of the time waiting around for data to move around instead of performing calculations and whatnot. That wouldn't be a surprise given that network transfer speeds are relatively slow compared to bus speeds and the rate at which your CPU(s) can process information. - -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Search all of our current vacancies at www.generic-software.com The information contained within this message is intended for the addressee only and may contain confidential and/or privileged information. If you are not the addressee, please delete this message and notify the sender - you should not copy, distribute or disclose its contents to other parties. Any images, documents, views or opinions expressed in this message are those of the sender and do not necessarily represent those of Generic Software Consultants Ltd or any of its affiliates. No reliance may be placed on this message without written confirmation from an authorised company representative, and no actions should be taken based on its contents. Generic Software Consultants Ltd Registered in England No. 2830109 @ St. Andrews House, Caldecotte Lake Drive, Caldecotte Business Park, Milton Keynes. MK7 8LE Tel: 01908 278450 VAT Registered No: 608 6625 28
RE: Incorrect cookie value in tomcat5.5.26
Filip, That does it - set the cookie value in quotes and remove the cookie.setVersion(1) on tomcat 5.5.26. I can now see the cookie file being written under C:\Documents and Settings\Sushil\Cookies. A new browser instance is also picking up the cookie. Looks like the setVersion(1) sets the cookie only for the browser session Thanks again for you help. Sushil -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 10:43 AM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 I haven't looked at the code, but give this is a shot Cookie cookie = new Cookie(Constants.REMEMBERME, \+username+\); cookie.setMaxAge(Integer.MAX_VALUE); response.addCookie(cookie); Filip Sushil Vegad wrote: Filip, As for the actual code, what I gave below is all there is to the cookie code. The test case too would be what I described below. I hadn't checked before, but we are facing this issue even with tomcat 5.0 when I do cookie.setVersion(1). The other thing I noticed with cookie.setVersion(1) on tomcat5.5.26 and tomcat5.0 is the cookie file is not being written under - C:\Documents and Settings\Sushil\Cookies. If you are looking for some specific code or need me to describe further, please let me know Thanks, Sushil -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 1:49 PM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 hi Sushil that scenario works just fine for me. you would have to show your actual code (and a test case) for me to analyze your actual problem Filip Sushil Vegad wrote: Hello Filip, Please let me know your thoughts on this. Our scenario is: We set the username in the cookie when the user logs in. I open a new browser instance, log-in and the cookie is set. If I logout of the application and return to login screen (on the same browser instance) the cookie is found. PROBLEM: If I use a NEW browser instance to go to the login page, the cookie is NOT found. On login submit, we set the cookie - Cookie cookie = new Cookie(Constants.REMEMBERME, username); cookie.setVersion(1); cookie.setMaxAge(Integer.MAX_VALUE); response.addCookie(cookie); On requesting the login page, we check if the cookie was set - Cookie cookies[] = request.getCookies(); String username = ; for (int i = 0; i cookies.length; i++) { Cookie c = cookies[i]; if (c.getName().equals(Constants.REMEMBERME)) { username = c.getValue();//Set username in the login field break; } } This code did not have an issue with tomcat 5.0 Thanks, Sushil -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 6:54 PM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 what is your scenario, the following code worked for me, even though the browser doesn't send up cookie version % javax.servlet.http.Cookie[] cs = request.getCookies(); String value = null; for (Cookie co : cs) { if (test.equals(co.getName())) value = co.getValue(); } javax.servlet.http.Cookie c = new javax.servlet.http.Cookie(test,someemail=somedomain.com); c.setVersion(1); c.setMaxAge(100); response.addCookie(c); % done!br/ %=value% Sushil Vegad wrote: Hello, cookie.setVersion(1) remembers the cookie only for the browser session. A new browser does not have access to the cookie We did cookie.setMaxAge(Integer.MAX_VALUE) but that doesn't help. Any thoughts please? Thanks, Sushil Vegad Technical Lead, Scheduling Project Serebrum Corporation - translating strategy into results Work: 609.777.3563 Cell: 732.216.4908 Email: [EMAIL PROTECTED] Conference Dial-in: 1-218-486-1300, Bridge: 427526 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, February 11, 2008 11:54 AM To: Tomcat Users List Subject: Re: Incorrect cookie value in tomcat5.5.26 not broken, corrected. the java doc says setValue public void *setValue*(String http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html newValue) Assigns a new value to a cookie after the cookie is created. If you use a binary value, you may want to use BASE64 encoding. With Version 0 cookies, values should not contain white space, brackets, parentheses, equals signs, commas, double quotes, slashes, question marks, at signs, colons, and semicolons. Empty values may not behave the same way on all browsers. *Parameters:* |newValue| - a |String| specifying the new value to fix this, all you need to do is cookie.setVersion(1); Filip Konstantin Kolinko wrote: I guess the cause is the same as for tomcat 6.0.16. See messages entitles Cookies are broken in 6.0.16?.
Re: Does tomcat support multicores
tomcat is core agnostic, it lets the JVM handle it, and the answer is yes, most JVMs will support multi core machines Filip James Law wrote: Os - WinXP CPU - Intel Quad Core Hi I'm running a tomcat server, and would like to know if Tomcat can make use of multiple cores? When I max the server out, all 4 cores see little usage however the java process never uses more than 25%. So this makes me believe that Tomcat does not make use of a multicore system. Would I benefit from running more than one instance and setup load bearing between the two? Thanks James Law Search all of our current vacancies at www.generic-software.com The information contained within this message is intended for the addressee only and may contain confidential and/or privileged information. If you are not the addressee, please delete this message and notify the sender - you should not copy, distribute or disclose its contents to other parties. Any images, documents, views or opinions expressed in this message are those of the sender and do not necessarily represent those of Generic Software Consultants Ltd or any of its affiliates. No reliance may be placed on this message without written confirmation from an authorised company representative, and no actions should be taken based on its contents. Generic Software Consultants Ltd Registered in England No. 2830109 @ St. Andrews House, Caldecotte Lake Drive, Caldecotte Business Park, Milton Keynes. MK7 8LE Tel: 01908 278450 VAT Registered No: 608 6625 28 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.1/1302 - Release Date: 2/27/2008 4: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]
Use of VirtualWebappLoader
When I attempt to use the virtual webapp loader, I get the following error: java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: start: : java.lang.ClassCastException: org.apache.catalina.loader.VirtualWebappLoader cannot be cast to org.apache.catalina.loader.WebappClassLoader However, when I subclass WebappClassLoader and create my own equivalent of VirtualWebappLoader, the start() method doesn't seem to get called nor does my custom property seem to get set. Any ideas what I'm doing wrong? - 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: Apache/Tomcat - mod_jk issues
No worries, happens to the best of us. I don't think tomcat is a reserved worker name - that said, I've seen stranger things... Anyway, regarding your host question, it depends. localhost should work fine out of the box if your apache/tomcat are running on the same server (assuming your hosts file is setup correctly, which it should be for localhost). We're running it all on apache load balancers and they hand off the JK mounts to the Tomcat server computers as appropriate. For the host parameter to work correctly I think all you'll need to ensure is that either the host value is mapped correctly in the hosts file or in DNS - we use DNS. Next up, what exactly happens when you try to go to a Tomcat URL? Do you get a 404? Regardless of whether you do or not, do you get any type of error? Is the error an Apache error or Tomcat error? If you haven't change the defaults of Apache or Tomcat, an Apache error will generally tell you the apache version in black text whereas the Tomcat error page usually has green or grey colored bars across it and will not display anything about Apache. If you get an Apache error, it's definitely not going to Tomcat-land and if it gets to Tomcat-land, then your Apache configuration is probably correct. I would next suggest turning up your JK logging and monitor your request logging to make sure 1) your requests are coming through and look as you expect them (in your apache access log), and then 2) look at your mod_jk log to see what's going on. Another thing to make sure is that Tomcat is listening on port 8009. Not sure what platform you're on, but a netstat -a will tell you which ports are active - you should see 8009. And on that note, make sure your ports.conf file has you listening on both port 80 and 443. --adam Lessie Z. Mitch wrote: Thank you Adam! 1- eepers! Okay, that was overlooked! Changed that. ^.^ 2- Not everything is secure (https). SSL is configured outside of the httpd.conf file for security reasons and defined in conf.d/someotherfile.conf, with conf.d being included (see previous post) 3- context files are located in their respective directories within catalin home (/tomcat_home/conf/Catalina/mydomain1.com et al) I followed option #2 of http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html Okay, fixed the virtual Host: JkMount /*.jsp tomcat JkMount /servlet/* tomcat Restarted, yet Apache is still not handing off to TC. The TC serves up my webapps fine when standalone (either as 80 or 8080). Should the localhost property in workers.properties be changed to the IP (or domain name) of the designated webapp? IE: /somedirectory/worker.properties worker.list=tomcat worker.tomcat.host=localhost change localhost to 123.234.345.1 or mydomain.com??? worker.tomcat.port=8009 worker.tomcat.type=ajp13 ~LZM~ -Original Message- From: Adam Gordon [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 12:39 PM To: Tomcat Users List Subject: Re: Apache/Tomcat - mod_jk issues Lessie- Sorry to hear you're having trouble. We use Apache/Tomcat in the same way and assuming your snippets are reasonably complete I've noticed some issues that may or may not be helping to cause problems: 1. First and foremost, your worker list defines the worker name as tomcat yet in your J/K mount in your VirtualHost you say ajp13 as the worker name. I.e., JkMount /*.jsp ajp13 should be JkMount /*.jsp tomcat. 2. While I've not used the redirectPort attribute on the Connector element, I'm assuming you are redirecting everything to HTTPS. If this is the case, I'm curious as to why you don't define either SSLCertificateFile or SSLCertificateKeyFile in your VirtualHost. We have to to ensure the right certificate is served up with the right IP since we don't have a site domain certificate. 3. I don't see them but I'm also assuming that each of your webapps have their own Context defined in the META-INF directory. That's all I noticed after a quick glance, but the biggie is #1. Let us know how it goes. --adam No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008 9:08 AM - 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: Apache/Tomcat - mod_jk issues
Chris- That makes sense, because the SSL is between the web server and the browser, and not a connector between two web servers - I've just never used it so at first glance it looks like it redirects incoming traffic to port 8443, which is Tomcat's default SSL port... Thanks for the clarification. --adam Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adam, Adam Gordon wrote: | 2. While I've not used the redirectPort attribute on the Connector | element, I'm assuming you are redirecting everything to HTTPS. If this | is the case, I'm curious as to why you don't define either | SSLCertificateFile or SSLCertificateKeyFile in your VirtualHost. We | have to to ensure the right certificate is served up with the right IP | since we don't have a site domain certificate. AJP doesn't do encryption, so any redirectPort would be expected to point to an HTTPS connection, which would be handled by something other than the AJP connector. Therefore, no SSL configuration on the AJP connector is necessary. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfFcM0ACgkQ9CaO5/Lv0PAkDgCgnJ1x4OC5hAnd5PVuyAyiUT1d oMkAoKU5DTG2jd/busAKlssQ5MWAIj68 =B4kk -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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tuning Tomcat in Open VMS
I have a tuning question for Tomcat 55 under Open VMS: should Java and tomcat be installed on a system device or with other user applications? Thank you, Alex Alex Chelminsky [EMAIL PROTECTED] 781-290-1620 (office) 617-650-5453 (cell) 781-890-1208 (fax) CSC Consulting, Inc. Registered Office: 29 Sawyer Road, Waltham Massachusetts 02453, USA Registered in USA No: 042593545 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Virtual-Host issues on Apache-Tomcat
I'm trying to a subdomain to our site but Tomcat is not finding the index page correctly. Here are my entries into httpd.conf and server.xml: VirtualHost * ServerName foo.site.com DocumentRoot /usr/local/apache/htdocs/foo CustomLog /usr/local/apache/logs/foo.site.com_access_log combined ErrorLog /usr/local/apache/logs/redirect.log /VirtualHost Host name=foo.site.com unpackWARs=true autoDeploy=false Context path= docBase=/usr/local/apache/htdocs/foo / /Host When I type http://foo.site.com/ I get a 404 - /index.jsp error. Must I specify the exact page, ie. index.jsp in the configuration urls or what? thanks
Re: Support and development of versions
Stephen Nelson-Smith wrote: On Thu, Feb 28, 2008 at 2:37 PM, David kerber [EMAIL PROTECTED] wrote: 4.1.37 is probably your best short-term solution, and work toward 6.x in the mid-to-long term. That was my gut feeling. Could you explain why that is? Is 5.5 a wasteland? I'll need to understand the rationale behind the recommendation to make it stick with the development team. Current status is available from: http://wiki.apache.org/tomcat/TomcatVersions 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]
Re: Virtual-Host issues on Apache-Tomcat
Jonathan Mast wrote: I'm trying to a subdomain to our site but Tomcat is not finding the index page correctly. Here are my entries into httpd.conf and server.xml: VirtualHost * ServerName foo.site.com DocumentRoot /usr/local/apache/htdocs/foo CustomLog /usr/local/apache/logs/foo.site.com_access_log combined ErrorLog /usr/local/apache/logs/redirect.log /VirtualHost Host name=foo.site.com unpackWARs=true autoDeploy=false Context path= docBase=/usr/local/apache/htdocs/foo / /Host I really wouldn't do that. Overlapping the httpd DocumentRoot and a Tomcat docBase will open up a bunch of security issues unless you are extremely careful and know exactly what you are doing. You don't mention: - httpd version - Tomcat version - how you have linked the two 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]
Re: Virtual-Host issues on Apache-Tomcat
sorry Tomcat 5.5.1 Apache 1.3.33 Java 1.4.2 On Thu, Feb 28, 2008 at 1:19 PM, Mark Thomas [EMAIL PROTECTED] wrote: Jonathan Mast wrote: I'm trying to a subdomain to our site but Tomcat is not finding the index page correctly. Here are my entries into httpd.conf and server.xml: VirtualHost * ServerName foo.site.com DocumentRoot /usr/local/apache/htdocs/foo CustomLog /usr/local/apache/logs/foo.site.com_access_log combined ErrorLog /usr/local/apache/logs/redirect.log /VirtualHost Host name=foo.site.com unpackWARs=true autoDeploy=false Context path= docBase=/usr/local/apache/htdocs/foo / /Host I really wouldn't do that. Overlapping the httpd DocumentRoot and a Tomcat docBase will open up a bunch of security issues unless you are extremely careful and know exactly what you are doing. You don't mention: - httpd version - Tomcat version - how you have linked the two 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]
Re: Virtual-Host issues on Apache-Tomcat
Jonathan Mast wrote: sorry Tomcat 5.5.1 Apache 1.3.33 Java 1.4.2 And you are linking httpd and Tomcat how? 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]
Re: Does tomcat support multicores
What kind of work is Tomcat doing for each request that WAPT sends in? For example, if you were doing something that had to go back to a database, and you had a bad sync block in your code somewhere, or didn't have enough connections in your DB pool, that could cause it to behave like it is single threaded - because all of the threads / cores are contending for some shared resource. Or, if you are just serving pages, perhaps you are disk bound, and your disk drive just isn't fast enough. Or, perhaps you have reached the limit of how much load WAPT can generate. There are lots of avenues to explore here, but they are all implementation specific. Dan - 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: Does tomcat support multicores
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James, James Law wrote: | We use a program called WAPT to ramp up the amount of requests sent | to Tomcat, probably not the best way going off what has been said. It | got to the point were it the Java process never go above 25% cpu | usage while the memory usage increases accordingly. Which is why I | assumed it would not making proper use of the cores. Currently using | Java 1.6. How many concurrent connections was that relative to the maximum connections your Connector will accept? It's possible you've just exhausted your connection pool, and the machine simply will not accept more work to do. This is a good position to be in ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfHE50ACgkQ9CaO5/Lv0PBy5QCbBdJJ8SdfCpWPYdhbQydlstWa DZMAoJ+1JXluDBBykqdM9yTbQCthw+2c =/AQr -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: Does tomcat support multicores
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: | From: Caldarale, Charles R | Subject: RE: Does tomcat support multicores | | From: James Law [mailto:[EMAIL PROTECTED] | Subject: Does tomcat support multicores | | Hi I'm running a tomcat server, and would like to know if Tomcat can | make use of multiple cores? | Of course - assuming your JVM does | | And your OS. Doesn't XP limit itself to two cores? I don't think so. And if it does, it certainly does different things based upon the packaging of the OS you got -- like server versus home or whatever. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfHE/UACgkQ9CaO5/Lv0PD+zgCeOuojLm48BSrET1mlysJtf+K0 pyIAoMGnywDMOXLddlXN4v1uw43wB0Eb =rAwX -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: Realms and Remote Address
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kerrin, Kerrin Hardy wrote: | Thanks for all your help so far. No problem. | I have the Security Filter working now (I had never used filters | before, so I had a lot of reading to do), and my bespoke realm is now | inheriting from SimpleSecurityRealmBase instead of Realm, and is now | located in my application instead of in a jar in tomcat/server/lib). Good. | Although this still doesn't appear to give me access to the IP address. | I have tried to find the FlexibleRealmInterface you mentioned, but can | only find one mention of it on the entire internet, and that is in | another post you made on a different mailing list. | | Where do I get this? Aah, I see. FlexibleRealmInterface was only made available after the 2.0 release. You need to get the sources from CVS and build SF that way in order to get FlexibleRealmInterface. Oh course, you'll also need to use the JAR file you build from there in order to run your code (rather than the one you may have downloaded). We're working on a 2.1 release soonish so folks don't have to roll their own libraries to get the nice, new stuff. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfHFZYACgkQ9CaO5/Lv0PB0BACguNrmdCzb9RgJxqE2NwA/PO3A esYAn2rWKyE6fu7cs1uUl+dE5foUDG6e =GGhl -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: JkRequestLogFormat Options
Hi, btw, in your log format line you have %{JK_REQUEST_DURATON}n instead of %{JK_REQUEST_DURATION}n see the missing I. I am using 1.2.25 and i get times alike 0.0275 when using Apache 2.2 Rgds, Fred Ahmed Musa wrote: Hallo, I am logging the mod_jk Output through the Apache access_log - as written in the reference found under http://tomcat.apache.org/connectors-doc/reference/apache.html Because i want to get clearness about what exactly is going on in our system i use the following LogFormat: LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ \%{Cookie}i\ \%{Set-Cookie}o\ %{pid}P %{tid}P%T %{JK_WORKER_NAME}n %{JK_REQUEST_DURATON}n %{JK_WORKER_ROUTE}n %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_FIRST_VALUE}n %{JK_LB_FIRST_ACCESSED}n %{JK_LB_FIRST_READ}n %{JK_LB_FIRST_TRANSFERRED}n %{JK_LB_FIRST_ERRORS}n %{JK_LB_FIRST_ACTIVATION}n %{JK_LB_FIRST_STATE}n %{JK_LB_LAST_NAME}n mod_jk_log ...everthing works fine except the Options responsible for the Request Duration. Mostly neither %T nor %{JK_REQUEST_DURATON}n have a Value (%T mostly is 0 an the other Parameter is -). At some Requests i found the %T has a value like for example 2 or 3.. - and JK_REQUEST DURATION has - or %T is 0 and JK_REQUEST_DURATION has an value like 2 or 3 ... First - why are there not values at each request ? Second -i think both Options are measuring the same Value - why they are not the same ? Third - why they are not showing seconds.microseconds as written in the reference but only (I think so) rounded seconds. We use mod_jk 1.2.26 Thanks for help Best ahmed -- Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! http://games.entertainment.web.de/de/entertainment/games/free - 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/JkRequestLogFormat-Options-tp15736214p15745192.html 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: Support and development of versions
On Thu, Feb 28, 2008 at 6:15 PM, Mark Thomas [EMAIL PROTECTED] wrote: Stephen Nelson-Smith wrote: On Thu, Feb 28, 2008 at 2:37 PM, David kerber [EMAIL PROTECTED] wrote: 4.1.37 is probably your best short-term solution, and work toward 6.x in the mid-to-long term. That was my gut feeling. Could you explain why that is? Is 5.5 a wasteland? I'll need to understand the rationale behind the recommendation to make it stick with the development team. Current status is available from: http://wiki.apache.org/tomcat/TomcatVersions Thanks - that's a very handy summary. Could someone help me understand the differences between the servlet and JSP versions? Do the numbers imply no backward and/or forward compatibility? Given that the app I am administering was written some years ago for 4.1, and I've been told it needs a specific Java version (1.4.2_11) does this increase the likelihood of substantial rewrites being needed to run on newer versions of Tomcat? I'm puzzled - I don't know much about Java - how much changes? And why so quickly!? S. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Log4j configuration probems with JSVC
Hello i am running Tomcat5.5.25 with Open ssl and native libraries and JSVC i need to use log4j logging for each of my applications. So i need to configure a universal log4j logger and then configure individually for each application (in the WEB directory) so i proceeded as follows downloaded commons-logging-1.1.1.jar and log4j-1.2.15.jar to the common/lib directory Created a log4j.properties in common/classes folder It has following lines: log4j.rootLogger = DEBUG, A1 # Configuration for a rolling log file (tomcat.log). log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.DatePattern='.'-MM-dd # Edit the next line to point to your logs directory. # The last part of the name is the log file name. log4j.appender.A1.File=/usr/share/tomcat5.5.25/logs/tomcat.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout # Print the date in ISO 8601 format log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n Also i edited my JSVC script and it looks as follows: JAVA_HOME='/usr/lib/jvm/java-1.5.0-sun' NAME='tomcat5.5.25' CATALINA_HOME=/usr/share/$NAME TOMCAT_USER=tomcat6 DAEMON_HOME=/usr/share/$NAME/bin/jsvc-src # for multi instances adapt those lines. TMP_DIR=/var/tmp1 PID_FILE=/var/run/jsvc1.pid CATALINA_BASE=/usr/share/$NAME LOG4J_CONFIG=/usr/share/$NAME/common/classes/log4j.properties CATALINA_OPTS=-Djava.library.path=/usr/share/$NAME/bin/tomcat-native-1.1.6-src/jni/native/.libs \ -Djava.security.egd=file:/dev/urandom -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m \ -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar:\ $CATALINA_HOME/common/lib/commons-logging-1.1.1.jar:\ $CATALINA_HOME/common/lib/log4j-1.2.15.jar:\ $CATALINA_HOME/common/classes case $1 in start) $DAEMON_HOME/jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ -Dcatalina.base=$CATALINA_BASE \ -Djava.io.tmpdir=$TMP_DIR \ -Dlog4j.debug \ -Dlog4j.configuration=$LOG4J_CONFIG \ -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger \ -pidfile $PID_FILE \ $CATALINA_OPTS \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '1' \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap exit $? ;; stop) $DAEMON_HOME/jsvc \ -stop \ -pidfile $PID_FILE \ org.apache.catalina.startup.Bootstrap exit $? ;; #PID=`cat /var/run/jsvc1.pid` #kill $PID *) echo Usage tomcat.sh start/stop exit 1;; esac When i execute this script i get the following error in the catalina.out file: log4j: Trying to find [/usr/share/tomcat5.5.25/common/classes/log4j.properties] using context classloader [EMAIL PROTECTED] log4j: Trying to find [/usr/share/tomcat5.5.25/common/classes/log4j.properties] using [EMAIL PROTECTED] class loader. log4j: Trying to find [/usr/share/tomcat5.5.25/common/classes/log4j.properties] using ClassLoader.getSystemResource(). log4j: Could not find resource: [/usr/share/tomcat5.5.25/common/classes/log4j.properties]. log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Bootstrap). log4j:WARN Please initialize the log4j system properly. I read the documentation but couldnt figure the error out. thanks Neha Now you can chat without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php - 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: Does tomcat support multicores
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Does tomcat support multicores | Doesn't XP limit itself to two cores? I don't think so. I'm sure some versions of XP are limited to two CPUs, since that was a concern when HyperThreading was all the rage. It may be just the Home edition, rather than Pro. I know the Windows Server versions (different license than XP) all support at least four CPUs. - 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: Support and development of versions
-Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Current status is available from: http://wiki.apache.org/tomcat/TomcatVersions What does RTC, for the process field stand for? -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, purge the message from your system and notify the sender immediately. Any other use of the email by you is prohibited. - 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: Support and development of versions
From: Stephen Nelson-Smith [mailto:[EMAIL PROTECTED] Subject: Re: Support and development of versions Could someone help me understand the differences between the servlet and JSP versions? The servlet and JSP specs are the place to look. Each document includes a section on what's changed from earlier versions. http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html http://jcp.org/aboutJava/communityprocess/final/jsr245/index.html Do the numbers imply no backward and/or forward compatibility? Newer versions of Tomcat should run webapps based on older specifications without any real difficulty. Problems arise when webapps do something container specific, such as depend on bugs fixed in later versions. Tomcat configuration has changed significantly, as might be expected, so don't just blindly copy over your old server.xml and Context elements when moving up. Read the Tomcat docs, and modify the various .xml files that come with the version of Tomcat you're moving to. I've been told it needs a specific Java version (1.4.2_11) The above is highly likely to be pure BS. Again, other than webapps absuing the system by being dependent on bugs or security holes fixed in later levels, older programs run happily on the latest JVMs (which also tend to be significantly faster than older ones). The one significant incompatibility I remember is that classes being imported must be part of a package. It was never good practice to use packageless classes, and at some point in the last few years it became illegal. - 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: Support and development of versions
-Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 16:12 To: Tomcat Users List Subject: RE: Support and development of versions From: Stephen Nelson-Smith [mailto:[EMAIL PROTECTED] Subject: Re: Support and development of versions Could someone help me understand the differences between the servlet and JSP versions? The servlet and JSP specs are the place to look. Each document includes a section on what's changed from earlier versions. http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html http://jcp.org/aboutJava/communityprocess/final/jsr245/index.html Do the numbers imply no backward and/or forward compatibility? Newer versions of Tomcat should run webapps based on older specifications without any real difficulty. Problems arise when webapps do something container specific, such as depend on bugs fixed in later versions. Tomcat configuration has changed significantly, as might be expected, so don't just blindly copy over your old server.xml and Context elements when moving up. Read the Tomcat docs, and modify the various .xml files that come with the version of Tomcat you're moving to. I've been told it needs a specific Java version (1.4.2_11) The above is highly likely to be pure BS. It might not be, but it should not be. http://java.sun.com/j2se/1.5.0/compatibility.html and http://java.sun.com/javase/6/webnotes/compatibility.html -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, purge the message from your system and notify the sender immediately. Any other use of the email by you is prohibited. - 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: Does tomcat support multicores
XP Home only supports one core - however, that would hardly be an OS for a production web server (grin) XP Professional is limited to 2 cpus I would suspect that the OPs factors were related to IO Bandwidth or running out of threads as suggested earlier. I've found that a modern multicore machine doesn't actually spend very much time processing the Tomcat stuff at all. Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Does tomcat support multicores | Doesn't XP limit itself to two cores? I don't think so. I'm sure some versions of XP are limited to two CPUs, since that was a concern when HyperThreading was all the rage. It may be just the Home edition, rather than Pro. I know the Windows Server versions (different license than XP) all support at least four CPUs. - 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] !DSPAM:47c72002262671410093335! - 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: Support and development of versions
Jason Pyeron wrote: -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Current status is available from: http://wiki.apache.org/tomcat/TomcatVersions What does RTC, for the process field stand for? Review Then Commit. It means every patch must get at least 3 more +1 votes than -1 votes (from the committers) before it can be applied to that branch. 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]
RE: Support and development of versions
From: Jason Pyeron [mailto:[EMAIL PROTECTED] Subject: RE: Support and development of versions It might not be, but it should not be. http://java.sun.com/j2se/1.5.0/compatibility.html and http://java.sun.com/javase/6/webnotes/compatibility.html Other than enum becoming a reserved word, did you see anything in there that was significant? - 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: Frustrating Issue with default host
[EMAIL PROTECTED] a écrit : I m trying to setup tomcat as below. The host blocks have ips in them. I have a proxy configured in front of the tomcat with an external ip which receives all the request for the sites from the external world and contacts the tomcat (with different hosts configured). The problem is with /Host Host name=10.7.0.81, 10.7.0.82 10.7.0.83 which are accesed via connector 8080 by the proxy server. When I use the http://x.x.x.x (external-ip), it works just fine and all three sites related to the three hostname above open but when I try accessing the sites via the dns name instead of the ips, all sites are defaulted to the defaulthost. Please suggest. Which is correct behaviour, since you didn't configure any host that match hosts used by browser. The hosts that tomcat uses have little to do with dns, and tomcat will not attempt to make any dns resolution. It will just match the Connector to the port/network interface used for the contact, and inside that connector look for a host that matches the browser send host HTTP 1/1 header. If you want several host names to serve the same thing, use the aliases inside host. See Alias section on http://tomcat.apache.org/tomcat-5.5-doc/config/host.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Does logging with swallowOutput=true buffer the output ?
Hi, I have a servlet that loops and writes normally to catalina.out with System.out.println(iteration); I can tail -f catalina.out and see the iterations as they happen. The problem is that after configuring the applications logging.properties as shown below and set the application context xml with the attribute swallowOutput=true, I do not see the iterations until the very last one. I am a bit puzzled as to what is happening and where that behavior should be corrected. Any ideas ? Tx - Fred $ cat logging.properties handlers = org.apache.juli.FileHandler org.apache.juli.FileHandler.level = FINEST org.apache.juli.FileHandler.directory = ${catalina.base}/logs org.apache.juli.FileHandler.prefix = myapp. -- View this message in context: http://www.nabble.com/Does-logging-with-swallowOutput%3D%22true%22-buffer-the-output---tp15747629p15747629.html 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: JkRequestLogFormat Options
In addition to Freds remark: Usually you want the LAST variant, instead of the FIRST variant. The two are the same, if a loab balancer only tries one worker, but in case of an error and failover, FIRST will be the first worker tried (so the failed one) and LAST the last one, so usually the successful one (unless all workers fail). %T: response time in seconds, and I think it always gets rounded down. So usually not very useful Instead you could use the httpd standard %D, which is response time in microseconds. Last remark: until JK 1.2.25 the variables JK_WORKER_ROUTE and JK_REQUEST_DURATION where only filled, if some JkRequestLogFormat was set. In your version 1.2.26 both of them should get set even with a JkRequestLogFormat (but only, if the request gets handled by mod_jk, so not for static content, that is returned by the web server without any Tomcat interaction). Regards, Rainer Ahmed Musa schrieb: Hallo, I am logging the mod_jk Output through the Apache access_log - as written in the reference found under http://tomcat.apache.org/connectors-doc/reference/apache.html Because i want to get clearness about what exactly is going on in our system i use the following LogFormat: LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-Agent}i\ \%{Cookie}i\ \%{Set-Cookie}o\ %{pid}P %{tid}P%T %{JK_WORKER_NAME}n %{JK_REQUEST_DURATON}n %{JK_WORKER_ROUTE}n %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_FIRST_VALUE}n %{JK_LB_FIRST_ACCESSED}n %{JK_LB_FIRST_READ}n %{JK_LB_FIRST_TRANSFERRED}n %{JK_LB_FIRST_ERRORS}n %{JK_LB_FIRST_ACTIVATION}n %{JK_LB_FIRST_STATE}n %{JK_LB_LAST_NAME}n mod_jk_log ...everthing works fine except the Options responsible for the Request Duration. Mostly neither %T nor %{JK_REQUEST_DURATON}n have a Value (%T mostly is 0 an the other Parameter is -). At some Requests i found the %T has a value like for example 2 or 3.. - and JK_REQUEST DURATION has - or %T is 0 and JK_REQUEST_DURATION has an value like 2 or 3 ... First - why are there not values at each request ? Second -i think both Options are measuring the same Value - why they are not the same ? Third - why they are not showing seconds.microseconds as written in the reference but only (I think so) rounded seconds. We use mod_jk 1.2.26 Thanks for help Best ahmed - 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: Does tomcat support multicores
(Please excuse the boring licensing details, but I've seen a lot of misinformation on this topic.) Microsoft Windows is licensed per-processor, not per-core. XP Home supports 1 processor and XP Pro supports 2 processors. Each processor may have multiple cores. Server versions can support more than 2 processors but you pay for them. (Vista works similarly.) I've got a machine running Windows XP Home with 2 cores (Athlon X2) and it definitely uses both cores. And it's running Tomcat. :-) reference: http://www.microsoft.com/licensing/highlights/multicore.mspx -- Len On Thu, Feb 28, 2008 at 4:43 PM, Alan Chaney [EMAIL PROTECTED] wrote: XP Home only supports one core - however, that would hardly be an OS for a production web server (grin) XP Professional is limited to 2 cpus I would suspect that the OPs factors were related to IO Bandwidth or running out of threads as suggested earlier. I've found that a modern multicore machine doesn't actually spend very much time processing the Tomcat stuff at all. Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Does tomcat support multicores | Doesn't XP limit itself to two cores? I don't think so. I'm sure some versions of XP are limited to two CPUs, since that was a concern when HyperThreading was all the rage. It may be just the Home edition, rather than Pro. I know the Windows Server versions (different license than XP) all support at least four CPUs. - 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] !DSPAM:47c72002262671410093335! - 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: sessionID moves to other PC
This is what I use to make sure dynamic data is not cached: resp.setHeader(Expires, Sat, 6 May 1995 12:00:00 GMT); resp.setHeader(Cache-Control, no-store, no-cache, must- revalidate); resp.addHeader(Cache-Control, post-check=0, pre-check=0); resp.setHeader(Pragma, no-cache); On Feb 28, 2008, at 11:25 AM, Sascha Monteiro wrote: Hi, When I see this behaviour I don't see the output on the server (thanks Yuval) It is just suddenly on my browser.. Maybe it's my wireless Cable Modem...maybe caching or so... I'll do some more debugging in the weekend.. ta - Original Message - From: Christopher Schultz [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 27, 2008 3:44 AM Subject: Re: sessionID moves to other PC -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sascha, Sascha Monteiro wrote: | I now put % out.println(session.getId()); % in the page.. | I see my sessionID, but then navigate to another page and then see the | sessionID of the other user! | then I press reload in my browser, and I get my own session again, till | I navigate again... This sounds suspiciously like you are storing either the session object or the request object somewhere you should not be (such as in a member of one of your servlets or JSPs or something). Can you post a little bit of code from the servlet that ends up with the wrong session? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfEJdkACgkQ9CaO5/Lv0PAUgACgnBBJmJ1Mn4kbNKy0GlIEzmVA WEwAn1RHgNfHmkDpJ/uMwx40elrkxTWX =QCiV -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] - 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 send http response in several chunked package with Tomcat
My God, I am actually not aware of that despite it's so obvious... Thank u Filip! B.R Han -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 11:51 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat //first flush headers response.flushBuffer() //then flush body while (havedata) { response.getOutputStream().println(some data) response.flushBuffer() } you need to put your thinker hat on Hanks :) Hanks Wang (hanwan) wrote: Hi Filip, Seems the method has a problem : tomcat puts the http header and part of the body in the same chunk. But I hope to generate the response in below format: Suppose I need use String tmp as the response, tmp = part1 + part2 + part3+part4; we use 4 tcp frame totally for the http response: Frame 1: only carry the httpheader, no chunk in the frame Frame 2: includes the first chunk, carries part1+part2; Frame 3: includes the second chunk, carries part3+part4; Frame 4: includes a chunk whose length is 0, tells client it's the end of chunks; However Tomcat generate the response in such way: Frame 1: includes httpheader and the first chunk, 1st chunk carries part1; Frame 2: includes part2 + part3; Frame3 and Frame4 are same with above; So how can I make sure there is only http header in the first frame? Thanks. Han -Original Message- From: Hanks Wang (hanwan) Sent: Thursday, February 28, 2008 10:26 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Filip, Yes it works. Thanks a lot! Christopher, in fact I'm writing a servlet to fool a management software, So I need make sure the servlet response is as close to real device as possible. Thanks for everyone's help. B.R Han -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 11:24 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat you don't need to do that, tomcat does it for you. all you need to do is while (havedata) { response.getOutputStream().println(some data) response.flushBuffer() } and tomcat takes care of the rest Filip Hanks Wang (hanwan) wrote: Hi Johnny, I try below method implement the chunk in code: String tmp = something very long; String hlen = Integer.toHexString(tmp.length()); hlen = hlen +\r\n + tmp.toString(); String chunkend = Integer.toHexString(0)+\r\n; response.getOutputStream().println(hlen); response.getOutputStream().println(chunkend); I created two http chunk successfully by this way. The first chunk is the data which wraps tmp, the second is the end chunk. But the question is, all these chunk and http header are in same frame (get it from wireshark.). How can I put them in different frame? Which means we need 3 frame for the case: the first frame will carry the http header, the second will carry the first chunk data, the last frame will carry the end chunk. Does it mean I need control the tcp/ip protocol? It's impossible, right? B.R Han -Original Message- From: Hanks Wang (hanwan) Sent: Wednesday, February 27, 2008 3:40 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Johnny, Thanks a lot. I read the http RFC and find something like this: The chunk-size field is a string of hex digits indicating the size of the chunk. The chunked encoding is ended by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line. Do u have any tutorial of ChunkedOutputFilter? I can't find anything from its API document.. Thanks Han -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 7:41 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat - - -- --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. - - -- --- - Original Message - From: Hanks Wang (hanwan) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, February 26, 2008 12:02 PM Subject: how to send http response in several chunked package with Tomcat Hi all, Is there a way to make tomcat generate http response in chunked-encoding style? suppose I have a file resp.log and I can parse it in byte[], how can I send the byte array in several chunked package? Hanks I have just started looking at this, so no expert but I did notice
Unable to read shell environment variables
Hi, I'm getting this error when trying to use CGI under tomcat on Windows Server 2008: javax.servlet.ServletException: Unable to read shell environment variables This line also displays: Cannot run program env: CreateProcess error=2, It looks like getShellEnvironment() is testing for specific versions of Windows and 2008 is not one of them, then defaulting to the unix call and throwing the Cannot run program env error. I don't know enough about Windows 2008 to know if it's simply going to be a matter of adding the new OS version to the if. Tomcat version is 6.0.14 Does anyone know if this has been fixed in a newer 6 release or if someone is already looking at it? Thanks. - 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: Unable to read shell environment variables
From: Patrick Lee [mailto:[EMAIL PROTECTED] Subject: Unable to read shell environment variables It looks like getShellEnvironment() is testing for specific versions of Windows and 2008 is not one of them, then defaulting to the unix call and throwing the Cannot run program env error. When running a Java program under Win2008, what value does the system property os.name have? What JVM version are you running? (This has the potential of being a JVM, not Tomcat, problem. The value of the aforementioned system property should tell us which.) - 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]
Zero-pad the chunk length which generated by tomcat automatically
Hi Filip, Seems the method still has a problem: In real world, the chunk-size will be zero-pad until 8 bytes. For example: if I have a chunk which length is 20(HEX), The chunk-length should be : 0020 But the chunk-length generated by tomcat is 20. Is it possible to make tomcat zero-pad the chunk-length? Thanks! Han -Original Message- From: Hanks Wang (hanwan) Sent: Friday, February 29, 2008 9:15 AM To: 'Tomcat Users List' Subject: RE: how to send http response in several chunked package with Tomcat My God, I am actually not aware of that despite it's so obvious... Thank u Filip! B.R Han -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 11:51 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat //first flush headers response.flushBuffer() //then flush body while (havedata) { response.getOutputStream().println(some data) response.flushBuffer() } you need to put your thinker hat on Hanks :) Hanks Wang (hanwan) wrote: Hi Filip, Seems the method has a problem : tomcat puts the http header and part of the body in the same chunk. But I hope to generate the response in below format: Suppose I need use String tmp as the response, tmp = part1 + part2 + part3+part4; we use 4 tcp frame totally for the http response: Frame 1: only carry the httpheader, no chunk in the frame Frame 2: includes the first chunk, carries part1+part2; Frame 3: includes the second chunk, carries part3+part4; Frame 4: includes a chunk whose length is 0, tells client it's the end of chunks; However Tomcat generate the response in such way: Frame 1: includes httpheader and the first chunk, 1st chunk carries part1; Frame 2: includes part2 + part3; Frame3 and Frame4 are same with above; So how can I make sure there is only http header in the first frame? Thanks. Han -Original Message- From: Hanks Wang (hanwan) Sent: Thursday, February 28, 2008 10:26 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Filip, Yes it works. Thanks a lot! Christopher, in fact I'm writing a servlet to fool a management software, So I need make sure the servlet response is as close to real device as possible. Thanks for everyone's help. B.R Han -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 11:24 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat you don't need to do that, tomcat does it for you. all you need to do is while (havedata) { response.getOutputStream().println(some data) response.flushBuffer() } and tomcat takes care of the rest Filip Hanks Wang (hanwan) wrote: Hi Johnny, I try below method implement the chunk in code: String tmp = something very long; String hlen = Integer.toHexString(tmp.length()); hlen = hlen +\r\n + tmp.toString(); String chunkend = Integer.toHexString(0)+\r\n; response.getOutputStream().println(hlen); response.getOutputStream().println(chunkend); I created two http chunk successfully by this way. The first chunk is the data which wraps tmp, the second is the end chunk. But the question is, all these chunk and http header are in same frame (get it from wireshark.). How can I put them in different frame? Which means we need 3 frame for the case: the first frame will carry the http header, the second will carry the first chunk data, the last frame will carry the end chunk. Does it mean I need control the tcp/ip protocol? It's impossible, right? B.R Han -Original Message- From: Hanks Wang (hanwan) Sent: Wednesday, February 27, 2008 3:40 PM To: Tomcat Users List Subject: RE: how to send http response in several chunked package with Tomcat Hi Johnny, Thanks a lot. I read the http RFC and find something like this: The chunk-size field is a string of hex digits indicating the size of the chunk. The chunked encoding is ended by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line. Do u have any tutorial of ChunkedOutputFilter? I can't find anything from its API document.. Thanks Han -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 7:41 PM To: Tomcat Users List Subject: Re: how to send http response in several chunked package with Tomcat - - -- --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. - - -- --- - Original Message - From: Hanks Wang
RE: Zero-pad the chunk length which generated by tomcat automatically
Hi Chuck, Maybe I used a improper word here. I know the spec doesn't say the chunk-size has to be zero-pad to eight bytes. But unfortunately there is such a case indeed and the real device sends all chunk with chunk-size zero-filled. And I need simulate the device and send the same response as the real one. So all I want to know is whether I can use some way to zero-pad the chunk-length which generated by tomcat. Thanks Han -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Friday, February 29, 2008 2:29 PM To: Tomcat Users List Subject: RE: Zero-pad the chunk length which generated by tomcat automatically From: Hanks Wang (hanwan) [mailto:[EMAIL PROTECTED] Subject: Zero-pad the chunk length which generated by tomcat automatically In real world, the chunk-size will be zero-pad until 8 bytes. Where in the HTTP RFC do you find any requirement to zero-fill the chunk-size to eight bytes? The spec defines chunk-size as one or more HEX digits, nothing more. I'm curious: what real-world client are you using that hasn't implemented that part of the RFC properly? - 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: Zero-pad the chunk length which generated by tomcat automatically
From: Hanks Wang (hanwan) [mailto:[EMAIL PROTECTED] Subject: Zero-pad the chunk length which generated by tomcat automatically In real world, the chunk-size will be zero-pad until 8 bytes. Where in the HTTP RFC do you find any requirement to zero-fill the chunk-size to eight bytes? The spec defines chunk-size as one or more HEX digits, nothing more. I'm curious: what real-world client are you using that hasn't implemented that part of the RFC properly? - 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: Zero-pad the chunk length which generated by tomcat automatically
Hi Chunk, I saw it, thank u very much! -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Friday, February 29, 2008 2:55 PM To: Tomcat Users List Subject: RE: Zero-pad the chunk length which generated by tomcat automatically From: Hanks Wang (hanwan) [mailto:[EMAIL PROTECTED] Subject: RE: Zero-pad the chunk length which generated by tomcat automatically So all I want to know is whether I can use some way to zero-pad the chunk-length which generated by tomcat. I don't see any way to do so via configuration, but changing the existing code would be simple. Look here: org/apache/coyote/http11/filters/ChunkedOutputFilter.java in the middle of the doWrite() method where it's filling in the chunkLength array. - 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: Zero-pad the chunk length which generated by tomcat automatically
From: Hanks Wang (hanwan) [mailto:[EMAIL PROTECTED] Subject: RE: Zero-pad the chunk length which generated by tomcat automatically So all I want to know is whether I can use some way to zero-pad the chunk-length which generated by tomcat. I don't see any way to do so via configuration, but changing the existing code would be simple. Look here: org/apache/coyote/http11/filters/ChunkedOutputFilter.java in the middle of the doWrite() method where it's filling in the chunkLength array. - 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]
I can't access my webapplication from another computer
Hello, I am new to Tomcat and i wish you would lend a hand. Here's the situation: I installed Tomcat 6.0.14 full install and I copied my .war file into /webapps I checked if my webapplication is running by typing http://localhost/webapplication/login.jsp and it worked ok.. Problem: Unfortunately, when I tried to access my webapplication from another computer, I tried to type from url: http://192.168.1.2/webapplication/login.jsp, the browser always gives the Page cannot be displayed page. (where the IP address is the address which Tomcat 6 was installed). Are there futher configurations needed to be done? You may give me links / websites that relates to my problem (if you're not in the mood for explaining ha.ha!) Thank you for reading my e-mail. Godbless, Ryan Webb -- from Philippines _ Get your free suite of Windows Live services today! http://www.get.live.com/wl/all
Re: I can't access my webapplication from another computer
2008/2/29, Ryan Webb [EMAIL PROTECTED]: http://192.168.1.2/webapplication/login.jsp Is the machine behind a firewall (even software firewall)? Is your client computer in the same subnet of your server? Antonio
Re: tomcat ldap authentication problem
anyone ? Christian Andersson skrev: Hi, we have setup Tomcat (6.0.10) to authenticate using form authentication against openldap (2.3.27) with the jndirealm and everything works alright except one little bit of a problem. if the user name has national characters in it (åæø for norwegian) or the password does, the user cannot authenticate .-( for example if our user has a password of hælge the user cannot log in, but if we change the password to helge he can log in. all our html pages uses the utf-8 encoding, using slapcat and looking at the content the data inside openldap seems to be using utf-8 (the output from slapcat is at least utf-8,but I don't know if slapcat converts anything) We are also administrating the users from within our application (using the standard javax.naming package) and from there we can search AND find users with user names that have øæå in them so we know that ldap and javax.naming can communicate and use national characters correctly.. looking at the logfile for ldap (when turning up the debug level) it almost looks like jndirealm is using iso-8859-1 as encoding since in the logfile all natinal characters comes out as garbage. and as I said ALL pages in the system uses UTF-8 as encoding (including the login page) can anyone give me a hint on where to look next, I've searched for an answer using google and in the mailinglist but either I'm nort searching for the right thing, or I just cannot find it.. /Christian Andersson - 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: I can't access my webapplication from another computer
also, check, Port 80 or 8080 is open or not.. On Fri, Feb 29, 2008 at 1:19 PM, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Ryan Webb [mailto:[EMAIL PROTECTED] Subject: I can't access my webapplication from another computer Unfortunately, when I tried to access my webapplication from another computer, I tried to type from url: http://192.168.1.2/webapplication/login.jsp, the browser always gives the Page cannot be displayed page. 1) Verify that you can ping 192.168.1.2 from the other computer. 2) Check for any firewall or other port disabling mechanism between the two computers. - 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] -- Regards Partha Goswami Solaris/Open solaris User Group www.solaris-user-group.org
Re: I can't access my webapplication from another computer
what's the tomcat port? ur OS ? On Fri, Feb 29, 2008 at 1:14 PM, Ryan Webb [EMAIL PROTECTED] wrote: Hello, I am new to Tomcat and i wish you would lend a hand. Here's the situation: I installed Tomcat 6.0.14 full install and I copied my .war file into /webapps I checked if my webapplication is running by typing http://localhost/webapplication/login.jsp and it worked ok.. Problem: Unfortunately, when I tried to access my webapplication from another computer, I tried to type from url: http://192.168.1.2/webapplication/login.jsp, the browser always gives the Page cannot be displayed page. (where the IP address is the address which Tomcat 6 was installed). Are there futher configurations needed to be done? You may give me links / websites that relates to my problem (if you're not in the mood for explaining ha.ha!) Thank you for reading my e-mail. Godbless, Ryan Webb -- from Philippines _ Get your free suite of Windows Live services today! http://www.get.live.com/wl/all -- Regards Partha Goswami Solaris/Open solaris User Group www.solaris-user-group.org
Re: tomcat ldap authentication problem
2008/2/20, Christian Andersson [EMAIL PROTECTED]: all our html pages uses the utf-8 encoding, using slapcat and looking at the content the data inside openldap seems to be using utf-8 (the output from slapcat is at least utf-8,but I don't know if slapcat converts anything) This might be a shot in the dark, but what client browser are you using? I've had some problems with IE7: though I tell him to use UTF-8, it posts the form in UTF-8 charset, but telling that it is using ISO-8859-1! Try it with Firefox, if you already didn't do it. Antonio - 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: I can't access my webapplication from another computer
can not comment, anything, Untill U r telling me, your Operating System On Fri, Feb 29, 2008 at 1:17 PM, Antonio Petrelli [EMAIL PROTECTED] wrote: 2008/2/29, Ryan Webb [EMAIL PROTECTED]: http://192.168.1.2/webapplication/login.jsp Is the machine behind a firewall (even software firewall)? Is your client computer in the same subnet of your server? Antonio -- Regards Partha Goswami Solaris/Open solaris User Group www.solaris-user-group.org
RE: I can't access my webapplication from another computer
From: Ryan Webb [mailto:[EMAIL PROTECTED] Subject: I can't access my webapplication from another computer Unfortunately, when I tried to access my webapplication from another computer, I tried to type from url: http://192.168.1.2/webapplication/login.jsp, the browser always gives the Page cannot be displayed page. 1) Verify that you can ping 192.168.1.2 from the other computer. 2) Check for any firewall or other port disabling mechanism between the two computers. - 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]