Re: What can url-pattern accept?
I ended up with something interesting with tomcat. I basically have two security-constraint, in the first one I put url-pattern*.do/url-pattern and in the second one, I put url-pattern/admin/*/url-pattern. Tomcat just did what I want, the user with role matching the first constraint does not have access to anything /admin/*. It works in both Tomcat 5.5 and 6.0. It is probably not the specification complied solution. But good enough for me now. On Sun, Aug 17, 2008 at 6:27 PM, Bill Barker [EMAIL PROTECTED] wrote: André Warnier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Guojun Zhu wrote: [...] Unfortunately, it seems that the servlet API allows only this in url-pattern specs : - A string beginning with a / character and ending with a /* suffix is used for path mapping. - A string beginning with a *. prefix is used as an extension mapping. - A string containing only the / character indicates the default servlet of the application. In this case the servlet path is the request URI minus the context path and the path info is null. Actually, I don't think that Tomcat supports url-pattern//url-pattern (although it clearly should under the very brain-dead wording of the spec here). There seem to be other spec violations in Tomcat here, since if you have a one security-constraint for *.do, and another one for /admin/*, then Tomcat considers both of them for a request to /myapp/admin/foo.do. However, the spec (at least for v2.5) says that only the /admin/* constraint should be considered. And this is where the brain-dead part kicks in :(, since Tomcat's implementation makes more sense than the spec. Hopefully someone will fix this in the Servlet 3.0 spec. - All other strings are used for exact matches only. In other words, /admin/*.do is not a valid way to match what you want, since it will match only /admin/*.do, literally. For 20 years at least, there have been 2 widely-used pattern-matching variations in existence : - the file glob kind of pattern, where * anywhere matches any number of characters and ? anywhere matches one character - regular expressions Why the designers of the servlet API found it useful or necessary to invent yet their own different way of matching wildcards, and a rather brain-dead one at that, is beyond me. But so it seems to be. This being said, it seems that there exists a servlet filter which allows much more flexibility. I have not tried it myself yet, but I have seen a lot of nice things written about it. Check out : http://tuckey.org/urlrewrite/ André - 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]
tomcat 5.5 unicode issiues!
Hi, I have some files in my site that contain some characters that the tomcat 5.5 dont parse them correctly and thus I get 404 error file not found. For instance the file names are: bbb%e2%80%99s-bbb-.htm ggg-xx-eee’s-car.htm got-it….htm catch-a-f….htm this file ‘to-catch-a-thief….htm’ is being translated to this ‘to-catch-a-thief%E2%80%A6.htm’ by tomcat. Do I need to configure something to the tomcat so I would be able to parse it well. Thanks in advanced
RE: How to tell Tomcat to use an additional classpath other than web-inf/classes?
Why not add the path to the CLASSPATH variable in the 'TOMCAT_HOME/bin/setclasspath.sh' script (or setclasspath.bat for Windows)? We've done that for getting Tomcat to recognize server-specific properties files and it seems to do the trick. Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of swimming_rabbit Sent: Friday, August 15, 2008 2:48 PM To: users@tomcat.apache.org Subject: How to tell Tomcat to use an additional classpath other than web-inf/classes? Does anyone know of a way to tell Tomcat to use an additional classpath (other than WEB-INF/classes) when loading an application? I've got an off the shelf application that requires us to copy our custom classes into the application's WEB-INF/classes/ directory every time we upgrade, which is frequent. Ideally, I would like to put the upgraded files on nfs (which is outside Tomcat folder) that Tomcat can pick up every time it is restarted. -- View this message in context: http://www.nabble.com/How-to-tell-Tomcat-to-use-an-additional-classpath-othe r-than-web-inf-classes--tp19004517p19004517.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] - 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 tell Tomcat to use an additional classpath other than web-inf/classes?
From: Dave Bender [mailto:[EMAIL PROTECTED] Subject: RE: How to tell Tomcat to use an additional classpath other than web-inf/classes? Why not add the path to the CLASSPATH variable in the 'TOMCAT_HOME/bin/setclasspath.sh' script (or setclasspath.bat for Windows)? Because that prevents the webapp from being reloaded without starting Tomcat. It also introduces the distinct possibility of duplicating classes in the classloader hierarchy. Putting anything in CLASSPATH other than the bare minimum Tomcat itself (not any webapp) actually needs is a Really Bad Idea. - 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: starting tomcat at system boot
On Tue, Aug 19, 2008 at 10:33 PM, Bill Barker [EMAIL PROTECTED] wrote: Markus Schönhaber [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Zemian Deng wrote: When setting up tomcat during boot startup on a linux/unix, is there more advantage using jsrv that comes with Tomcat as describe here: http://tomcat.apache.org/tomcat-6.0-doc/setup.html VS Just a plain shell script that calls catalina.sh ? With jsvc Tomcat is able to bind to privileged ports (for example 80, 443) and drop root privileges right afterwards. If you just use the shell scripts, you'd have to run Tomcat as root if you'd want it to bind to privileged ports[1]. There is one other (usually small) advantage to jsvc. With jsvc, the shutdown port isn't used, so only root can shutdown/restart Tomcat. With the scripts, anyone with physical access to the machine can shutdown Tomcat. ASWSOME!!! Great to know this one! Thank you both for the information! Regards mks [1] OTOH, making Tomcat *accessible* through a privileged port doesn't necessarily mean that Tomcat has to *bind* to this port. Another possibility to achieve this is, for example, to use netfilter or something to redirect traffic from a privileged port to the non-privileged port that Tomcat listens on. - 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] -- Sweet - a Scala web framework: http://code.google.com/p/sweetscala
Re: tomcat 5.5 unicode issiues!
- Original Message - From: Shahar Cohen [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, August 20, 2008 2:33 PM Subject: tomcat 5.5 unicode issiues! Hi, I have some files in my site that contain some characters that the tomcat 5.5 dont parse them correctly and thus I get 404 error file not found. For instance the file names are: bbb%e2%80%99s-bbb-.htm ggg-xx-eee’s-car.htm got-it….htm catch-a-f….htm this file ‘to-catch-a-thief….htm’ is being translated to this ‘to-catch-a-thief%E2%80%A6.htm’ by tomcat. Do I need to configure something to the tomcat so I would be able to parse it well. Thanks in advanced How are those file names getting written do disk? What it look like... is that you writing file names to disk that are still URLEnoded, and then expection them to be read... I dont think this has anything to do with unicode as such... In google on your browser type Hello There Then look at the URL... it becomes Hello%20There I think thats whats happening... Decode the file names befor you write then to disk... or else they become Hello%20There ie that is the name now... Have fun... --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Custom error page with stacktrace
L.S, I'm running tomcat to serve out XML to a custom client (not a webbrowser). In order to show an error page that this client can actually display I use custom error pages in Tomcat. For this I have specified a JSP as an error page, this works very well. However, during the test phase of our project I'd also like to add the stacktrace to the error document and optionally to a logfile. Since the client cannot interpret a normal HTML page, the standard 500 error page that comes with Tomcat is unusable. How can I access the stacktrace/error message from my own JSP or a servlet so I can output it to our own custom XML format and our testers can give proper feedback. I did some googling for this but it seems like everyone else is just trying to get rid of the stacktrace instead of changing it. Sincerely, Tom van Wietmarschen -- **Tom van Wietmarschen** Software Engineer Service2Media B.V. Vreelandseweg 7 1216 CG Hilversum Capitool 41 7521 PL Enschede Tel +31 (0)35 626 46 12 Fax +31 (0)35 626 46 13 www.service2media.com http://www.service2media.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: tomcat 5.5 Unicode issues!
Hi, Well I didn’t quite understand you all the way but trying to use your example lats say I have a file named Hello%20There.html when I try to access this file I get 404. Probably because the tomcat recognize the character % as illegitimate. So is there a way to tell tomcat that special characters like % â €™ will be parsed correctly if its not Unicode issue that what can it be? Thanks in advanced
Re: tomcat 5.5 Unicode issues!
Shahar Cohen wrote: Hi, Well I didn’t quite understand you all the way but trying to use your example lats say I have a file named Hello%20There.html when I try to access this file I get 404. Probably because the tomcat recognize the character % as illegitimate. So is there a way to tell tomcat that special characters like % â €™ will be parsed correctly if its not Unicode issue that what can it be? You need to escape the % The url for that file, assuming it was located in the ROOT context would be: http://host:port/Hello%2520There.html Thanks in advanced If your file names are UTF-8 encoded then you should be using URIEncoding=UTF-8 on your connector. 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]
Tomcat5.0.27 - javax.net.ssl.SSLException: Unrecognized SSL handshake
Hi, My application is deployed into Solaris box and java version is 1.3, Tomcat 5.0.27, apache 2.0.50. This appication access a webservice whose end point is https://. I configured this app with JSSE 1.0.3 and also configured with the below code. System.setProperty(java.protocol.handler.pkgs, com.sun.net.ssl.internal.www.protocol); Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); System.setProperty(proxySet, true); System.setProperty(http.proxyHost,MyserverIP); System.setProperty(http.proxyPort,80); System.setProperty(http.nonProxyHosts, https://mywebserviceendpoint.com;); When this application access the webservice, this application throwing the below exception. javax.net.ssl.SSLException: Unrecognized SSL handshake This solaris box doesnot have GUI and also browser. 1) Do I need to install any certificate? 2) Does 443 port should be open in my solarix box? 3) Do I need to configure anything in Tomcat or Apache? I did some research in google but of no use. Please let me know what could be the problem? Thanks, Sridhar -- View this message in context: http://www.nabble.com/Tomcat5.0.27---javax.net.ssl.SSLException%3A-Unrecognized-SSL-handshake-tp19069988p19069988.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: tomcat 5.5 Unicode issues!
Changing the URIEncoding=UTF-8 just worked. thanks -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2008 5:29 PM To: Tomcat Users List Subject: Re: tomcat 5.5 Unicode issues! Shahar Cohen wrote: Hi, Well I didn’t quite understand you all the way but trying to use your example lats say I have a file named Hello%20There.html when I try to access this file I get 404. Probably because the tomcat recognize the character % as illegitimate. So is there a way to tell tomcat that special characters like % â €™ will be parsed correctly if its not Unicode issue that what can it be? You need to escape the % The url for that file, assuming it was located in the ROOT context would be: http://host:port/Hello%2520There.html Thanks in advanced If your file names are UTF-8 encoded then you should be using URIEncoding=UTF-8 on your connector. 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]
Dual-Independent Tomcat servers, on Single Win32 host sharing IIS server.
Hello, Can anyone guide me in the right direction with my issue. Windows Server 2003, IIS 6.0, tomcat-connector 1.2.8, and Tomcat 5.0.16. I have been tasked to do the following. To get two separate Tomcat server instances running on the same host independent of each other and working off of the same IIS server (compliments of the Tomcat-Connector, and ISAPI-Filter). Getting the two servers up and running together is the easy part, and has already been achieved. They both have unique ports, and IP addresses from each other.. MY issue is the isapi filter. The workers.properties.minimal uses 8009 for ajp13, and 'localhost' worker.list=ajp13w worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009 There has to be some information out there that will guide you to create a custom workers.properties.minimal file. One of my two Tomcat servers has port 8009 assigned, and the other is using port 8109. I am assuming that I was correct on thinking this port needed to be unique from the other Tomcat server on the host? I tried to do the following, and it did not work. worker.list=ajp13w worker.ajp13w.type=ajp13 worker.ajp13w.host=192.168.0.1 worker.ajp13w.port=8009 worker.list=ajp13w2 worker.ajp13w2.type=ajp13 worker.ajp13w2.host=192.168.0.2 worker.ajp13w2.port=8109 ..and then in my uriworker.properties file /servlets-examples/*=ajp13w /jsp-examples/*=ajp13w2 I thought this would work, but clearly I am looking at this from the wrong angle. Can someone please guide me to where I can get the information to either re-write custom workers.properties.minimal and uriworker.properties files.. or what is it that I am doing wrong here. -thx *d03*
Re: tomcat 5.5 Unicode issues!
- Original Message - From: Shahar Cohen [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, August 20, 2008 4:15 PM Subject: RE: tomcat 5.5 Unicode issues! Hi, Well I didn’t quite understand you all the way but trying to use your example lats say I have a file named Hello%20There.html when I try to access this file I get 404. Probably because the tomcat recognize the character % as illegitimate. So is there a way to tell tomcat that special characters like % â €™ will be parsed correctly if its not Unicode issue that what can it be? Thanks in advanced Shahar, Do you see what Mark is showing you? See what has to happen now? What I'm saying is that who ever is wrting the files to disk like that in the first place has screwed up... Fix that if you can... eg /Hello There.html In the Url becomes Hello%20There.html If that is Decoded properly... and written to disk the file name will be Hello There.html But if its not decoded the file name will be.. Hello%20There.html And now to get that in a browser it becomes... Hello%2520There.html and if that is wrtten back to disk... its just a cock up .. To see what I'm saying open google Type hello there as a search... and search Then look at the URL see whats happening... that is called URL Encoding... its not unicode. . Just stop the file names from looking funny in the first place... thats what I'm saying. Who wants to type Hello%2520There.html anywhere ;) If it is a language thing as well then the UTF8 stuff is happening on top of URL Encoding... even if it is chinese... its still getting messed up... the decoding is wrong When ever you see %20 and %24 and %40 in stuff... its pretty much telling you that is not decoded. Read up on URL Encoding... its not a unicode thing... I think even if you are working with langauges... ie I'm pretty sure windows can display foreign langauges correctly and they dont have a %20 in them... is what we trying to tell you. Have fun --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5.5 Unicode issues!
Thanks Mark ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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: Dual-Independent Tomcat servers, on Single Win32 host sharing IIS server.
dOE wrote: I tried to do the following, and it did not work. worker.list=ajp13w worker.ajp13w.type=ajp13 worker.ajp13w.host=192.168.0.1 worker.ajp13w.port=8009 worker.list=ajp13w2 worker.ajp13w2.type=ajp13 worker.ajp13w2.host=192.168.0.2 worker.ajp13w2.port=8109 Maybe you just need to do worker.list=ajp13w,ajp13w2 worker.ajp13w.type=ajp13 worker.ajp13w.host=192.168.0.1 worker.ajp13w.port=8009 worker.ajp13w2.type=ajp13 worker.ajp13w2.host=192.168.0.2 worker.ajp13w2.port=8109 André - 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: Dual-Independent Tomcat servers, on Single Win32 host sharing IIS server.
- Original Message - From: dOE [EMAIL PROTECTED] To: Tomcat User-List users@tomcat.apache.org Sent: Wednesday, August 20, 2008 5:10 PM Subject: Dual-Independent Tomcat servers, on Single Win32 host sharing IIS server. Hello, Can anyone guide me in the right direction with my issue. Windows Server 2003, IIS 6.0, tomcat-connector 1.2.8, and Tomcat 5.0.16. I have been tasked to do the following. To get two separate Tomcat server instances running on the same host independent of each other and working off of the same IIS server (compliments of the Tomcat-Connector, and ISAPI-Filter). Getting the two servers up and running together is the easy part, and has already been achieved. They both have unique ports, and IP addresses from each other.. MY issue is the isapi filter. The workers.properties.minimal uses 8009 for ajp13, and 'localhost' worker.list=ajp13w worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009 There has to be some information out there that will guide you to create a custom workers.properties.minimal file. One of my two Tomcat servers has port 8009 assigned, and the other is using port 8109. I am assuming that I was correct on thinking this port needed to be unique from the other Tomcat server on the host? I tried to do the following, and it did not work. worker.list=ajp13w OUT worker.list=ajp13w,ajp13w2 worker.ajp13w.type=ajp13 worker.ajp13w.host=192.168.0.1 OUT worker.ajp13w.host=localhost worker.ajp13w.port=8009 worker.list=ajp13w2 OUT worker.ajp13w2.type=ajp13 worker.ajp13w2.host=192.168.0.2 OUT worker.ajp13w.host=localhost worker.ajp13w2.port=8109 ..and then in my uriworker.properties file /servlets-examples/*=ajp13w /jsp-examples/*=ajp13w2 I thought this would work, but clearly I am looking at this from the wrong angle. The systems are both on localhost... you said same machine... it can only have one IP Thats ok as long as you rightly said... the ports are different... If you using the machine in an org with no DNS... then the name of the machine will also work worker.ajp13w.host=MyMachineName But assigning actual IP's can be tricky especially if you have a DHCP server running... something that assigned IP's to machines... most MS systems do.. I think thats it... with a little play --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5.5 Unicode issues!
Shahar Cohen wrote: Changing the URIEncoding=UTF-8 just worked. Shahar, what Mark and in a more verbose way Johnny are trying to tell you, is 1) the first problem is to figure out how and why these files arrived on your system's disk with such names, and if possible correct that. They are not normal names for files, and could give you any kind of trouble in the future, such as when you will try to do a backup of your server, or list them in directories, or sort the filenames alphabetically, or access them via DAV or Samba, etc.. etc.. 2) changing the URIEncoding on your server to UTF-8 is also not something you should just do lightly and unilaterally, because you may then have problems with browsers who will *not* send request URI's as UTF-8. By default, most browsers will not, so unless you know and control who is going to access your server with what and from which pages, you are probably creating an even bigger problem for the future. André - 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: Dual-Independent Tomcat servers, on Single Win32 host sharing IIS server.
Johnny Kewl wrote: The systems are both on localhost... you said same machine... it can only have one IP nit-picking Not true. The most obvious case is a machine with multiple NICs. You can also assign multiple IP addresses to the same physical interface. You don't see it often but you would use it, for example, during failover with some clustering technologies so a live node will receive the traffic from a dead node. /nit-picking 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: Disabling catalina.out log
Truncating? It should be a rolling file, rolling over daily. You can just remove the old versions. Is this a stock tomcat, one from the ports, or maybe a particularly old one? catalina.out is set at the catalina.sh: $CATALINA_BASE/logs/catalina.out 21 This file is not rateable, as it is jsut a redirection. We are thinking in moving this redirection to /dev/null or just remove the redirection. Is it a sense thing to do? Emerson The most sane approach would be to work with your developers to have some logging policy that both you and the developers can work with. You'll need at least the exception traces when Tomcat dies, or you're blind. But then, there is nothing like saving a few bucks in disk space at the expense of hours of blind debugging. :-) -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett - 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]
tomcat 5.5 DataSourceRealm not taken in charge
hello all, I try ti use tomcat security management with DataSourceRealm but I never get authentication console, log shows that user 'Successfully passed all security constraints' I declare Realm inside server.xml: Realm className=org.apache.catalina.realm.DataSourceRealm dataSourceName=jdbc/auth userTable=USERS userNameCol=login userCredCol=password / and security constraints on web.xml security-constraint display-nameTOMCAT SECURITY/display-name web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern/*/url-pattern /web-resource-collection /security-constraint login-config auth-methodBASIC/auth-method /login-config did I forget anything..? thanks! -- View this message in context: http://www.nabble.com/tomcat-5.5-DataSourceRealm--not-taken-in-charge-tp19073540p19073540.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: Custom error page with stacktrace
In your error page, the variable exception is set to the exception (if any). You can get the error message and stack trace from the exception like this: pException message: %= (exception == null) ? : exception.getMessage() %/p % String stStack = ; if (exception != null) { java.io.StringWriter sw = new java.io.StringWriter(); exception.printStackTrace(new java.io.PrintWriter(sw)); stStack = sw.toString(); } % pStack trace:/p pre %= stStack % /pre (Note: For clarity I omitted some important stuff like sanitizing the output to prevent people from stuffing nasty HTML/Javascript into the error messages.) -- Len On Wed, Aug 20, 2008 at 10:08, Tom van Wietmarschen [EMAIL PROTECTED] wrote: L.S, I'm running tomcat to serve out XML to a custom client (not a webbrowser). In order to show an error page that this client can actually display I use custom error pages in Tomcat. For this I have specified a JSP as an error page, this works very well. However, during the test phase of our project I'd also like to add the stacktrace to the error document and optionally to a logfile. Since the client cannot interpret a normal HTML page, the standard 500 error page that comes with Tomcat is unusable. How can I access the stacktrace/error message from my own JSP or a servlet so I can output it to our own custom XML format and our testers can give proper feedback. I did some googling for this but it seems like everyone else is just trying to get rid of the stacktrace instead of changing it. Sincerely, Tom van Wietmarschen -- **Tom van Wietmarschen** Software Engineer Service2Media B.V. Vreelandseweg 7 1216 CG Hilversum Capitool 41 7521 PL Enschede Tel +31 (0)35 626 46 12 Fax +31 (0)35 626 46 13 www.service2media.com http://www.service2media.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]
Re: Disabling catalina.out log
Dear Emerson, Truncating? It should be a rolling file, rolling over daily. You can just remove the old versions. Is this a stock tomcat, one from the ports, or maybe a particularly old one? catalina.out is set at the catalina.sh: $CATALINA_BASE/logs/catalina.out 21 This file is not rateable, as it is jsut a redirection. You are right. Woops, I thought it was a rotatable file. Maybe I restart my Tomcats too often. :) We are thinking in moving this redirection to /dev/null or just remove the redirection. Is it a sense thing to do? To get rid of an ever-growing file, yes. However, you have to make really sure that you still get all the stack traces and whatnot that is in that file, only get them into a rolling file. A. Wait. Now I know why I never run into this. I run my Tomcats in screen using catalina.sh run, so catalina.out is written to the console instead of a file. I do get a nice daily log e.g. catalina. 2008-08-20.log. That would mean it is safe to redirect catalina.out to /dev/null, as long as you have the daily logs. -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mod_proxy apache balance to 1 Tomcat app works, fails with another?
I am a newbie to Tomcat. I am tasked with deploying a couple of applications from our software vendor. I am an Oracle DBA, not a software developer, so this question is probably very rudimentary. I have read the 'Tomcat Definitive Guide', and used it to set up load balancing for the 2 applications the software company developed. The applications work fine standalone, but we have 3 application servers I am trying to load balance. I am using apache's mod_proxy to load balance 3 tomcat servers that have 2 different apps on them. One of the applications works fine, but the other one gives a 404 error. To make sure it was load balancing correctly, I installed an instance.txt in the application's directories - webapps/aalTA and aal_pa. When I try the aal_pa application, I see the load balancing is working correctly. When I try the aalTA application instance.txt, again I get the 404 error. I can get to both applications directly, so all is working there. When I go to the aalTA application using the load balancing, the error message from Tomcat is The requested resource (/aalTA/servlet/LayoutMgr%3FLAYOUT=/aal/aalApp1_login/instance.txt) is not available. When I go to http://sisapp4:8080/aal_pa/ directly, the URL does not change. When I go to http://sisapp4:8080/aalTA/ directly, it automatically adds servlet/LayoutMgr?LAYOUT=/aal/aalApp1_login to the end of the URL. Is there something I can do to make this work, or is it just that this application cannot work with Apache load balancing? Platform: Redhat Enterprise Linux 4 Apache Version: 2.2.9 Tomcat Version: 5.5.25
Re: Dual-Independent Tomcat servers, on Single Win32 host sharing IIS server.
First before trying to find the right configuration, upgrade! Version 1.2.8 is s old and whatever hints you get on how to use the redirector, you'd always need to find out, which of those are true for 1.2.8. We are at 1.2.26, just use that version. André Warnier schrieb: dOE wrote: I tried to do the following, and it did not work. worker.list=ajp13w worker.ajp13w.type=ajp13 worker.ajp13w.host=192.168.0.1 worker.ajp13w.port=8009 worker.list=ajp13w2 worker.ajp13w2.type=ajp13 worker.ajp13w2.host=192.168.0.2 worker.ajp13w2.port=8109 Maybe you just need to do worker.list=ajp13w,ajp13w2 No, all properties which take multiple values can be split into multiple lines. This often makes writing a modular config file more easy. We join those lines during reading them. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Instructions for setting up CGI
I looked at the page for setting up CGI on Tomcat 6, but the paragraph that follows leads to some confusion. Remove the XML comments from around the CGI servlet and servlet-mapping configuration in $CATALINA_BASE/conf/web.xml. Apparently the jar the XML file refers to no longer exists. And it isn't clear where to put my perl scripts, or if I can place them in, say, a cgi-bin directory located where all my web apps can access and use them. Is there a document providing instructions on how to set up CGI that is both complete and correct for Tomcat 6? I would suggest, though, that http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html; be ammended to at least say what parts of the cgi stuff in the xml file can safely be ignored because it refers to Tomcat 5.x, and describes what is needed for a globally accessable ci script repository. I find the combination of the xml file referring to an old Tomcat with the above mentioned web page confusing. Thanks Ted -- View this message in context: http://www.nabble.com/Instructions-for-setting-up-CGI-tp19078111p19078111.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]
Multiple Websites on IIS using SSL
I was looking for some help here. I have 2 websites - unique URLs using SSL using IIS with asp.net with JRun to run servlet code. I need to convert jrun to tomcat. I need to keep IIS and use ISAPI redirect. Using Tomcat with SSL - do I need to run 2 instances of tomcat for each unique URL and have a unique certificate per Tomcat instance? or can I Run one instance of tomcat with one certificate that the 2 URLs can call servlets? Just wondering before I use this? Thanks John - 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: Instructions for setting up CGI
Ted Byers wrote: I looked at the page for setting up CGI on Tomcat 6, but the paragraph that follows leads to some confusion. Remove the XML comments from around the CGI servlet and servlet-mapping configuration in $CATALINA_BASE/conf/web.xml. Apparently the jar the XML file refers to no longer exists. You can just ignore any reference to renaming the jar. The rest is the same. And it isn't clear where to put my perl scripts, or if I can place them in, say, a cgi-bin directory located where all my web apps can access and use them. Is there a document providing instructions on how to set up CGI that is both complete and correct for Tomcat 6? Yes. The CGI how to. I would suggest, though, that http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html; be ammended to at least say what parts of the cgi stuff in the xml file can safely be ignored because it refers to Tomcat 5.x, and describes what is needed for a globally accessable ci script repository. I find the combination of the xml file referring to an old Tomcat with the above mentioned web page confusing. This has already been fixed. You need 6.0.18 onwards. Its even in the change log: http://tomcat.apache.org/tomcat-6.0-doc/changelog.html 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]
HOW TO install/setup 2 instances of tomcat on same server
I know this question has been asked a lot but I've read different solutions depending on the needs of the problem. I need to have 2 instances of tomcat on the same server for the same application. One would be for production and the other for development (which can be start and stopped whenever without affecting the production one). From my understanding i need to have each instance on different ports and modifying some other files but what I am missing is the technical things. Can any one please guide me on the correct direction so that i don't mess up anything! I've never worked with Tomcat that is why i have no idea on how to do it. Thanks in advance -- View this message in context: http://www.nabble.com/HOW-TO-install-setup-2-instances-of-tomcat-on-same-server-tp19079289p19079289.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: Dual-Independent Tomcat servers, on Single Win32 host sharing IIS server.
Rainer Jung wrote: First before trying to find the right configuration, upgrade! Version 1.2.8 is s old and whatever hints you get on how to use the redirector, you'd always need to find out, which of those are true for 1.2.8. We are at 1.2.26, just use that version. André Warnier schrieb: dOE wrote: I tried to do the following, and it did not work. worker.list=ajp13w worker.ajp13w.type=ajp13 worker.ajp13w.host=192.168.0.1 worker.ajp13w.port=8009 worker.list=ajp13w2 worker.ajp13w2.type=ajp13 worker.ajp13w2.host=192.168.0.2 worker.ajp13w2.port=8109 Maybe you just need to do worker.list=ajp13w,ajp13w2 No, all properties which take multiple values can be split into multiple lines. This often makes writing a modular config file more easy. We join those lines during reading them. Yes, but since what version ? (just kidding) Thanks, that's good to know, and I don't believe I've seen that in the docs anywhere. So then, and apart from upgrading the connector, the next step would really be to replace the host IPs above by 127.0.0.1 (assuming all this is on the same host for now, but I think the OP said that before). - 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 install/setup 2 instances of tomcat on same server
edponce wrote: I know this question has been asked a lot but I've read different solutions depending on the needs of the problem. I need to have 2 instances of tomcat on the same server for the same application. One would be for production and the other for development (which can be start and stopped whenever without affecting the production one). From my understanding i need to have each instance on different ports and modifying some other files but what I am missing is the technical things. Can any one please guide me on the correct direction so that i don't mess up anything! I've never worked with Tomcat that is why i have no idea on how to do it. No, we won't tell you. This is a list for Tomcat Users only (hence the name), and obviously you are not one of them, so go away ! Just kidding. Can you maybe give a bit more details, such as what system you are running this on, and the version of Tomcat if you know ? That would help, a bit. But it is probably not going to be easy, if you really have no idea of Tomcat to start with. Did you ever work with another Java servlet engine, or another HTTP 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]
Re: HOW TO install/setup 2 instances of tomcat on same server
André Warnier wrote: edponce wrote: I know this question has been asked a lot but I've read different solutions depending on the needs of the problem. I need to have 2 instances of tomcat on the same server for the same application. One would be for production and the other for development (which can be start and stopped whenever without affecting the production one). From my understanding i need to have each instance on different ports and modifying some other files but what I am missing is the technical things. Can any one please guide me on the correct direction so that i don't mess up anything! I've never worked with Tomcat that is why i have no idea on how to do it. Ok, serious now. This is at the same time some information for you, the Original Poster (OP), and a question for the others on this list more Tomcat-qualified than I am. But we've got to start somewhere... To the OP (and the others to contradict me if I'm wrong) : You do not necessarily need two separate instances of Tomcat. Under Tomcat, each application can be started and stopped (and even a new version reloaded) without stopping the Tomcat server. You would just need to name your applications differently. (like http://host.mycompany.com/real-app; and http://host.mycompany.com/test-app;). There also exists the possibility to run one Tomcat with different Virtual Hosts, on the same port 80. Each one of these virtual hosts would have a different DNS name (like realserver.mycompany.com and testserver.mycompany.com) and could have a different directory where the applications reside, but the application itself would be named the same way. I am mentioning the above two possibilities because, you knowing not much about Tomcat to start witj, either one of the above is probably easier to set up than two separate Tomcat instances. The difference between the above solutions and two really separate Tomcat instances would be if the test application could really crash the whole server, in which case you may not like one of the above solutions. Comments anyone ? - 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 install/setup 2 instances of tomcat on same server
André Warnier wrote: edponce wrote: depending on the needs of the problem. I need to have 2 instances of tomcat on the same server for the same application. One would be for production and the other for development (which can be start and stopped whenever without affecting the production one). You do not necessarily need two separate instances of Tomcat. Under Tomcat, each application can be started and stopped (and even a new version reloaded) without stopping the Tomcat server. You would just need to name your applications differently. (like http://host.mycompany.com/real-app; and http://host.mycompany.com/test-app;). Yes, that's possible. There also exists the possibility to run one Tomcat with different Virtual Hosts, on the same port 80. Each one of these virtual hosts would have a different DNS name (like realserver.mycompany.com and testserver.mycompany.com) and could have a different directory where the applications reside, but the application itself would be named the same way. Yes, that's also possible. I am mentioning the above two possibilities because, you knowing not much about Tomcat to start witj, either one of the above is probably easier to set up than two separate Tomcat instances. I don't see what's difficult with creating two separate Tomcats. Just unpack the Tomcat archive two times to different directories[1] and change the ports used in one of them so that they are unique. Looking at the default server.xml, there are three numbers to be changed (YMMV if you add/remove Connectors). The difference between the above solutions and two really separate Tomcat instances would be if the test application could really crash the whole server, in which case you may not like one of the above solutions. Exactly. Furthermore, if I understand the OP's statement above correctly, he wants to be able to restart the development Tomcat without affecting the production Tomcat. That's not possible with either of those two solutions. Comments anyone ? No matter which possibilities exist to set up multiple Tomcat instances on a single machine, I would *never* use a production server for development. If I was in the OP's shoes, I'd rethink this requirement (if it indeed is one). Regards mks [1] Of course, one can create multiple Tomcat instances from a single binary by using multiple different CATALINA_BASEs. But that might be unnecessary complex in this case. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Another confused person trying to get jconsole to monitor tomcat.
I've been through the docs. I've been through Google. I can't seem to figure this out. Server: Tomcat 6.0.18, JDK: 1.6.0_07, Redhat Server 5.2 Client: jconsole from JDK 1.6.0_07 on Windows XP I've got all of these in $CATALINA_OPTS and they do show up in the java command line when I run ps: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false The Redhat server is running iptables and disallows most things that aren't 80/443. Any other ports that are needed are generally opened up only to specific IP's. I've opened up the JMX port specified above on the Linux firewall: iptables -A INPUT -s myClientsIp -p tcp -m tcp --dport 12345 -j ACCEPT I run jconsole: C:\PathToJava\binjconsole myServer.myDomain.com:12345 It can't make the connection. I've got a feeling it's something to do with the firewall. I've seen some stuff that suggests that there's another unspecified port opened up but it didn't really make sense to me. Note that the server and the client are at different facilities connected over the internet which is why I eventually want to get it going with authentication and SSL but I can't even get this simple insecure version of the connection to work. - 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 install/setup 2 instances of tomcat on same server
Markus Schönhaber wrote: André Warnier wrote: edponce wrote: depending on the needs of the problem. I need to have 2 instances of tomcat on the same server for the same application. One would be for production and the other for development (which can be start and stopped whenever without affecting the production one). You do not necessarily need two separate instances of Tomcat. Under Tomcat, each application can be started and stopped (and even a new version reloaded) without stopping the Tomcat server. You would just need to name your applications differently. (like http://host.mycompany.com/real-app; and http://host.mycompany.com/test-app;). Yes, that's possible. There also exists the possibility to run one Tomcat with different Virtual Hosts, on the same port 80. Each one of these virtual hosts would have a different DNS name (like realserver.mycompany.com and testserver.mycompany.com) and could have a different directory where the applications reside, but the application itself would be named the same way. Yes, that's also possible. I am mentioning the above two possibilities because, you knowing not much about Tomcat to start witj, either one of the above is probably easier to set up than two separate Tomcat instances. I don't see what's difficult with creating two separate Tomcats. Just unpack the Tomcat archive two times to different directories[1] and change the ports used in one of them so that they are unique. Looking at the default server.xml, there are three numbers to be changed (YMMV if you add/remove Connectors). The difference between the above solutions and two really separate Tomcat instances would be if the test application could really crash the whole server, in which case you may not like one of the above solutions. Exactly. Furthermore, if I understand the OP's statement above correctly, he wants to be able to restart the development Tomcat without affecting the production Tomcat. That's not possible with either of those two solutions. True. But I was wondering why he said that he needed to restart Tomcat. Considering that he mentioned he knows not much about it, the OP may be unaware that it is not necessary to restart Tomcat, if the reason is just to re-install/re-start a new version of the test application. To the OP : at least until Tomcat version 5.5, there is an integrated web-accessible Manager application, through which you can start and stop any application, and upload a new version and restart it. All this through a web form, and without restarting Tomcat. Comments anyone ? No matter which possibilities exist to set up multiple Tomcat instances on a single machine, I would *never* use a production server for development. If I was in the OP's shoes, I'd rethink this requirement (if it indeed is one). Me too. To the OP : it would really be more secure and stable to use two different servers, on which you could install two exactly identical Tomcat's. A test Tomcat does not necessarily need a big server, and your average clunky PC running Linux would probably do fine. (It does need some RAM though). That would be a lot easier to install, because you could have on each just a Tomcat out-of-the-box. (Also, whether you run Tomcat under Linux or Windows, from a pure-Java application point of view it is much the same.) Regards mks [1] Of course, one can create multiple Tomcat instances from a single binary by using multiple different CATALINA_BASEs. But that might be unnecessary complex in this case. Now, edponce, after reading the above and thinking about it, where do you incline ? And please, tell us some more about your exact environment if you can. Like, what is the server, what is the Tomcat version, where do you get it from, how do you install it, etc.. That would help us a lot to narrow down the possibilities. - 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 can't see a new function
I have a strange problem. I am using Borland to compile my source files and create jar files. For some reason things are not working correctly. In one jar library, I can create new functions, rebuild the library, and when I put them up in Tomcat 5.5 WEB-INF, it recognizes them. However, I have another library jar file that use to work, but now I can't seem to add any functions to any of the files and have them seen by tomcat. They work fine in the Borland debugger, but I get this error in the log file from Tomcat. I tried creating a simple 10 line program and trying to call a new function in any of the files in the jar library file, and it doesn't see them. However, tomcat does recognize the original functions that each file originally had in them, and they work fine. It's only new fuctions that don't work. Any ideas? This one is a real bugger. I tried this on two different servers with tomcat 5.5 and got the same error shown below. I have to get this resolved because more jar files need to be modified for our servers. Thanks, Dan Gross, ATLC Aug 20, 2008 3:59:36 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet invoker threw exception java.lang.NoSuchMethodError: GIUtilities.GILog.testfunction()V at testservlet.doGet(testservlet.java:26) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:420) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Unknown Source) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat can't see a new function
Is there an older copy of the jar in another directory where it gets picked up before your new one? -- Len On Wed, Aug 20, 2008 at 21:33, Daniel L. Gross [EMAIL PROTECTED] wrote: I have a strange problem. I am using Borland to compile my source files and create jar files. For some reason things are not working correctly. In one jar library, I can create new functions, rebuild the library, and when I put them up in Tomcat 5.5 WEB-INF, it recognizes them. However, I have another library jar file that use to work, but now I can't seem to add any functions to any of the files and have them seen by tomcat. They work fine in the Borland debugger, but I get this error in the log file from Tomcat. I tried creating a simple 10 line program and trying to call a new function in any of the files in the jar library file, and it doesn't see them. However, tomcat does recognize the original functions that each file originally had in them, and they work fine. It's only new fuctions that don't work. Any ideas? This one is a real bugger. I tried this on two different servers with tomcat 5.5 and got the same error shown below. I have to get this resolved because more jar files need to be modified for our servers. Thanks, Dan Gross, ATLC Aug 20, 2008 3:59:36 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet invoker threw exception java.lang.NoSuchMethodError: GIUtilities.GILog.testfunction()V at testservlet.doGet(testservlet.java:26) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:420) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Unknown Source) - 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]
Receiving duplicate requests when code that processes the initial request blocks for a long time ...
Hi, I am not sure if this is a bug, feature, or whatever but I definitely need some answers here. I ran into some issues when sending a request to a servlet that executes native code that takes a long time to terminate (I am talking 10s of seconds here). I am consistently getting a second, sometimes a third, duplicate request about 6-8 seconds into the execution of the initial request. After alittle investigation I realized I could replicate this issue by replacing the code that executes the native code with an infinitely blocking loop ... while(true). As I said before sometimes I even get a second duplicate request which has me thinking that this is unexpected/unintended behavior. Here is a small snippet of code that should allow you to replicate the issue: public void doPost(HttpServletRequest request, HttpServletResponse response) { System.out.println(request); while(true); } In the interest of full disclosure I have a lot more code than what you see in the provided snippet and I have not tested the aforementioned code snippet. I have replicated the issue on a dedicated server and a local VM, both running CentOS 4.5, Java SE 1.6.0, and Tomcat 6. If this is a feature is there a way to turn it off? If this is a bug is there a workaround? Regards, Mashama -- If opportunity doesn't knock, build a door. - Milton Berle First they ignore you, then they laugh at you, then they fight you, then you win. - Mohandas Gandhi Live as if you were to die tomorrow. Learn as if you were to live forever. - Mohandas Gandhi
Re: Receiving duplicate requests when code that processes the initial request blocks for a long time ...
Mashama McFarlane wrote: I am not sure if this is a bug, feature, or whatever but I definitely need some answers here. I ran into some issues when sending a request to a servlet that executes native code that takes a long time to terminate (I am talking 10s of seconds here). I am consistently getting a second, sometimes a third, duplicate request about 6-8 seconds into the execution of the initial request. Are you certain this second request is functionality of Tomcat? Could it be your browser, or perhaps a proxy/loadbalancer between your browser and Tomcat? You mentioned that the Tomcat server is running a version of Linux, so if you have root access on the server you're running Tomcat, you should be able to run tcpdump (or some other network traffic monitor) to see what actually is coming in from the network. -- ..Juha - 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 install/setup 2 instances of tomcat on same server
edponce wrote: I know this question has been asked a lot but I've read different solutions depending on the needs of the problem. I need to have 2 instances of tomcat on the same server for the same application. One would be for production and the other for development (which can be start and stopped whenever without affecting the production one). From my understanding i need to have each instance on different ports and modifying some other files but what I am missing is the technical things. Can any one please guide me on the correct direction so that i don't mess up anything! I've never worked with Tomcat that is why i have no idea on how to do it. André Warnier wrote: You do not necessarily need two separate instances of Tomcat. [...] There also exists the possibility to run one Tomcat with different Virtual Hosts, on the same port 80. Each one of these virtual hosts would have a different DNS name (like realserver.mycompany.com and testserver.mycompany.com) and could have a different directory where the applications reside, but the application itself would be named the same way. The difference between the above solutions and two really separate Tomcat instances would be if the test application could really crash the whole server, in which case you may not like one of the above solutions. Comments anyone ? When I was new to tomcat (arguably when compared with some members of this list, I could still be considered new), I found it conceptually easier to work with two instances, as you don't need to switch context names etc when you want to deploy live. Whilst a little cumbersome, and inefficient from a resource usage standpoint, when you're learning, being able to restart tomcat as you shop and change the server.xml file etc can be useful, without fear of breaking the production service. It can also be useful for evaluating a new version before you unleash it to production. edponce: If you want to run two instances, the easiest way, to my mind, is to duplicate the tomcat directory. On the duplicated tomcat directory, you need to edit the server.xml file so that the second server.xml as unique ports for the shutdown port, the interface port (eg 8080 could become 8081 etc). Once you have made these changes, you should be able to start each of them up by running their respective startup scripts. You could achieve the same using links and a few other sharing techniques, but for simplicity's sake, I think this approach to two instances using duplicated directories is the most robust. Tom