Re: Mod_jk working for failover
my setup: # Define list of workers that will be used for mapping requests worker.list=loadbalancer43,status # Definicion de plantilla worker.template43.port=8009 worker.template43.type=ajp13 worker.template43.lbfactor=1 worker.template43.ping_timeout=1000 worker.template43.socket_timeout=10 worker.template43.ping_mode=A worker.template43.connection_pool_timeout=600 # NODO 43 m1g1 worker.43m1g1.reference=worker.template43 worker.43m1g1.host=xx.xx.xx.xx # NODO 43 m2g1 worker.43m2g1.reference=worker.template43 worker.43m2g1.host=xx.xx.xx.xx # Balanceador correspodiente a todos los grupos worker.loadbalancer43.type=lb worker.loadbalancer43.balance_workers=43m1g1,43m2g1 worker.loadbalancer43.sticky_session=1 Now is balancing between 4 instances, but I need to work against 43m1g1 node. If 43m1g1 node fails, then petitions will be redirects to 43m2g1 node. Thank you 2011/6/7 Christopher Schultz ch...@christopherschultz.net -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Manuel. On 6/7/2011 12:38 PM, Manuel Fernández Panzuela wrote: I want to work with mod_jk in failover mode. I do not want to balancing petitions until the node 1 is unavailable. If principal node (node 1) is down, then petitions will be redirected to node 2. How I can do it? What have you tried so far? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3uaLUACgkQ9CaO5/Lv0PD6TACcC6239gZILU+6OGpT/xsh9F0I 6osAmgLvY4GYifndETBYP3z5JbznRYal =Jp0Z -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Wine and tomcat
Hello there, At my job, we are developing a program in Java that connect to Excel to web page. Indeed, we only work on Windows but I cannot live with that any more. Windows just sucks! Hence, I'm trying the impossible here: develop a program that depend heavily on Windows and Excel under Linux. My goal is to Wine my entire project. I have a wined jdk and I already wined netbeans and it works like a charm. My last problem is tomcat. I need to start tomcat from wine and it does not work. I run the command catalina.bat jpda start (to debug tomcat) and here is the log that I have. [QUOTE] Using CATALINA_BASE: C:\_easa\trunk\server\tomcat Using CATALINA_HOME: C:\_easa\trunk\server\tomcat Using CATALINA_TMPDIR: C:\_easa\trunk\server\tomcat\temp Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_25 File not found File not found File not found File not found Usage: catalina ( commands ... ) commands: debug Start Catalina in a debugger debug -security Debug Catalina with a security manager File not found jpda startStart Catalina under JPDA debugger run Start Catalina in the current window run -security Start in the current window with security manager start Start Catalina in a separate window start -security Start in a separate window with security manager stop Stop Catalina version What version of tomcat are you running? [/QUOTE] I know the problem comes from catalina.bat around those lines. [CODE] if %1 == debug goto doDebug if %1 == run goto doRun if %1 == start goto doStart if %1 == stop goto doStop if %1 == version goto doVersion [/CODE] My question is: what's missing there? How can I know what files are missing? I put prints everywhere and I cannot find which are the missing files. Thanks a lot! Didier Amyot -- View this message in context: http://old.nabble.com/Wine-and-tomcat-tp31798273p31798273.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk working for failover
Am Mittwoch, den 08.06.2011, 08:41 +0200 schrieb Manuel Fernández Panzuela: my setup: # Define list of workers that will be used for mapping requests worker.list=loadbalancer43,status # Definicion de plantilla worker.template43.port=8009 worker.template43.type=ajp13 worker.template43.lbfactor=1 worker.template43.ping_timeout=1000 worker.template43.socket_timeout=10 worker.template43.ping_mode=A worker.template43.connection_pool_timeout=600 # NODO 43 m1g1 worker.43m1g1.reference=worker.template43 worker.43m1g1.host=xx.xx.xx.xx # NODO 43 m2g1 worker.43m2g1.reference=worker.template43 worker.43m2g1.host=xx.xx.xx.xx # Balanceador correspodiente a todos los grupos worker.loadbalancer43.type=lb worker.loadbalancer43.balance_workers=43m1g1,43m2g1 worker.loadbalancer43.sticky_session=1 Now is balancing between 4 instances, but I need to work against 43m1g1 node. I only see two instances. If 43m1g1 node fails, then petitions will be redirects to 43m2g1 node. Look at http://tomcat.apache.org/connectors-doc/reference/workers.html and search for activation and redirect properties. You will have to add something like worker.43m2g1.activation=d worker.43m1g1.redirect=43m2g1 to your worker.properties. Felix Thank you 2011/6/7 Christopher Schultz ch...@christopherschultz.net -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Manuel. On 6/7/2011 12:38 PM, Manuel Fernández Panzuela wrote: I want to work with mod_jk in failover mode. I do not want to balancing petitions until the node 1 is unavailable. If principal node (node 1) is down, then petitions will be redirected to node 2. How I can do it? What have you tried so far? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3uaLUACgkQ9CaO5/Lv0PD6TACcC6239gZILU+6OGpT/xsh9F0I 6osAmgLvY4GYifndETBYP3z5JbznRYal =Jp0Z -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk working for failover
Yes Felix, you are right i am working with 2 instances. I want primary node receives all requests and on failure send requests to the secondary node. Is it possible with your recomendation ? worker.43m2g1.activation=d degraded ??? is a condition ? then all requests will be redirected to 43m2g1 ?? worker.43m1g1.redirect=43m2g1 Do I need more changes in my setup? Regards 2011/6/8 Felix Schumacher felix.schumac...@internetallee.de Am Mittwoch, den 08.06.2011, 08:41 +0200 schrieb Manuel Fernández Panzuela: my setup: # Define list of workers that will be used for mapping requests worker.list=loadbalancer43,status # Definicion de plantilla worker.template43.port=8009 worker.template43.type=ajp13 worker.template43.lbfactor=1 worker.template43.ping_timeout=1000 worker.template43.socket_timeout=10 worker.template43.ping_mode=A worker.template43.connection_pool_timeout=600 # NODO 43 m1g1 worker.43m1g1.reference=worker.template43 worker.43m1g1.host=xx.xx.xx.xx # NODO 43 m2g1 worker.43m2g1.reference=worker.template43 worker.43m2g1.host=xx.xx.xx.xx # Balanceador correspodiente a todos los grupos worker.loadbalancer43.type=lb worker.loadbalancer43.balance_workers=43m1g1,43m2g1 worker.loadbalancer43.sticky_session=1 Now is balancing between 4 instances, but I need to work against 43m1g1 node. I only see two instances. If 43m1g1 node fails, then petitions will be redirects to 43m2g1 node. Look at http://tomcat.apache.org/connectors-doc/reference/workers.html and search for activation and redirect properties. You will have to add something like worker.43m2g1.activation=d worker.43m1g1.redirect=43m2g1 to your worker.properties. Felix Thank you 2011/6/7 Christopher Schultz ch...@christopherschultz.net -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Manuel. On 6/7/2011 12:38 PM, Manuel Fernández Panzuela wrote: I want to work with mod_jk in failover mode. I do not want to balancing petitions until the node 1 is unavailable. If principal node (node 1) is down, then petitions will be redirected to node 2. How I can do it? What have you tried so far? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3uaLUACgkQ9CaO5/Lv0PD6TACcC6239gZILU+6OGpT/xsh9F0I 6osAmgLvY4GYifndETBYP3z5JbznRYal =Jp0Z -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Wine and tomcat
On Wed, 8 Jun 2011 00:15:09 -0700 (PDT), bigdidz wrote: At my job, we are developing a program in Java that connect to Excel to web page. Indeed, we only work on Windows but I cannot live with that any more. Windows just sucks! Try virtualbox / vmware. Develoop on linux (or whatever you like) and deploy/test on windows running inside VM. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Wine and tomcat
I know but its is not what I want. With a vm, I will not be able to debug my web applications (it uses Excel...). Hence, I really need to wine tomcat. With my small experience of wine, I do not see why it would not be possible. Wine is a fiberglassted piece of code. Mikolaj Rydzewski-2 wrote: On Wed, 8 Jun 2011 00:15:09 -0700 (PDT), bigdidz wrote: At my job, we are developing a program in Java that connect to Excel to web page. Indeed, we only work on Windows but I cannot live with that any more. Windows just sucks! Try virtualbox / vmware. Develoop on linux (or whatever you like) and deploy/test on windows running inside VM. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Wine-and-tomcat-tp31798273p31798806.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Wine and tomcat
On Wed, 8 Jun 2011 01:52:51 -0700 (PDT), bigdidz wrote: I know but its is not what I want. With a vm, I will not be able to debug my web applications (it uses Excel...). Hence, I really need to wine tomcat. You don't. You can debug remote java applications. It looks like a topic not for this list. With my small experience of wine, I do not see why it would not be possible. Wine is a fiberglassted piece of code. But it doesn't work :-) -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Wine and tomcat
2011/6/8 bigdidz didier.am...@gmail.com: I know but its is not what I want. With a vm, I will not be able to debug my web applications (it uses Excel...). Hence, I really need to wine tomcat. Do you really need Excel? Have you heard about Apache POI? http://poi.apache.org/ [QUOTE] Using CATALINA_BASE: C:\_easa\trunk\server\tomcat Using CATALINA_HOME: C:\_easa\trunk\server\tomcat Using CATALINA_TMPDIR: C:\_easa\trunk\server\tomcat\temp Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_25 File not found Turn on echo and debug the batch file. Or write your own. The only thing that matters is the javaw -Dcatalina.base= -Dcatalina.home= o.a.c.s.Bootstrap start line that starts Tomcat. BTW, javaw is likely to be unavailable in Linux. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Wine and tomcat
Presently we use a library called EzJcom. It is proprietary. In the future, we want to change for POI but I will not be able to to everything we do with EzJcom. We need to connect to excel in realtime. Thanks a lot for your answer. Konstantin Kolinko wrote: 2011/6/8 bigdidz didier.am...@gmail.com: I know but its is not what I want. With a vm, I will not be able to debug my web applications (it uses Excel...). Hence, I really need to wine tomcat. Do you really need Excel? Have you heard about Apache POI? http://poi.apache.org/ [QUOTE] Using CATALINA_BASE: C:\_easa\trunk\server\tomcat Using CATALINA_HOME: C:\_easa\trunk\server\tomcat Using CATALINA_TMPDIR: C:\_easa\trunk\server\tomcat\temp Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_25 File not found Turn on echo and debug the batch file. Or write your own. The only thing that matters is the javaw -Dcatalina.base= -Dcatalina.home= o.a.c.s.Bootstrap start line that starts Tomcat. BTW, javaw is likely to be unavailable in Linux. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Wine-and-tomcat-tp31798273p31798909.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7.0.14 / 6.0.32 session gets obviously invalid after request / JSESSIONID changes
Hello all, I'm hosting our spring mvc 3.0.5 application in tomcat 7.0.14 and also tried 6.0.32 The server is hosting two webapps. The frontend: http://localhost:50012/frontend The backend: http://localhost:50012/backend The Request-Flow looks as following: User: http://localhost:50012/frontend/index.htm AJAX Frontend: http://localhost:50012/frontend/setFilter.htm AJAX Backend: http://localhost:50012/backend/setFilter.htm User: onClick() AJAX Frontend: http://localhost:50012/frontend/setFilter.htm AJAX Backend: http://localhost:50012/backend/setFilter.htm The corresponding request-pairs to frontend and backend should be identified via the sessionID. Tomcat is doing that via Cookie JSESSIONID. I configured Tomcat according to https://issues.apache.org/bugzilla/show_bug.cgi?id=48379 Context sessionCookiePath=/ sessionCookieDomain=.localhost If I look into the cookies in request and response the following happens (note I shortened the sessionIds) User: http://localhost:50012/frontend/index.htm ResponseHeader: - RequestHeader: JSESSIONID=1 AJAX Frontend: http://localhost:50012/frontend/setFilter.htm ResponseHeader: - RequestHeader: JSESSIONID=1 AJAX Backend: http://localhost:50012/backend/setFilter.htm ResponseHeader: set JSESSIONID=2 RequestHeader: JSESSIONID=1 User: onClick() AJAX Frontend: http://localhost:50012/frontend/setFilter.htm ResponseHeader: setJSESSIONID=3 RequestHeader: JSESSIONID=2 AJAX Backend: http://localhost:50012/backend/setFilter.htm ResponseHeader: - RequestHeader: JSESSIONID=2 ...the sessionID alsways changes when I'm requesting the other context. Has anyone a hint according to this? Kind regards Sascha - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk working for failover
Am Mittwoch, den 08.06.2011, 09:47 +0200 schrieb Manuel Fernández Panzuela: Yes Felix, you are right i am working with 2 instances. I want primary node receives all requests and on failure send requests to the secondary node. Is it possible with your recomendation ? You may also want to read http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html if http://tomcat.apache.org/connectors-doc/reference/workers.html was not helpful. worker.43m2g1.activation=d degraded ??? is a condition ? then all requests will be redirected to 43m2g1 disabled ?? worker.43m1g1.redirect=43m2g1 Do I need more changes in my setup? I don't think so. Felix Regards 2011/6/8 Felix Schumacher felix.schumac...@internetallee.de Am Mittwoch, den 08.06.2011, 08:41 +0200 schrieb Manuel Fernández Panzuela: my setup: # Define list of workers that will be used for mapping requests worker.list=loadbalancer43,status # Definicion de plantilla worker.template43.port=8009 worker.template43.type=ajp13 worker.template43.lbfactor=1 worker.template43.ping_timeout=1000 worker.template43.socket_timeout=10 worker.template43.ping_mode=A worker.template43.connection_pool_timeout=600 # NODO 43 m1g1 worker.43m1g1.reference=worker.template43 worker.43m1g1.host=xx.xx.xx.xx # NODO 43 m2g1 worker.43m2g1.reference=worker.template43 worker.43m2g1.host=xx.xx.xx.xx # Balanceador correspodiente a todos los grupos worker.loadbalancer43.type=lb worker.loadbalancer43.balance_workers=43m1g1,43m2g1 worker.loadbalancer43.sticky_session=1 Now is balancing between 4 instances, but I need to work against 43m1g1 node. I only see two instances. If 43m1g1 node fails, then petitions will be redirects to 43m2g1 node. Look at http://tomcat.apache.org/connectors-doc/reference/workers.html and search for activation and redirect properties. You will have to add something like worker.43m2g1.activation=d worker.43m1g1.redirect=43m2g1 to your worker.properties. Felix Thank you 2011/6/7 Christopher Schultz ch...@christopherschultz.net -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Manuel. On 6/7/2011 12:38 PM, Manuel Fernández Panzuela wrote: I want to work with mod_jk in failover mode. I do not want to balancing petitions until the node 1 is unavailable. If principal node (node 1) is down, then petitions will be redirected to node 2. How I can do it? What have you tried so far? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3uaLUACgkQ9CaO5/Lv0PD6TACcC6239gZILU+6OGpT/xsh9F0I 6osAmgLvY4GYifndETBYP3z5JbznRYal =Jp0Z -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk working for failover
Woowww Now, mod_jk is working perfectly Thank you so much FELIX !!! Best regards 2011/6/8 Felix Schumacher felix.schumac...@internetallee.de Am Mittwoch, den 08.06.2011, 09:47 +0200 schrieb Manuel Fernández Panzuela: Yes Felix, you are right i am working with 2 instances. I want primary node receives all requests and on failure send requests to the secondary node. Is it possible with your recomendation ? You may also want to read http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html if http://tomcat.apache.org/connectors-doc/reference/workers.html was not helpful. worker.43m2g1.activation=d degraded ??? is a condition ? then all requests will be redirected to 43m2g1 disabled ?? worker.43m1g1.redirect=43m2g1 Do I need more changes in my setup? I don't think so. Felix Regards 2011/6/8 Felix Schumacher felix.schumac...@internetallee.de Am Mittwoch, den 08.06.2011, 08:41 +0200 schrieb Manuel Fernández Panzuela: my setup: # Define list of workers that will be used for mapping requests worker.list=loadbalancer43,status # Definicion de plantilla worker.template43.port=8009 worker.template43.type=ajp13 worker.template43.lbfactor=1 worker.template43.ping_timeout=1000 worker.template43.socket_timeout=10 worker.template43.ping_mode=A worker.template43.connection_pool_timeout=600 # NODO 43 m1g1 worker.43m1g1.reference=worker.template43 worker.43m1g1.host=xx.xx.xx.xx # NODO 43 m2g1 worker.43m2g1.reference=worker.template43 worker.43m2g1.host=xx.xx.xx.xx # Balanceador correspodiente a todos los grupos worker.loadbalancer43.type=lb worker.loadbalancer43.balance_workers=43m1g1,43m2g1 worker.loadbalancer43.sticky_session=1 Now is balancing between 4 instances, but I need to work against 43m1g1 node. I only see two instances. If 43m1g1 node fails, then petitions will be redirects to 43m2g1 node. Look at http://tomcat.apache.org/connectors-doc/reference/workers.html and search for activation and redirect properties. You will have to add something like worker.43m2g1.activation=d worker.43m1g1.redirect=43m2g1 to your worker.properties. Felix Thank you 2011/6/7 Christopher Schultz ch...@christopherschultz.net -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Manuel. On 6/7/2011 12:38 PM, Manuel Fernández Panzuela wrote: I want to work with mod_jk in failover mode. I do not want to balancing petitions until the node 1 is unavailable. If principal node (node 1) is down, then petitions will be redirected to node 2. How I can do it? What have you tried so far? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3uaLUACgkQ9CaO5/Lv0PD6TACcC6239gZILU+6OGpT/xsh9F0I 6osAmgLvY4GYifndETBYP3z5JbznRYal =Jp0Z -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Static resource mapping in web.xml
Dear all, I'm faceing the following problem in tomcat (probably just configuration). I have a WEBAPP which uses the invoker servlet (i know how bad it is, but for now it gets the job done). The static content is under /images/ path. So a tipical URL was like http://host:8080/webapp/servlet/home;. To avoid the servlet part of the URL I layed hands in web.xml. This is the result: web-app servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping servlet-mapping servlet-namedefault/servlet-name url-pattern/images/*/url-pattern /servlet-mapping /web-app The problem is that static content is not shown under images, it is shown under images/images. For example: http://host:8080/webapp/images/help.png ERROR http://host:8080/webapp/images/images/help.pngOK In order to keep things as tidy as possible I would like static content to be served under images. Using ROOT is not an option because this tomcat is shared among several WEBAPPS. Is there anything wrong with my configuration or am I missing something? This post addresses the same issue: http://stackoverflow.com/questions/234210/can-anyone-explain-servlet-mapping Thanks in advance and please excuse my bad English. Best regards, Federico. OS CentOS 5 Tomcat6.0.29 JVM 1.6.0_20-b02
Re: Static resource mapping in web.xml
On 08/06/2011 15:17, falva...@geocom.com.uy wrote: I have a WEBAPP which uses the invoker servlet (i know how bad it is, but for now it gets the job done). That is such a monumentally bad idea I'm not at all sure you really do understand just how bad it is. The problem is that static content is not shown under images, it is shown under images/images. That is because the default servlet was designed and documented only for mapping to /* Since so many people mis-use it (which creates security issues) support for mapping to something other than /* was added in 6.0.30 onwards. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Static resource mapping in web.xml
Your easiest workaround is to use a filter. So 1) have the default servlet map to /* (which is the default) 2) keep the invoker declared 3) And make your filter do this ... doFilter(..) { if (request.getServletPath().matches(regex-here)) { servletContext.getNamedDispatcher(invoker).forward(request,response); return; } chain.doFilter(...) } Where regex-here is something which limits the mayhem you are imposing on yourself .. like this: /servlet/com\.yourcompany\..+ -Tim On 6/8/2011 10:17 AM, falva...@geocom.com.uy wrote: Dear all, I'm faceing the following problem in tomcat (probably just configuration). I have a WEBAPP which uses the invoker servlet (i know how bad it is, but for now it gets the job done). The static content is under /images/ path. So a tipical URL was likehttp://host:8080/webapp/servlet/home; http://host:8080/webapp/servlet/home. To avoid the servlet part of the URL I layed hands in web.xml. This is the result: web-app servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping servlet-mapping servlet-namedefault/servlet-name url-pattern/images/*/url-pattern /servlet-mapping /web-app The problem is that static content is not shown under images, it is shown under images/images. For example: http://host:8080/webapp/images/help.png ERROR http://host:8080/webapp/images/images/help.pngOK In order to keep things as tidy as possible I would like static content to be served under images. Using ROOT is not an option because this tomcat is shared among several WEBAPPS. Is there anything wrong with my configuration or am I missing something? This post addresses the same issue: http://stackoverflow.com/questions/234210/can-anyone-explain-servlet-mapping Thanks in advance and please excuse my bad English. Best regards, Federico. OS CentOS 5 Tomcat6.0.29 JVM 1.6.0_20-b02
serving pre-compressed files
Greetings, I'm using Tomcat 7.0.14 and IBM Java 6. As part of my web application's bundling mechanism (via Maven) I have the ability to pre-gzip compress static resources. I'd like Tomcat to detect that a request for /path/to/resource has /path/to/resource.gz available, and serve the gzip'd content instead, if the user agent supports it. Is there anything like this available? If not, what suggestions do you have? Thanks, -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Static resource mapping in web.xml
Thanks Mark. I'll try to upgrade to the latest then. Invoker: I know it is bad (even more than the overlord), probably don't know how bad or the impact it has in usage, but for now it works. I've read some about it, but never could really understand the problems it brings. In our current situation, mapping the servlets is a bit messy, probably because our developing process is messy... Thanks again Mark. Regards, Federico. -Mensaje original- De: Mark Thomas [mailto:ma...@apache.org] Enviado el: miércoles, 08 de junio de 2011 11:35 Para: Tomcat Users List Asunto: Re: Static resource mapping in web.xml On 08/06/2011 15:17, falva...@geocom.com.uy wrote: I have a WEBAPP which uses the invoker servlet (i know how bad it is, but for now it gets the job done). That is such a monumentally bad idea I'm not at all sure you really do understand just how bad it is. The problem is that static content is not shown under images, it is shown under images/images. That is because the default servlet was designed and documented only for mapping to /* Since so many people mis-use it (which creates security issues) support for mapping to something other than /* was added in 6.0.30 onwards. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: serving pre-compressed files
Jesse Farinacci wrote: Greetings, I'm using Tomcat 7.0.14 and IBM Java 6. As part of my web application's bundling mechanism (via Maven) I have the ability to pre-gzip compress static resources. I'd like Tomcat to detect that a request for /path/to/resource has /path/to/resource.gz available, and serve the gzip'd content instead, if the user agent supports it. Is there anything like this available? If not, what suggestions do you have? Thanks, Suggestion : create a servlet filter to do this. But I would first check if the urlrewrite filter, at www.tuckey.org, cannot already do that. I would not be surprised. Do not forget in that case, that you will have to add a response header letting the client know that you are doing this (Transport-encoding: ?) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Static resource mapping in web.xml
falva...@geocom.com.uy wrote: ... Invoker: I know it is bad (even more than the overlord), probably don't know how bad or the impact it has in usage, but for now it works. I've read some about it, but never could really understand the problems it brings. http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3 Basically, unless you are very very careful, it allows anyone, through a carefully crafted request URL, to invoke this nasty class in this nasty jar, which does a rm -r /* or a cat /etc/my/secret/file or whatever else is really nasty. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Static resource mapping in web.xml
Interesting Tim. But a little confusing for me. Never used filters, but for what you said and I googled: I would have to build a filter and map it to /images/*, right? Something like: filter filter-nameResource filter/filter-name filter-classcom.mycompany.resourcefilter/filter-class /filter filter-mapping filter-nameResource filter mapped/filter-name servlet-name/images/*/servlet-name /filter-mapping If I understand correctly, every request made to this URL path will be answerd with what I declare in the filter. Am I in the correct way? -Mensaje original- De: Tim Funk [mailto:funk...@apache.org] Enviado el: miércoles, 08 de junio de 2011 11:47 Para: Tomcat Users List Asunto: Re: Static resource mapping in web.xml Your easiest workaround is to use a filter. So 1) have the default servlet map to /* (which is the default) 2) keep the invoker declared 3) And make your filter do this ... doFilter(..) { if (request.getServletPath().matches(regex-here)) { servletContext.getNamedDispatcher(invoker).forward(request,response); return; } chain.doFilter(...) } Where regex-here is something which limits the mayhem you are imposing on yourself .. like this: /servlet/com\.yourcompany\..+ -Tim On 6/8/2011 10:17 AM, falva...@geocom.com.uy wrote: Dear all, I'm faceing the following problem in tomcat (probably just configuration). I have a WEBAPP which uses the invoker servlet (i know how bad it is, but for now it gets the job done). The static content is under /images/ path. So a tipical URL was likehttp://host:8080/webapp/servlet/home; http://host:8080/webapp/servlet/home. To avoid the servlet part of the URL I layed hands in web.xml. This is the result: web-app servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping servlet-mapping servlet-namedefault/servlet-name url-pattern/images/*/url-pattern /servlet-mapping /web-app The problem is that static content is not shown under images, it is shown under images/images. For example: http://host:8080/webapp/images/help.png ERROR http://host:8080/webapp/images/images/help.pngOK In order to keep things as tidy as possible I would like static content to be served under images. Using ROOT is not an option because this tomcat is shared among several WEBAPPS. Is there anything wrong with my configuration or am I missing something? This post addresses the same issue: http://stackoverflow.com/questions/234210/can-anyone-explain-servlet-mapping Thanks in advance and please excuse my bad English. Best regards, Federico. OS CentOS 5 Tomcat6.0.29 JVM 1.6.0_20-b02 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
redirect to another URL in tomcat
Hi Hope someone could provide some information on how to redirect to another URL,can be configured. for example https://ipaddress/channelmgr/MaxisUssd --- /http://ipaddress/soap/rpc Is there a way in the system we could redirect the URL? Please assist. Thanks Renu - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirect to another URL in tomcat
On Wed, Jun 8, 2011 at 17:23, RenuKumar r...@dbxpert.com.my wrote: Hi Hope someone could provide some information on how to redirect to another URL,can be configured. for example https://ipaddress/channelmgr/MaxisUssd --- /http://ipaddress/soap/rpc Is there a way in the system we could redirect the URL? What do you call the system exactly? Do you want a visible redirect or a silent redirect? You can do it at the Apache level, and with Java for sure - as I never use Tomcat as a frontend directly, I don't know for Tomcat. But it is certainly doable. -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: redirect to another URL in tomcat
From: RenuKumar [mailto:r...@dbxpert.com.my] Subject: redirect to another URL in tomcat Hope someone could provide some information on how to redirect to another URL,can be configured. Try this: http://www.tuckey.org/urlrewrite/ You don't need any front end for this. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Auth in Context.xml
Hi, In Context.xml I have set Auth=Application and want to connect with DataSource programatically. I am not seeing any example of how to do it. Can you share some link related to this? Thanks, Umesh http://www.mindtree.com/email/disclaimer.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Static resource mapping in web.xml
I know we are going a little off the original topic, but for me this is very interesting. I think I understand your point: Any library in /webapp/lib/ that has access to executing linux commands (as you point) could be executed as well from any browser. If invoker is not enabled, unless this class is mapped there is no possible harm. Your example made clear the damage potential in using invoker. But: unless there are JARs with this capabilities in Tomcats distribution or standard packages (like xstream, axis, itext, ...) this is a very improbable situation, right? Because whoever writes this URL should precisely know the architecture of the application in order to use a non-standard library or servlet. -Mensaje original- De: André Warnier [mailto:a...@ice-sa.com] Enviado el: miércoles, 08 de junio de 2011 12:21 Para: Tomcat Users List Asunto: Re: Static resource mapping in web.xml falva...@geocom.com.uy wrote: ... Invoker: I know it is bad (even more than the overlord), probably don't know how bad or the impact it has in usage, but for now it works. I've read some about it, but never could really understand the problems it brings. http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3 Basically, unless you are very very careful, it allows anyone, through a carefully crafted request URL, to invoke this nasty class in this nasty jar, which does a rm -r /* or a cat /etc/my/secret/file or whatever else is really nasty. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Static resource mapping in web.xml
No - images will be served by the default servlet so nothing needs to be done for images. The filter is used as a way to let the invoker work and be a tiny bit more secure. So the filter is mapped to /* and will forward anything to the invoker serllet if the requested path *looks like one of your classes*. ... otherwise the filter uses chain.doFilter(...) to let the request be handled by any other mapped servlets. (In this case the default servlet) There are many tutorials on the web about filters -Tim On 6/8/2011 11:25 AM, falva...@geocom.com.uy wrote: Interesting Tim. But a little confusing for me. Never used filters, but for what you said and I googled: I would have to build a filter and map it to /images/*, right? Something like: filter filter-nameResource filter/filter-name filter-classcom.mycompany.resourcefilter/filter-class /filter filter-mapping filter-nameResource filter mapped/filter-name servlet-name/images/*/servlet-name /filter-mapping If I understand correctly, every request made to this URL path will be answerd with what I declare in the filter.
Re: Wine and tomcat
Presently we use a library called EzJcom. It is proprietary. In the future, we want to change for POI but I will not be able to to everything we do with EzJcom. We need to connect to excel in realtime. Come over onto the POI user list - http://poi.apache.org/mailinglists.html - and describe what you mean by connect to excel in realtime. It is possible that POI can do what you need to do - and within your webapps and in Java. Driving a GUI on a server via a JCOM bridge is a real PITA and not stable. Best Regards, Dave Thanks a lot for your answer. Konstantin Kolinko wrote: 2011/6/8 bigdidz didier.am...@gmail.com: I know but its is not what I want. With a vm, I will not be able to debug my web applications (it uses Excel...). Hence, I really need to wine tomcat. Do you really need Excel? Have you heard about Apache POI? http://poi.apache.org/ [QUOTE] Using CATALINA_BASE: C:\_easa\trunk\server\tomcat Using CATALINA_HOME: C:\_easa\trunk\server\tomcat Using CATALINA_TMPDIR: C:\_easa\trunk\server\tomcat\temp Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_25 File not found Turn on echo and debug the batch file. Or write your own. The only thing that matters is the javaw -Dcatalina.base= -Dcatalina.home= o.a.c.s.Bootstrap start line that starts Tomcat. BTW, javaw is likely to be unavailable in Linux. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Wine-and-tomcat-tp31798273p31798909.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Static resource mapping in web.xml
falva...@geocom.com.uy wrote: I know we are going a little off the original topic, but for me this is very interesting. I think I understand your point: Any library in /webapp/lib/ that has access to executing linux commands (as you point) could be executed as well from any browser. No, unless it is specifically mapped to a URL in web.xml. If invoker is not enabled, unless this class is mapped there is no possible harm. Your example made clear the damage potential in using invoker. But: unless there are JARs with this capabilities in Tomcats distribution or standard packages (like xstream, axis, itext, ...) this is a very improbable situation, right? All of those are open-source. So anyone can examine the code to determine if there is some function in there that can be misused. Because whoever writes this URL should precisely know the architecture of the application in order to use a non-standard library or servlet. Yes, but they can find out, using the same invoker servlet. They just have to try any URL they can think of, until it works.. Have you ever looked at your Internet webserver logs, and seen lines like these ? [Tue May 31 04:02:30 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/w00tw00t.at.blackhats.romanian.anti-sec:) [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/phpMyAdmin [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/phpmyadmin [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/pma [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/myadmin [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/MyAdmin Now, where do you think these come from ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
My web application to use SSL (JSSE - RSA)
Dear caring souls, I'm just subscribed in 'Tomcat users List'. I'm trying to get my first applic using SSL started. I read therefor SSL Configuration HOW-TOhttp://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configurationn times. I'm using - Apache Tomcat 7.0.11 - NetBeans IDE 7.0 (Build 20110408) - Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03 ; and its included JRE (C:\Program Files\Java\jdk1.6.0_22\jre) - System: Windows XP version 5.1 running on x86; Cp1252; fr_BE (nb) on my desktop PC with AMD Athlon(tm) 64 Processor ... Please, here my question : When I compile and run my 'Test1' applic inside the IDE, I get: Starting of Tomcat failed BUILD FAILED ... SEVERE: Failed to initialize end point associated with ProtocolHandler [http-nio-443] SEVERE: Failed to initialize connector [Connector[org.apache.coyote.http11.Http11NioProtocol-443]] SEVERE: Error starting static Resources a s o Pls, see a copy of my 'Tomcat 7.0' output window in the attached WordPad file (8-jun-2011 18:05:11 Tomcat issue.rtf). I also attached my 'server.xml' file Thanks a lot for trying to help me. Chavadam P.S.: Why doesn't Apache Tomcat use a usual forum application on a website for all his support questions ? (Like NetBeans, Oracle, mySQL, ...) My mailbox is getting quickly much too full ... No provision for Quote neither Code inserts ... ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=8005 shutdown=SHUTDOWN !-- Security listener. Documentation at /docs/config/listeners.html Listener className=org.apache.catalina.security.SecurityListener / -- !--APR library loader. Documentation at /docs/apr.html -- Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener / !-- Prevent memory leaks due to use of particular java/javax APIs-- Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.core.ThreadLocalLeakPreventionListener / !-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container Note: A Service is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/service.html -- Service name=Catalina !--The connectors can use a shared executor, you can define one or more named thread pools-- !-- Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ -- !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 -- !-- Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / -- !-- A Connector using the shared thread pool -- !-- Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / -- !-- Define a SSL HTTP/1.1 Connector on port 8443
RE: Static resource mapping in web.xml
I thought the filter would allow me to serve the static resources under /images/. I understand if it is in order to make invoker more secure. But what I'm actually trying to achieve is the proper serving of resources. I don't know exactly why, but mapping the default servlet to /* is not working (probably my fault). What Mark pointed in his first mail is that this kind of mapping was added in release 6.0.30. I'll try this as soon as possible. -Mensaje original- De: Tim Funk [mailto:funk...@apache.org] Enviado el: miércoles, 08 de junio de 2011 12:44 Para: Tomcat Users List Asunto: Re: Static resource mapping in web.xml No - images will be served by the default servlet so nothing needs to be done for images. The filter is used as a way to let the invoker work and be a tiny bit more secure. So the filter is mapped to /* and will forward anything to the invoker serllet if the requested path *looks like one of your classes*. ... otherwise the filter uses chain.doFilter(...) to let the request be handled by any other mapped servlets. (In this case the default servlet) There are many tutorials on the web about filters -Tim On 6/8/2011 11:25 AM, falva...@geocom.com.uy wrote: Interesting Tim. But a little confusing for me. Never used filters, but for what you said and I googled: I would have to build a filter and map it to /images/*, right? Something like: filter filter-nameResource filter/filter-name filter-classcom.mycompany.resourcefilter/filter-class /filter filter-mapping filter-nameResource filter mapped/filter-name servlet-name/images/*/servlet-name /filter-mapping If I understand correctly, every request made to this URL path will be answerd with what I declare in the filter. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: async requests on cluster
On 6/7/2011 3:34 PM, Mark Thomas wrote: On 07/06/2011 21:46, Seth Lenzi wrote: The isAsyncSupported() method of the SerlvletRequest object returns false when you uncomment theCluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/ element in the server.xml file (Tomcat 7.0.14). Basically, enabling clustering seems to break support for asynchronous servlets... Is there something else that needs to be done to enable async requests to work on a cluster? That would be a bug. Looking at it now, the fix should make it into the next 7.0.x release (7.0.16). I'll be starting on that release once this issue is fixed. not a bug,just not a feature yet implemented. replication is triggered when a request ends. when async is in play, replication must be replicated based on an interval, or when the request is finally complete. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1382 / Virus Database: 1511/3688 - Release Date: 06/08/11 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Static resource mapping in web.xml
Thanks a lot André for taking the time in explaining. Currently we do not have this kind of attacks because the app runs in an intranet. But I know that in this closed scenario we should beware of the users. Hopefully, someday, we will be able to properly map this application in web.xml and leave this problems behind (and get new ones ;)). Thanks again. Best regards, Federico. -Mensaje original- De: André Warnier [mailto:a...@ice-sa.com] Enviado el: miércoles, 08 de junio de 2011 13:02 Para: Tomcat Users List Asunto: Re: Static resource mapping in web.xml falva...@geocom.com.uy wrote: I know we are going a little off the original topic, but for me this is very interesting. I think I understand your point: Any library in /webapp/lib/ that has access to executing linux commands (as you point) could be executed as well from any browser. No, unless it is specifically mapped to a URL in web.xml. If invoker is not enabled, unless this class is mapped there is no possible harm. Your example made clear the damage potential in using invoker. But: unless there are JARs with this capabilities in Tomcats distribution or standard packages (like xstream, axis, itext, ...) this is a very improbable situation, right? All of those are open-source. So anyone can examine the code to determine if there is some function in there that can be misused. Because whoever writes this URL should precisely know the architecture of the application in order to use a non-standard library or servlet. Yes, but they can find out, using the same invoker servlet. They just have to try any URL they can think of, until it works.. Have you ever looked at your Internet webserver logs, and seen lines like these ? [Tue May 31 04:02:30 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/w00tw00t.at.blackhats.romanian.anti-sec:) [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/phpMyAdmin [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/phpmyadmin [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/pma [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/myadmin [Tue May 31 04:02:31 2011] [error] [client 91.121.243.113] File does not exist: /var/www/default/docs/MyAdmin Now, where do you think these come from ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: My web application to use SSL (JSSE - RSA)
From: Charles Van Damme [mailto:chava...@gmail.com] Subject: My web application to use SSL (JSSE - RSA) I'm trying to get my first applic using SSL started. I read therefor SSL Configuration HOW-TO n times. Including the part about there being *two* SSL mechanisms? Which one are you actually using, APR or pure Java? When I compile and run my 'Test1' applic inside the IDE When diagnosing problems, simplify the environment as much as possible: get the IDE out of the picture. Go ahead and build your webapp with the IDE, but run Tomcat separately. IDEs have a nasty habit of using their own configurations for servers, ignoring what you think you've got set. Pls, see a copy of my 'Tomcat 7.0' output window in the attached WordPad file (8-jun-2011 18:05:11 Tomcat issue.rtf). Stripped, thankfully. (See below about viruses.) Why doesn't Apache Tomcat use a usual forum application on a website for all his support questions ? Because forums are crap. My mailbox is getting quickly much too full ... Learn where the delete key is. No provision for Quote neither Code inserts ... Or viruses. Messages are all in plain text. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Static resource mapping in web.xml
If your images are in the correct directory then tomcat will serve them for you with its DefaultServlet. There should be nothing to do. Then to serve resources via the invoker - this is where the filter is handy. You declare the invoker servlet - but you do not map it. The servlet api allows you to invoke an unmapped servlet by requesting it by name from the ServletContext. So the filter is doing the access control mapping to determine if the invoker should be invoked. -Tim On Wed, Jun 8, 2011 at 12:34 PM, falva...@geocom.com.uy wrote: I thought the filter would allow me to serve the static resources under /images/. I understand if it is in order to make invoker more secure. But what I'm actually trying to achieve is the proper serving of resources. I don't know exactly why, but mapping the default servlet to /* is not working (probably my fault). What Mark pointed in his first mail is that this kind of mapping was added in release 6.0.30. I'll try this as soon as possible.
RE: Auth in Context.xml
From: Umesh Bhatt [mailto:umesh_bh...@mindtree.com] Subject: Auth in Context.xml In Context.xml No such file is recognized by Tomcat. Tomcat does look at files named context.xml (case matters - even on Windows). I have set Auth=Application There is no such attribute for the Context element. Perhaps you should show us what you actually did, not describe what you think you did. Also include pertinent information such as the Tomcat version, the JVM level you're running on, and the platform you're using. and want to connect with DataSource programatically. What exactly do you mean by that? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Static resource mapping in web.xml
I agree with you. The static resources where never a problem to me, but since I messed with the web.xml they started to behave oddly. Maybe this line is causing trouble: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping It used to be: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping What do you think? Can this be interfering with the requests to resources? -Mensaje original- De: Tim Funk [mailto:funk...@apache.org] Enviado el: miércoles, 08 de junio de 2011 14:09 Para: Tomcat Users List Asunto: Re: Static resource mapping in web.xml If your images are in the correct directory then tomcat will serve them for you with its DefaultServlet. There should be nothing to do. Then to serve resources via the invoker - this is where the filter is handy. You declare the invoker servlet - but you do not map it. The servlet api allows you to invoke an unmapped servlet by requesting it by name from the ServletContext. So the filter is doing the access control mapping to determine if the invoker should be invoked. -Tim On Wed, Jun 8, 2011 at 12:34 PM, falva...@geocom.com.uy wrote: I thought the filter would allow me to serve the static resources under /images/. I understand if it is in order to make invoker more secure. But what I'm actually trying to achieve is the proper serving of resources. I don't know exactly why, but mapping the default servlet to /* is not working (probably my fault). What Mark pointed in his first mail is that this kind of mapping was added in release 6.0.30. I'll try this as soon as possible. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
War file deployment deletes configuration descriptor in Tomcat 6
Hi, Every time I deploy war file in webapps, it deletes the configuration descriptor which is present at $CATALINA_BASE/conf/[enginename]/[hostname] directory. Tomcat auto deploys war file in my Tomcat 6 configuration. How should I stop this problem? Any idea? Thanks, DS.
ServletRequestListener and Expect-Header
Hi, I have a ServletRequestListener that tries too access a Request Parameter: sre.getServletRequest().getParameter(x); When I send a POST-Request with the Expect: 100-continue HTTP Header it hangs waiting for the Request Body which isn't send because Tomcat didn't send a 100-continue Response. See the Stacktrace at [1]. This happens with a Tomcat built from SVN-Trunk. This problem only occurs in a ServletRequestListener. Accessing a Request Parameter from a Servlet works, because the Request is acknowledged beforehand (StandardWrapperValve:176). I would suggest to acknowledge the Request in catalina.connector.Request.parseParameters(). Any ideas or help with submitting a patch is greatly appreciated. [1] http://pastebin.com/r2J0P3qx Best, Simon - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Static resource mapping in web.xml
yes - that would be a problem. The invoker doesn't know how to serve static resources. -Tim On Wed, Jun 8, 2011 at 1:44 PM, falva...@geocom.com.uy wrote: I agree with you. The static resources where never a problem to me, but since I messed with the web.xml they started to behave oddly. Maybe this line is causing trouble: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping It used to be: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping What do you think? Can this be interfering with the requests to resources?
RE: Static resource mapping in web.xml
Thanks Tim. If this is the case I could make it weight-in in the matter of building a well formed web.xml. Although it could take some time. Mapping each servlet to an /* url-pattern will avoid us from using invoker and at the same time get rid of /servlet in the URL and keep images under /images. Thanks a lot Tim and thanks to all. Regards, Federico. -Mensaje original- De: Tim Funk [mailto:funk...@apache.org] Enviado el: miércoles, 08 de junio de 2011 14:53 Para: Tomcat Users List Asunto: Re: Static resource mapping in web.xml yes - that would be a problem. The invoker doesn't know how to serve static resources. -Tim On Wed, Jun 8, 2011 at 1:44 PM, falva...@geocom.com.uy wrote: I agree with you. The static resources where never a problem to me, but since I messed with the web.xml they started to behave oddly. Maybe this line is causing trouble: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping It used to be: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping What do you think? Can this be interfering with the requests to resources? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: My web application to use SSL (JSSE - RSA)
Dear, 1) I'm trying first with JSSE. Please see !-- Connectors ... in my server.xml file. 2) How can I prevent my NetBeans IDE to start a Tomcat server ? To run and stop Tomcat separately, I figure that you mean start Cmd C:\Program Files\apache-tomcat-7.0.11\bin\startup.bat and shutdown.bat 3) What do I have to do to avoid that it grumbles when I try to use RSA ? Thanks Ch On Wed, Jun 8, 2011 at 7:05 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Charles Van Damme [mailto:chava...@gmail.com] Subject: My web application to use SSL (JSSE - RSA) I'm trying to get my first applic using SSL started. I read therefor SSL Configuration HOW-TO n times. Including the part about there being *two* SSL mechanisms? Which one are you actually using, APR or pure Java? When I compile and run my 'Test1' applic inside the IDE When diagnosing problems, simplify the environment as much as possible: get the IDE out of the picture. Go ahead and build your webapp with the IDE, but run Tomcat separately. IDEs have a nasty habit of using their own configurations for servers, ignoring what you think you've got set. Pls, see a copy of my 'Tomcat 7.0' output window in the attached WordPad file (8-jun-2011 18:05:11 Tomcat issue.rtf). Stripped, thankfully. (See below about viruses.) Why doesn't Apache Tomcat use a usual forum application on a website for all his support questions ? Because forums are crap. My mailbox is getting quickly much too full ... Learn where the delete key is. No provision for Quote neither Code inserts ... Or viruses. Messages are all in plain text. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: War file deployment deletes configuration descriptor in Tomcat 6
I found that when it deletes the configuration descriptor, it doesn't deploy it. I am not able to understand why it is not deploying the descriptor Logs from catalina.out: *When the configuration descriptor is not deleted: * Jun 8, 2011 4:31:45 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/MOVE] Jun 8, 2011 4:31:46 PM org.apache.catalina.startup.HostConfig deployDescriptor *INFO: Deploying configuration descriptor MOVE.xml* Jun 8, 2011 4:31:46 PM org.apache.catalina.startup.HostConfig deployDescriptor WARNING: A docBase /opt/hsnweb/web94d/tomcat/webapps/MOVE inside the host appBase has been specified, and will be ignored *This is when configuration descriptor is deleted: * Jun 8, 2011 4:44:18 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/MOVE] Jun 8, 2011 4:44:20 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive MOVE.war On Wed, Jun 8, 2011 at 1:47 PM, Dharamshila Khandelwal dharmshil...@gmail.com wrote: Hi, Every time I deploy war file in webapps, it deletes the configuration descriptor which is present at $CATALINA_BASE/conf/[enginename]/[hostname] directory. Tomcat auto deploys war file in my Tomcat 6 configuration. How should I stop this problem? Any idea? Thanks, DS.
Null-pointer exception from response.encodeUrl under Windows Tomcat 7
Hi, I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. This is with Tomcat 7.0.14, the latest stable version to which I upgraded an hour ago, and Java 1.6.0_26, which again I upgraded to at the same time, under Windows XP. I also got the error under Tomcat 5.5.33, which is why I tried upgrading. I uninstalled old Tomcats and Javas before upgrading. Here's a trace of the error: java.lang.NullPointerException at org.apache.catalina.connector.Response.toAbsolute(Response.java:1594) at org.apache.catalina.connector.Response.encodeURL(Response.java:1198) at org.apache.catalina.connector.ResponseFacade.encodeUrl(ResponseFacade.java:422) at sharesim.ValueGame.encodeUrl(ValueGame.java:468) The fourth line of the trace is my code. To get some diagnostics, I encapsulated 'response.encodeUrl' in the following method, and used 'println' to print to Tomcat's log. This method is the one mentioned on the fourth line of the above trace. private final static String encodeUrl( HttpServletResponse response , String url ) { System.out.println( encodeUrl ); System.out.println( response= + response ); System.out.println( url= + url ); String result = null; if ( response == null ) result = not on Web; else result = response.encodeUrl( url ); System.out.println( result= + result ); return result; } As mentioned above, the errors are sporadic. My redirection code gets called on my server when I submit one of my forms. But sometimes, the submit works; sometimes it doesn't. Here are two successive traces from the above method: encodeUrl response=org.apache.catalina.connector.ResponseFacade@1a5ec6c url=/ResearcherValueGame1.jsp result=/ResearcherValueGame1.jsp encodeUrl response=org.apache.catalina.connector.ResponseFacade@1a5ec6c url=/ResearcherValueGame1.jsp The first one worked; the second crashed rather than returning the encoded URL. The URL to be encoded is the same in both cases, and 'response' is evidently the same instance. I don't know how to dump 'response' in order to show relevant fields (whichever they are), but am happy to try it if someone can suggest how. I've found a few mentions on Google of such errors, but nothing definite about it happening in Tomcat 7. One discussion which I thought I'd seen, but can't find again, seemed to suggest that the problem occurred on version 5, possibly because of a missing 'synchronized'. I've not seen anything in recent postings to this list. I wondered whether the problem might be caused by the browser creating malformed cookies, or some such. (I'm using session-handling.) However, this seems unlikely, as the error occurs regardless of whether I use Firefox, Internet Explorer, or Google Chrome. Any ideas? Jocelyn Ireson-Paine http://www.j-paine.org Jocelyn's Cartoons: http://www.j-paine.org/blog/jocelyns_cartoons/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Auth in Context.xml
Hi, I am using Tomcat 6.0. In Context.xml file I found JDBC resource configuration as below. Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=javauser password=javadude driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/javatest/ It has Auth attribute which can be either Container or Application. When it is set to Container then we need to give DB user name and password in context.xml file and it will be used by tomcat to connect DB. I don't want to use tomcat to setup connection rather want my application to setup connection with DB. As per Tomcat documentation for this I need to use Auth=Application, I am doing this and but then my application is not able to setup connection with DB. So I want to know if there is more explanation around it's usage. Thanks, Umesh -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, June 08, 2011 10:41 PM To: Tomcat Users List Subject: RE: Auth in Context.xml From: Umesh Bhatt [mailto:umesh_bh...@mindtree.com] Subject: Auth in Context.xml In Context.xml No such file is recognized by Tomcat. Tomcat does look at files named context.xml (case matters - even on Windows). I have set Auth=Application There is no such attribute for the Context element. Perhaps you should show us what you actually did, not describe what you think you did. Also include pertinent information such as the Tomcat version, the JVM level you're running on, and the platform you're using. and want to connect with DataSource programatically. What exactly do you mean by that? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org http://www.mindtree.com/email/disclaimer.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Auth in Context.xml
From: Umesh Bhatt [mailto:umesh_bh...@mindtree.com] Subject: RE: Auth in Context.xml I am using Tomcat 6.0. 6.0.what? There are 32 versions of 6.0; be precise. In Context.xml file Again, if you have a file named Context.xml, it will be ignored. Files must be named (and located) properly for Tomcat to use them. Exactly what is the file name, where is it located, and what are the full contents of the file? I found JDBC resource configuration as below. Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=javauser password=javadude driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/javatest/ It has Auth attribute No, it has an auth attribute, not Auth; everything here is case-sensitive, so get it right. I don't want to use tomcat to setup connection rather want my application to setup connection with DB. Still fooling yourself into thinking it's safer to bury the password in the application than in the configuration file? Waste of time. But if you insist on doing it, use the getConnection() method that has userid and password as arguments. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7
From: Jocelyn Ireson-Paine [mailto:p...@j-paine.org] Subject: Null-pointer exception from response.encodeUrl under Windows Tomcat 7 I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. First off, let me say that it's an unexpected pleasure to read such a complete (and literate) problem description; this is a model of what we'd like to see in all enquiries. Now to the problem at hand: from browsing through the code, it appears the exception can occur if the original request had no scheme (e.g., http, https) associated with it. I would hazard a guess that might come from an ill-constructed forward somewhere inside the webapp, since I don't think a schemeless request could come in from the outside. Can you display the original request URL, or perhaps enable the AccessLogValve? (I'm not sure if that captures forwards, however.) - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org