No stack trace?
Hello, I am currently trying to implement a system which sends me an email if the site ever has an exception (not that it ever will of course!). To this end I have inserted a simple exception into my code and when I run the code in Tomcat there is no stack trace! Either in the HTML of the JSP or in the console! I simply did: String nullStr = null; nullStr.trim(); both in a servlet and in a JSP and neither seem to have any effect. Going to other applications that I am working on at the moment I can cause a stack trace in them no problem. Under what conditions (if any) will Tomcat swallow the output of an exception (a stack trace)? Thanks in advance, Andoni.
Re: java.lang.ClassCircularityError
Hi Jagadish, Do you have a drawing of all your inheritance relationships? This error seems to be caused by a circular inheritance relationship i.e.: class ClassOne extends ClassTwo { ... } class ClassTwo extends ClassOne { ... } Obviously there could be many more than two classes involved so it may be best to draw out the class tree. Specially if it is complicated. Hope that helps. Andoni. - Original Message - From: Jagadeesha T To: tomcat-user@jakarta.apache.org Sent: Wednesday, October 05, 2005 9:01 AM Subject: java.lang.ClassCircularityError Hi all, I am using Tomcat 5.0 with JBoss 3.2.6. In a very rare cases I got the error as java.lang.ClassCircularityError(myclass). Does anybody know wahy this error is coming. Thanks, Jagadish - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
Re: java.lang.ClassCircularityError
Just thinking aloud here... is there anywhere in your program that you are using Java Reflection? Beyond this I am afraid I have no more ideas for now :-( Later, Andoni. - Original Message - From: Jagadeesha T To: Tomcat Users List Sent: Wednesday, October 05, 2005 9:48 AM Subject: Re: java.lang.ClassCircularityError HI Andoni, Thanks for the reply, It uses association that too unidirectional, I have seen the option in sun forum as have you explained to me. I tried to compile classes like this for just to get that error. This scenario won't compile, It gave me a error saying cycling inheritence. Do you know any other scenarios which could cause this problem. Thanks, Jagadish Andoni [EMAIL PROTECTED] wrote: Hi Jagadish, Do you have a drawing of all your inheritance relationships? This error seems to be caused by a circular inheritance relationship i.e.: class ClassOne extends ClassTwo { ... } class ClassTwo extends ClassOne { ... } Obviously there could be many more than two classes involved so it may be best to draw out the class tree. Specially if it is complicated. Hope that helps. Andoni. - Original Message - From: Jagadeesha T To: tomcat-user@jakarta.apache.org Sent: Wednesday, October 05, 2005 9:01 AM Subject: java.lang.ClassCircularityError Hi all, I am using Tomcat 5.0 with JBoss 3.2.6. In a very rare cases I got the error as java.lang.ClassCircularityError(myclass). Does anybody know wahy this error is coming. Thanks, Jagadish - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
Re: Apache/Win32 + mod_jk problem
Hi, Try using the version of mod_jk.dll which you can find here: http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/win32/jk-1.2.6/ Called: mod_jk_1.2.6_1.3.31.dll Don't forget to change the line which refers to it in httpd.conf. Also don't forget to rename it to mod_jk.dll. I think the .so version is only for Apache with SSL built in. Andoni. - Original Message - From: Richard Russell [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, February 10, 2005 12:31 PM Subject: Apache/Win32 + mod_jk problem I cannot run apache with mod_jk on Windows XP Pro + SP1. I have had no troubles doing the same thing with multiple versions of Apache mod_jk on multiple versions of Solaris, Linux and FreeBSD. This is, however, my first attempt at mixing Windows with real software :-S I'm running the following versions: Apache 1.3.33 ${APACHE_MIRROR}/httpd/binaries/win32/ apache_1.3.33-win32-x86-no_src.exe mod_jk 1.2.8 ${APACHE_MIRROR}/jakarta/tomcat-connectors/jk/binaries/win32/ mod_jk-1.2.8-apache-1.3.33-eapi.so MD5SUMs: afb8924ec7b368e132fbed5f28ad6f3bapache_1.3.33-win32-x86-no_src.exe ea33398544fe6ecdccecf81307c86211mod_jk-1.2.8-apache-1.3.33-eapi.so The Apache one agrees with that listed on the website, but I can't find an md5sum listed for mod_jk... - C:\apacheapache Syntax error on line 194 of c:/apache/conf/httpd.conf: Cannot load c:/apache/modules/mod_jk.so into server: (127) The specified procedure could not be found: Note the errors or messages above, and press the ESC key to exit. 29... C:\apachegrep -ni jk conf\httpd.conf 194:LoadModule jk_module modules/mod_jk.so 242:AddModule mod_jk.c - The mod_jk file has been renamed mod_jk.so and placed in the c:/apache/modules directory. I have tried with it renamed as .dll and it makes no difference. I've also tried introducing intentional typos in the LoadModule command (eg LoadModule jk_module modules/mod_foojk.so), and found that this changed the error message to something like module not found, so it's definitely finding the module. I'm somewhat stuck here. The only documentation that mentions this error is for mod_ssl, and it suggests that I have an error in the AddModule line... Which I don't think I do... Could someone advise? Cheers Richard Russell Deutsche Bank AG London Global Markets Customer Solutions Office: +44 20 7545 8060 Mobile: +44 79 0661 2237 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache/Win32 + mod_jk problem
Hi Richard, If you have been reading this list for any period of time you may have noticed that JK is more to do with Zen and Voodoo than real computer science! It causes so many people heartache that it is unbelievable. The only reason I knew the answer to your problem is because I have recently had the same problem myself. While researching I was happy to hear that JK2 is being put out to pasture because of a lack of interest. At least this makes one less decision for the likes of you and I to make when choosing a binary to download. Basically my advice would be either: Take it up as a hobby, sort it out, decompile it, write to the developers, re-write the documentation, champion the cause and sort the whole thing out for everyone for once and for all... or: Thank the Zen gods for getting it working for you and move rapidly along to your next job! ;-) Can you guess which one I'd pick? Later, Andoni. - Original Message - From: Richard Russell [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, February 10, 2005 3:01 PM Subject: Re: Apache/Win32 + mod_jk problem Thanks Andoni, that appeared to work. However, I don't really understand why. I had actually thought that this might be related to EAPI, which I understand is the primary difference (apart from mod_ssl itself) between Apache without SSL and Apache with SSL. However, I couldn't find any mention of this in the JK docs, nor in the Apache or Tomcat docs, and given that there was no option to download an EAPI/SSL Apache 1.3.33, and no option to download a non-EAPI/SSL mod_jk 1.2.8, I presumed that they were compatible. Certainly more likely than this one, which is allegedly for Apache 1.3.31, and is an old version of mod_jk anyway. Does this mean that there is no binary Win32 Apache 1.3.33 and mod_jk 1.2.8 that can be downloaded that work with each other? This seems a little odd to me... Surely I'm missing something? Cheers Richard Russell Deutsche Bank AG London Global Markets Customer Solutions Office: +44 20 7545 8060 Mobile: +44 79 0661 2237 Andoni [EMAIL PROTECTED] 02/10/2005 02:46 PM Please respond to Tomcat Users List To: Tomcat Users List tomcat-user@jakarta.apache.org cc: Subject:Re: Apache/Win32 + mod_jk problem Hi, Try using the version of mod_jk.dll which you can find here: http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/win32/jk-1.2.6/ Called: mod_jk_1.2.6_1.3.31.dll Don't forget to change the line which refers to it in httpd.conf. Also don't forget to rename it to mod_jk.dll. I think the .so version is only for Apache with SSL built in. Andoni. - Original Message - From: Richard Russell [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, February 10, 2005 12:31 PM Subject: Apache/Win32 + mod_jk problem I cannot run apache with mod_jk on Windows XP Pro + SP1. I have had no troubles doing the same thing with multiple versions of Apache mod_jk on multiple versions of Solaris, Linux and FreeBSD. This is, however, my first attempt at mixing Windows with real software :-S I'm running the following versions: Apache 1.3.33 ${APACHE_MIRROR}/httpd/binaries/win32/ apache_1.3.33-win32-x86-no_src.exe mod_jk 1.2.8 ${APACHE_MIRROR}/jakarta/tomcat-connectors/jk/binaries/win32/ mod_jk-1.2.8-apache-1.3.33-eapi.so MD5SUMs: afb8924ec7b368e132fbed5f28ad6f3b apache_1.3.33-win32-x86-no_src.exe ea33398544fe6ecdccecf81307c86211 mod_jk-1.2.8-apache-1.3.33-eapi.so The Apache one agrees with that listed on the website, but I can't find an md5sum listed for mod_jk... - C:\apacheapache Syntax error on line 194 of c:/apache/conf/httpd.conf: Cannot load c:/apache/modules/mod_jk.so into server: (127) The specified procedure could not be found: Note the errors or messages above, and press the ESC key to exit. 29... C:\apachegrep -ni jk conf\httpd.conf 194:LoadModule jk_module modules/mod_jk.so 242:AddModule mod_jk.c - The mod_jk file has been renamed mod_jk.so and placed in the c:/apache/modules directory. I have tried with it renamed as .dll and it makes no difference. I've also tried introducing intentional typos in the LoadModule command (eg LoadModule jk_module modules/mod_foojk.so), and found that this changed the error message to something like module not found, so it's definitely finding the module. I'm somewhat stuck here. The only documentation that mentions this error is for mod_ssl, and it suggests that I have an error in the AddModule line... Which I don't think I do... Could someone advise? Cheers Richard Russell Deutsche Bank AG London Global Markets Customer Solutions Office: +44 20 7545 8060 Mobile: +44 79 0661 2237 - To unsubscribe, e-mail: [EMAIL PROTECTED
Re: UTF-8 Encoding in Jsp | RESOLVED
I concur, thanks for posting your findings. Also if I may ask: please don't change the subject of your mails. Those of us who view this list as a newsgroup get all messed up! Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, December 02, 2004 2:08 PM Subject: RE: UTF-8 Encoding in Jsp | RESOLVED Hi, Thanks for posting your findings ;) Yoav Shapira http://www.yoavshapira.com -Original Message- From: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 9:03 AM To: Tomcat Users List Subject: RE: UTF-8 Encoding in Jsp | RESOLVED Hi all, First of all thanks to all the people who helped in the first place (I am grateful). The problem was resolved and was due to some problem with the home grown framework we were using with the application. Tomcat had nothing to do with the problem and content type is the only thing required to make it work. As far as the database persistence was concerned, oracle did no mistake in storing the data but when our framework was persisting the values, it somehow corrupted the data somewhere in the middle of submitting the page with non-english characters and writing to the database. We found this problem by simply writing a simple jsp page without using the framework and rendered some non-english characters successfully. Thanks again, Arnab -Original Message- From: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 4:08 PM To: Tomcat Users List Subject: RE: UTF-8 Encoding in Jsp Hi, Thanks for the reply but it did not work. May be I didn't explain the problem correctly. I am running an application that supports all the languages but only in some specific places of the application and I have made those places UTF-8 complaint. Further, they are being saved to Database (Oracle 9). When we are reading the data back from the database, junk characters are displayed on the screen. Yes, the database is set to support UTF-8 Encoding and this is working with the old version of tomcat 3.3 and not with current upgraded version of tomcat 5.0 There are also places in the application where drop downs contain some different language support and we can see those charsets (Japanese, Chinese etc) appearing. Only, when I try to display on the screen through the jsp file, I am encountering this problem of junk characters begin displayed. Hope I have set more context around the problem. Please help me resolve this issue. Thanks, Arnab -Original Message- From: Mariano [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 12:54 PM To: 'Tomcat Users List' Subject: RE: UTF-8 Encoding in Jsp You should use too: head META http-equiv=Content-Type content=text/html; charset=UTF-8 /head and this scriptlet: request.setCharacterEncoding(UTF-8); at the beginning. I hope this help you -Mensaje original- De: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Enviado el: martes, 30 de noviembre de 2004 15:28 Para: Tomcat Users List Asunto: UTF-8 Encoding in Jsp Hi all, I need to make my all jsp files compatible with UTF-8 Encoding and even though I am using the directives: %@ page pageEncoding=UTF-8% %@ page contentType = text/html;charset=UTF-8% in the jsp files, cannot make it work. Using tomcat version 5. Is there any config changes I need to make for the UTF-8 Encoding to work. Please help. Thanks in advance, Arnab - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Apache Jakarta Tomcat 5.5.5-alpha Released
Ok, forgive my ignorance but can someone show me where there are descriptions for the files available: http://apache.mirrors.esat.net/jakarta/tomcat-5/v5.5.5/README.html gives brief descriptions but I have other questions: Do the .zip and .exe contain all the others? If not which do they contain, just the Admin App.? Why would I want the admin app separately? What previous versions of TC will it run under if any? When would I use a standalone deployer? What is it? Can I deploy from my PC up to a server with it? When would I use an embedded version? If there are docs to answer these questions somewhere please point me that way. If not I will get the info and type it up if anyone wants me to. Thanks in advance, Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user,gmane.comp.jakarta.tomcat.devel Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, December 03, 2004 3:34 PM Subject: [ANN] Apache Jakarta Tomcat 5.5.5-alpha Released The Apache Jakarta Tomcat team is proud to announce the immediate availability of Tomcat 5.5.5-alpha. This build contains numerous bug fixes and other improvements on top of the stable 5.5.4 release. Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES Please refer to the change log for the list of changes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5 Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5 The Apache Jakarta Tomcat Team This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Apache Jakarta Tomcat 5.5.5-alpha Released
Hi, I wanted answers to some bits and others were a bit of point-making. I think Yoav has answered most of my questions though except: Does the full standard Tomcat package contain the Deployer? I know it doesn't contain the Admin app. but not sure about the deployer. Glad to hear you are working on the Docs. I am always eager to help in that area if you need any. Just let me know. Andoni. - Original Message - From: Allistair Crossley [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, December 03, 2004 4:22 PM Subject: RE: [ANN] Apache Jakarta Tomcat 5.5.5-alpha Released Hi Andoni, The docs have sections on Deployer and Admin, not sure about Embedded. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/index.html I know what you mean, and I am currently working on complete new documentation set for some of these missing areas (although you may find that someone says they are on a wiki somewhere). Watch this space ... did you actually want answers or were you making a point? ;) Allistair. -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 16:17 To: Tomcat Users List Subject: Re: [ANN] Apache Jakarta Tomcat 5.5.5-alpha Released Ok, forgive my ignorance but can someone show me where there are descriptions for the files available: http://apache.mirrors.esat.net/jakarta/tomcat-5/v5.5.5/README.html gives brief descriptions but I have other questions: Do the .zip and .exe contain all the others? If not which do they contain, just the Admin App.? Why would I want the admin app separately? What previous versions of TC will it run under if any? When would I use a standalone deployer? What is it? Can I deploy from my PC up to a server with it? When would I use an embedded version? If there are docs to answer these questions somewhere please point me that way. If not I will get the info and type it up if anyone wants me to. Thanks in advance, Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user,gmane.comp.jakarta.tomcat.devel Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, December 03, 2004 3:34 PM Subject: [ANN] Apache Jakarta Tomcat 5.5.5-alpha Released The Apache Jakarta Tomcat team is proud to announce the immediate availability of Tomcat 5.5.5-alpha. This build contains numerous bug fixes and other improvements on top of the stable 5.5.4 release. Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES Please refer to the change log for the list of changes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5 Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5 The Apache Jakarta Tomcat Team This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 + hostname
Post your server.xml (or at least the relevant parts) with no HTML comments and I'll have a look. Failing that, read the documentation, it shows how to set up virtual hosts in tomcat. Andoni. - Original Message - From: Eberle Martin [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, December 03, 2004 3:31 PM Subject: AW: Tomcat 5 + hostname Same problem here ... can't get tomcat with domain name running :( -Ursprüngliche Nachricht- Von: Lei Lin [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 3. Dezember 2004 15:44 An: [EMAIL PROTECTED] Betreff: Tomcat 5 + hostname Hi folks, We installed Tomcat 5 on Redhat Linux 9 server. In order to run our servlet, we need to use http://hostname:8080 instead of using our server's IP address URL eg: http://177.23.6.2:8080. The IP address URL works for our server, but not the hostname url. Any idea? Thanks Lei - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UTF-8 Encoding in Jsp
I would recommend that you make the Entire Site UTF-8. The parts that are in English will still work no problem but I would really not try mixing the encoding for requests. The junk characters you are getting back are also not actually junk. You can work out what encoding is being used by interpreting these string and knowing what the intended string is. Also the fact that you are not just getting lots of ? characters means that it is not Oracle that is having the problem. I will read the other reply when I get a chance and see if I have any further contributions but for now I really strenuously suggest making ALL the pages/servlets UTF-8. Regards, Andoni. - Original Message - From: Arnab Chakravarty [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, December 01, 2004 10:37 AM Subject: RE: UTF-8 Encoding in Jsp Hi, Thanks for the reply but it did not work. May be I didn't explain the problem correctly. I am running an application that supports all the languages but only in some specific places of the application and I have made those places UTF-8 complaint. Further, they are being saved to Database (Oracle 9). When we are reading the data back from the database, junk characters are displayed on the screen. Yes, the database is set to support UTF-8 Encoding and this is working with the old version of tomcat 3.3 and not with current upgraded version of tomcat 5.0 There are also places in the application where drop downs contain some different language support and we can see those charsets (Japanese, Chinese etc) appearing. Only, when I try to display on the screen through the jsp file, I am encountering this problem of junk characters begin displayed. Hope I have set more context around the problem. Please help me resolve this issue. Thanks, Arnab -Original Message- From: Mariano [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 12:54 PM To: 'Tomcat Users List' Subject: RE: UTF-8 Encoding in Jsp You should use too: head META http-equiv=Content-Type content=text/html; charset=UTF-8 /head and this scriptlet: request.setCharacterEncoding(UTF-8); at the beginning. I hope this help you -Mensaje original- De: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Enviado el: martes, 30 de noviembre de 2004 15:28 Para: Tomcat Users List Asunto: UTF-8 Encoding in Jsp Hi all, I need to make my all jsp files compatible with UTF-8 Encoding and even though I am using the directives: %@ page pageEncoding=UTF-8% %@ page contentType = text/html;charset=UTF-8% in the jsp files, cannot make it work. Using tomcat version 5. Is there any config changes I need to make for the UTF-8 Encoding to work. Please help. Thanks in advance, Arnab - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Admin and Manager applications don't work with modified CATALINA_BASE and startup.sh -security
Your problem is this one line: java.security.AccessControlException: access denied (java.io.FilePermission /iobox/servicios/desarrollo/mms/webapps/admin/WEB-INF/lib/struts.jar read) Forget about all the rest. You have put the following into catalina.policy: catalina.policy in $CATALINA_BASE/conf was modified with: grant codeBase file:/iobox/Sw_comercial/Tomcat/jakarta-tomcat-4.1.31/server/webapps/admin/ WEB-INF/classes/- { permission java.security.AllPermission; }; I would recommend that you fix the problem by taking out the directory here and starting with full permissions to be sure everything works then: grant { permission java.security.AllPermission; } Assuming that this box is not live on the web and that you trust everyone who has access to it! Then add the directories one at a time, testing as you go: grant codeBase file:/iobox/- { permission java.security.AllPermission; } Then grow it up until something breaks again. Andoni. - Original Message - From: David Crecente [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Tuesday, November 30, 2004 9:03 AM Subject: Admin and Manager applications don't work with modified CATALINA_BASE and startup.sh -security Hi all, I have problems to run jakarta-tomcat-4.1.31 with CATALINA_BASE other than CATALINA_HOME using security. I use startup.sh -security. My CATALINA_HOME is /iobox/Sw_comercial/Tomcat/jakarta-tomcat-4.1.31 My CATALINA_BASE is /iobox/servicios/desarrollo/mms My admin.xml is in /iobox/servicios/desarrollo/mms/webapps My manager.xml is in /iobox/servicios/desarrollo/mms/webapps admin.xml and manager.xml were modified following http://jakarta.apache.org/tomcat/tomcat-4.1-doc/RUNNING.txt so, admin.xml has Context path=/admin docBase=/iobox/Sw_comercial/Tomcat/jakarta-tomcat-4.1.31/server/webapps/adm in debug=0 privileged=true and manager.xml has Context path=/admin docBase=/iobox/Sw_comercial/Tomcat/jakarta-tomcat-4.1.31/server/webapps/man ager debug=0 privileged=true catalina.policy in $CATALINA_BASE/conf was modified with: grant codeBase file:/iobox/Sw_comercial/Tomcat/jakarta-tomcat-4.1.31/server/webapps/admin/ WEB-INF/classes/- { permission java.security.AllPermission; }; grant codeBase file:/iobox/Sw_comercial/Tomcat/jakarta-tomcat-4.1.31/server/webapps/admin/ WEB-INF/lib/struts.jar { permission java.security.AllPermission; }; When Tomcat is starting I get the next exception: - Root Cause - java.security.AccessControlException: access denied (java.io.FilePermission /iobox/servicios/desarrollo/mms/webapps/admin/WEB-INF/lib/struts.jar read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java :270) Any idea will be appreciated. Thank you in advance. Full exception is: 2004-11-30 09:14:52 StandardWrapper[/admin:default]: Loading container servlet default 2004-11-30 09:14:52 StandardContext[/admin]: Servlet /admin threw load() exception javax.servlet.ServletException: Servlet.init() for servlet action threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 6) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:776) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3363) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3586) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardHost.start(StandardHost.java:707) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143) at org.apache.catalina.startup.Catalina.start(Catalina.java:463) at org.apache.catalina.startup.Catalina.execute(Catalina.java:350) at org.apache.catalina.startup.Catalina.process(Catalina.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) - Root Cause - java.security.AccessControlException: access denied (java.io.FilePermission /iobox/servicios/desarrollo/mms/webapps/admin/WEB-INF/lib/struts.jar read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java :270) at java.security.AccessController.checkPermission(AccessController.java:401
Re: UTF-8 Encoding in Jsp
Hello, First and foremost I would say: be absolutely sure that it is the JSP's fault. I hope you are not getting some data from a database and trying to show it? Be sure that your editor is saving the JSP in UTF-8 format. Add the flag: -Dfile.encoding=UTF-8 to the CATALINA_OPTS environment variable in your catalina.bat (or equivalent) startup file. and use: req.setCharacterEncoding(UTF-8); to set the encoding on the request. This may help: http://marc.theaimsgroup.com/?l=tomcat-userm=105524550416364w=2 Though you can ignore the method wich is used to set the encoding as the above line does the same job in servlets. Andoni. - Original Message - From: Arnab Chakravarty [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Tuesday, November 30, 2004 2:28 PM Subject: UTF-8 Encoding in Jsp Hi all, I need to make my all jsp files compatible with UTF-8 Encoding and even though I am using the directives: %@ page pageEncoding=UTF-8% %@ page contentType = text/html;charset=UTF-8% in the jsp files, cannot make it work. Using tomcat version 5. Is there any config changes I need to make for the UTF-8 Encoding to work. Please help. Thanks in advance, Arnab - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] SCWCD Exam 1.4
Hi, After reading this mail last night I found a shop in Dublin which had the book in stock. I raced into town after work to get there before the shop closed and got there 5 minutes before closing. I was so relieved and when I saw the book on the shelf I was well pleased. Only when I opened it to take a look did I realise the true extent of what you meant by jokes, cartoons and fill in the blanks pages. It looks more like a children's nursery rhyme book than a Java Certification book! I just put it back on the shelf and walked back out of the shop :-( Thanks, but no thanks, I'll be waiting until January. Andoni. - Original Message - From: Januski, Ken [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 11:06 PM Subject: RE: [OT] SCWCD Exam 1.4 I'm part way through the Head First book. I really didn't like Head First Java though it got rave reviews when it came out. And I did like the first version of the Manning SCWCD book. That said I'm finding the Head First Servlets and JSP book enjoyable, though I've only read the first 150 pages or so. The authors are from www.javaranch.com and I'm sure you can get plenty of additional information there. Of course a lot of fans of the Head First books hang out there too. Whether you could actually use it for certification I'm not sure. I think that you probably could based on what I've read so far because it strives to get you to understand servlets, jsp and everything connected with them on a basic level. It does so with jokes, cartoons, fill in the blank pages, etc. I'm sure a lot of people will hate this manner of learning just as others can't stand the drier approach of the Manning book. My feeling is that if you are not someone who gets offended by jokey material that you can read this book and learn enough to pass the exam, esp. if you also read the specs as the book suggests. But take this with a grain of salt as I've not taken the 1.4 exam and I'm only 1/8 of the way through the book. If you like your books serious though, then steer very clear. Hope this helps, Ken -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 12:57 PM To: 'Tomcat Users List' Subject: RE: [OT] SCWCD Exam 1.4 I'd be completely remiss in not mentioning that Manning is putting out a second edition of it's SCWCD study guide. The second edition has been updated for the new exam. Manning's ISBN is 1932394389 (that's the one scheduled for January) HeadFirst is 0596005407 (the one out now) both of them cover the new exam. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 11:49 AM To: 'Tomcat Users List' Subject: RE: [OT] SCWCD Exam 1.4 -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 9:25 AM To: Tomcat Users List Subject: RE: [OT] SCWCD Exam 1.4 The one you found Head First Servlets and JSP appears to me not to be a dedicated exam guide. I think the only reason it Not sure what copy you're looking at. Mine has a black bar across the top that say ... Study Guide The subtitle of the book is Passing the Sun Certified Web Component Developer Exam and it mentions on the cover that it is Written by the co-developers of the real SCWCD exam for J2EE 1.4. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where is the 2.4 spec.?
Hello, Can anybody give me the address for the 2.4 Servlet and 2.0 JSP specifications? Thanks, Andoni.
Re: Where is the 2.4 spec.?
Thanks for that. Let me pass this page on which I intend to bookmark: http://www.jcp.org/en/jsr/all It lists all the JCP Specifications. Andoni. - Original Message - From: Allistair Crossley [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, November 26, 2004 12:09 PM Subject: RE: Where is the 2.4 spec.? jeez, ever heard of google? http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 26 November 2004 12:07 To: Tomcat Users List Subject: Where is the 2.4 spec.? Hello, Can anybody give me the address for the 2.4 Servlet and 2.0 JSP specifications? Thanks, Andoni. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JavaScript/JSP Question
Hi, Yes, there is a way. It is not related to Tomcat in any way but... what you need to use is string.indexOf(string2) So, take the value of the current item in the combo box and see if it contains the string you are searching for using the indexOf() method. This is a JavaScript issue though so I suggest if you have further problems you try addressing comp.lang.JavaScript (available from Google). If the indexOf() method does not find the substring it will return -1 if it does, it will return it's index. HTH Andoni. - Original Message - From: Jack Lauman [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 4:33 AM Subject: JavaScript/JSP Question I'm using the following JavaScript to create lists of restaurants by Location and Cuisine. Is there a way to modify the script to accept a value for the restaurant name that would be similar to a %LIKE% function in MySQL when the user hits the submit button? Thanks, Jack script language=JavaScript !-- function MM_jumpMenu(targ,selObj,restore, field){ //v3.0 eval(targ+.location='http://www.mydomain.com/restaurant/filter.jsp?field=+ field+value=+selObj.options[selObj.selectedIndex].value+'); if (restore) selObj.selectedIndex=0; } //-- /script form name=selectLocation method=get location=http://www.mydomain.com/restaurant/filter.jsp; input type=hidden name=field value=city select name=location size=1 onChange=MM_jumpMenu('parent',this,0,'city') - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Protecting my web server
Also trim down your server.xml (over a number of days if necessary) to only what is necessary. If you only have to expose one webapp then only have one connector in that service, and one engine which has the only host inside it as the default and that has the only context inside it as your application. Then put liveDeploy=false and autoDeploy=false in the Host Then you can go into %tomcat_home%/conf/web.xml and set listings parameter to false so that nobody can see directory listings no matter what you do. As for monitoring I would suggest putting an Apache web server in front of your Tomcat server but if it's only for a short time this may be too much hassle. What you can do instead is to add an Access log valve to your Engine and monitor the contents of the access logs every day to see that there are no hack attempts coming in through port 80. Also you might download a free portscanner from the web to see what ports are open on your machine. Once you have found the open ports use Windows to close down the programs that are listening on them. Best of luck. Andoni. - Original Message - From: Richard [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 6:14 AM Subject: Re: Protecting my web server Thanks a lot On Wed, 24 Nov 2004 07:58:37 +0200, Quinton Delpeche [EMAIL PROTECTED] wrote: On Wednesday 24 November 2004 07:49, Richard wrote: Hi Quinton, Can't really check, but the following guidelines are good: - Make sure your tomcat user does not have admin privileges on the server. (Not sure how to do this on Windows, I am a linux person). - Make sure your web-application doesn't have any funny code that might get exploited by a proficient hacker (i.e. shell commands run as ROOT). - Add a blank index.html to each directory of your web-app, this prevents users from getting directory listings on your server. - Ensure that you don't give away too much information in your URL (using ? and parameters). This can easily be prevented by implementing SSL and ensuring that the users have to log on first. How can you tell when your web-app is secure? Forgive me for asking too many questions, im just a newbie. No problem. I understand. :) Thanks Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ For some reason, this fortune reminds everyone of Marvin Zelkowitz. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] SCWCD Exam 1.4
Hello, I know this is off topic but I was just wondering if anybody had done either the new 1.4 version of the SCWCD Exam (Sun Certified Web Component Developer) or the upgrade exam from 1.2. If you have can you recommend any book or reference page. It seems to be a bit new at the moment and nobody seems to have gotten their act together on writing a book for it yet so all there is to go on is the reference from SUN and looking things up on the web. Andoni.
Re: [OT] SCWCD Exam 1.4
Hi, Thanks for that I found one which was printed in September. Here's it's ISBN: 0596005407 If you know of a reason I shouldn't buy this one and January's is better let me know. I'm always open to recommendations. Andoni. - Original Message - From: Allistair Crossley [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 11:50 AM Subject: RE: [OT] SCWCD Exam 1.4 Yeah, there's a new book out in January 2005. Search Amazon for SCWCD. Allistair -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 24 November 2004 10:35 To: Tomcat Users List Subject: [OT] SCWCD Exam 1.4 Hello, I know this is off topic but I was just wondering if anybody had done either the new 1.4 version of the SCWCD Exam (Sun Certified Web Component Developer) or the upgrade exam from 1.2. If you have can you recommend any book or reference page. It seems to be a bit new at the moment and nobody seems to have gotten their act together on writing a book for it yet so all there is to go on is the reference from SUN and looking things up on the web. Andoni. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] SCWCD Exam 1.4
Hi, That's strange: the Australians seem to think it's an SCWCD book here: http://www.elx.com.au/item/0596005407 and yet the rest of the planet seems to think it's just your average Servlet's and JSP book: http://www.amazon.com/exec/obidos/ASIN/0596005407/qid%3D1101316503/sr%3D11-1/ref%3Dsr%5F11%5F1/104-2495694-9214342 http://www.buy4now.ie/Eason/productdetail.aspx?pid=1355175loc=Pcatid=1025.15 http://www.amazon.co.uk/exec/obidos/ASIN/0596005407/qid%3D1101316630/026-2276339-7082051 The Book Description section in Amazon is the exact the same as in the Ozzie site! Is it just the same book with a different cover? Andoni. - Original Message - From: Allistair Crossley [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 3:24 PM Subject: RE: [OT] SCWCD Exam 1.4 The one you found Head First Servlets and JSP appears to me not to be a dedicated exam guide. I think the only reason it is mentioning you can even take the exam if you want! is to sell copies. I could be wrong but I think you'd be better waiting for a dedicated 1.4 exam guide. Allistair -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 24 November 2004 15:08 To: Tomcat Users List Subject: Re: [OT] SCWCD Exam 1.4 Hi, Thanks for that I found one which was printed in September. Here's it's ISBN: 0596005407 If you know of a reason I shouldn't buy this one and January's is better let me know. I'm always open to recommendations. Andoni. - Original Message - From: Allistair Crossley [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 11:50 AM Subject: RE: [OT] SCWCD Exam 1.4 Yeah, there's a new book out in January 2005. Search Amazon for SCWCD. Allistair -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 24 November 2004 10:35 To: Tomcat Users List Subject: [OT] SCWCD Exam 1.4 Hello, I know this is off topic but I was just wondering if anybody had done either the new 1.4 version of the SCWCD Exam (Sun Certified Web Component Developer) or the upgrade exam from 1.2. If you have can you recommend any book or reference page. It seems to be a bit new at the moment and nobody seems to have gotten their act together on writing a book for it yet so all there is to go on is the reference from SUN and looking things up on the web. Andoni. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] SCWCD Exam 1.4
Hi, even check out the two covers: http://www.elx.com.au/images/products/full/0596005407.jpg and http://images-eu.amazon.com/images/P/0596005407.02.LZZZ.jpg I think it may be the other way around. They may be trying to get people who are not necessarily doing the exam to buy a copy of their book. I must admit when I first started with JSP and Servlets I would not have bought a SCWCD book even though it probably has everything I'd have wanted and more. Andoni. - Original Message - From: Allistair Crossley [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 5:32 PM Subject: RE: [OT] SCWCD Exam 1.4 lol, interesting, different name for down under. Maybe it is good nuff then! Allistair -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 24 November 2004 17:19 To: Tomcat Users List Subject: Re: [OT] SCWCD Exam 1.4 Hi, That's strange: the Australians seem to think it's an SCWCD book here: http://www.elx.com.au/item/0596005407 and yet the rest of the planet seems to think it's just your average Servlet's and JSP book: http://www.amazon.com/exec/obidos/ASIN/0596005407/qid%3D110131 6503/sr%3D11-1/ref%3Dsr%5F11%5F1/104-2495694-9214342 http://www.buy4now.ie/Eason/productdetail.aspx?pid=1355175loc =Pcatid=1025.15 http://www.amazon.co.uk/exec/obidos/ASIN/0596005407/qid%3D1101 316630/026-2276339-7082051 The Book Description section in Amazon is the exact the same as in the Ozzie site! Is it just the same book with a different cover? Andoni. - Original Message - From: Allistair Crossley [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 3:24 PM Subject: RE: [OT] SCWCD Exam 1.4 The one you found Head First Servlets and JSP appears to me not to be a dedicated exam guide. I think the only reason it is mentioning you can even take the exam if you want! is to sell copies. I could be wrong but I think you'd be better waiting for a dedicated 1.4 exam guide. Allistair -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 24 November 2004 15:08 To: Tomcat Users List Subject: Re: [OT] SCWCD Exam 1.4 Hi, Thanks for that I found one which was printed in September. Here's it's ISBN: 0596005407 If you know of a reason I shouldn't buy this one and January's is better let me know. I'm always open to recommendations. Andoni. - Original Message - From: Allistair Crossley [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 24, 2004 11:50 AM Subject: RE: [OT] SCWCD Exam 1.4 Yeah, there's a new book out in January 2005. Search Amazon for SCWCD. Allistair -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 24 November 2004 10:35 To: Tomcat Users List Subject: [OT] SCWCD Exam 1.4 Hello, I know this is off topic but I was just wondering if anybody had done either the new 1.4 version of the SCWCD Exam (Sun Certified Web Component Developer) or the upgrade exam from 1.2. If you have can you recommend any book or reference page. It seems to be a bit new at the moment and nobody seems to have gotten their act together on writing a book for it yet so all there is to go on is the reference from SUN and looking things up on the web. Andoni. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem.
If you are not using Struts why did you call the login JSP, loginResponse.do? Did you add .do to your web.xml file as a JSP type? Can you post your web.xml. Andoni. - Original Message - From: Stefan [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Monday, November 22, 2004 5:36 AM Subject: Re: Servlet mapping problem. Hi, I'm not using struts. Stefan www.killersites.com - Original Message - From: sven morales [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 12:25 AM Subject: Re: Servlet mapping problem. Can you also post all your struts-config.xml action .. ? I was looking for something that may be forwarding it to login.jsp. This line you have in your form, form action=/context_name/loginResponse.do points to context_name/loginResponse.do so show this action line of your struts-config.xml --- Stefan [EMAIL PROTECTED] wrote: Hi, I am actually using a form to post to the target servlet: form action=/context_name/loginResponse.do method=post name: input type=text name=adminPassword input type=submit /form The form itself is sitting in a page with this URL: http://127.0.0.1/myWebsite/logIn.jsp And the strange thing is that when I submit the form I am taken to this URL: http://127.0.0.1/login.jsp And I get this error: HTTP Status 404 - /login.jsp -- -- type Status report message /login.jsp description The requested resource (/login.jsp) is not available. -- -- Apache Tomcat/5.0.28 Any ideas? Is this a bug in Tomcat ? This works fine (naturally) in Resin. Stefan www.killersites.com - Original Message - From: sven morales [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 9:58 PM Subject: Re: Servlet mapping problem. Can you show us what you type in to your browser? --- Stefan [EMAIL PROTECTED] wrote: Hi, I first posted this question with the wrong subject heading ... sorry about the duplicates. My question: Using Tomcat 5.0.28 standalone on windows XP with JVM 1.4, I get this error even though I have mapped my servlet in the web.xml file of the web app: HTTP Status 404 - /loginResponse.do -- -- type Status report message /loginResponse.do description The requested resource (/loginResponse.do) is not available. -- -- Apache Tomcat/5.0.28 I've placed my webapp folder in Tomcats' webapps directory and all the jsp pages run fine as do my POJO's for business logic, any ideas why the servlet code could be causing problems? The servlet mappings: code: -- -- -- servlet servlet-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/servlet-name url-pattern/loginResponse.do/url-pattern /servlet-mapping -- -- -- It's my first time using Tomcat, been a Resin user for years ... any ideas? Thanks, Stef - Original Message - From: Mark Thomas [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 12:10 PM Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception I'll look into this but I need a bit more info: 1. What servlet mapping did you specify in web.xml? 2. What URL are you requesting? Mark -Original Message- From: Sergey Kamshilin [mailto:[EMAIL PROTECTED] Sent: Saturday, November 20, 2004 12:00 AM To: [EMAIL PROTECTED] Subject: CGI Again...Servlet.service() for servlet cgi threw exception Sorry guys, I gave up digging into it and haven't seen such problems in archives... Tomcat 4.1.31 on Solaris. I enabled cgi scripting: changes in web.xml
Re: SSL
Hi, Do you mean ... into two Services? Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 18, 2004 5:53 PM Subject: RE: SSL Hi, Yeah, reorganize your server.xml into two engines, with one connector and webapp each. One engine will have the SSL connector and webapp, and the other engine will have the non-SSL connector and webapp. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Richard HALLIER [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 12:42 PM To: Tomcat Users List Subject: RE: SSL Thank you for your reply, but I've omitted to say that I have another webapp that is non-ssl, so I must have the two connectors (http, https) up. Do you have a solution ? Really thank you for your help. Richard -Message d'origine- De : Shapira, Yoav [mailto:[EMAIL PROTECTED] Envoye : jeudi 18 novembre 2004 18:09 A : Tomcat Users List Objet : RE: SSL Hi, Comment out the non-SSL connector element in server.xml. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Richard HALLIER [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 12:02 PM To: tomcat mailing-list Subject: SSL Hi everybody, Sorry if this question has been already asked, but i didnt find any pointers in the archive. I'm in the following context : Tomcat 5.0.x, Connector SSL active. I'd like to prevent everybody from using my webapp with the HTTP protocol, in fact I'd like to restrict access to my webapp only to the https protocol. For the moment and with a standard configuration, I can access my webapp from http and https protocol ... Thank you for your help. Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing a webmail client such as squirrelmail (PHP) on tomcat?
Tomcat is fine and all but in this case it is definitely not the right tool for the job. I know you've had problems with Apache but I'd go look at it again. I am running apache 1.3 and I have a 5 line workers.properties, and one line in server.xml, my connector has never been a problem. Installing PHP took less time to do than it did to download the module over DSL! Just my 2 cents: Go to old Apache, Old JK, and set up simply. Andoni. - Original Message - From: David Lee [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, November 19, 2004 4:48 PM Subject: RE: Installing a webmail client such as squirrelmail (PHP) on tomcat? Hi! Yoav, That's right, because I saw so many mails related to apache connector, jk2 or mod_jk. Also I got problem with apache 2.0.* My OS is winXP professional. Somehow, the apache server service looks like it's running using Window services menu, but After I refresh it, the apache service is not running. It was running like that for more than 3 monthes and Finally I gave up, because my focus is Tomcat, I just want to make everything works first on tomcat and then Think other options. It will simplify the application development and deployment. David Lee -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 5:40 AM To: Tomcat Users List Subject: RE: Installing a webmail client such as squirrelmail (PHP) on tomcat? Hi, easiest is subjective: some (many IMHO) people find the connector configuration difficult enough so that anything they can run on Tomcat standalone is good. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Andy Savage [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 6:36 AM To: Tomcat Users List Subject: Re: Installing a webmail client such as squirrelmail (PHP) on tomcat? Wouldn't the easiest way be to run apache as a front end with mod_jk2? It's pretty simple and it saves the hassle of possibly taking down the whole server with a crash, or any security hassles. Serve php with apache, serve everything else to tomcat. Kind Regards, Andy Savage -- Bluewire Solutions Position: Partner Contact: +64 27 4678 262 Website: www.bluewire.net.nz Email: [EMAIL PROTECTED] David Lee wrote: Hi! Folks, Has anyone run the php application on Tomcat?. I'm trying to install the squirrelmail on tomcat so I can web access my james email server. What is the best way to integrate the php with tomcat or any suggesstions or pitfalls to avoid? Any comments welcome. Thanks David Lee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Suggestion - upgrade scripts.
Ok, I have been playing around with this idea. What I would use most would not so much be an upgrade script between versions but an upgrade script between sub-version. Or maybe even just a list of the files that have changed in a sub-version upgrade, and a copy of each one. Like an upgrade version of Tomcat. You only download the files that have changed! I know this is recoverable from the release notes but it would be made simpler if there was just a zip file with only the changed jars etc. Yes / No / Not useful ? Andoni. - Original Message - From: QM [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 18, 2004 12:07 AM Subject: Re: Suggestion - upgrade scripts. On Wed, Nov 17, 2004 at 03:15:46PM +, Andoni wrote: : Ever since a recent conversation about the status of the 4.1.xx branch of the Tomcat tree I have been wondering about the best route for upgrading the servers which I manage. Having browsed the Tocmat website and seen the differences between the different versions I have noticed what's missing. I have a link on my site for upgrading from 4.1.x - 5.0.x. http://www.brandxdev.net/misc/tomcat_upgrade.site The 5.0.x - 5.5.x guide is on the way. : I think there should be some development effort put into scripts for upgrading from the previous version of Tomcat. Have at it! Where I'm from, such a statement is considered a statement that you volunteer your time to do this. ;) In all seriousness, how could there be such a tool? Most of what Tomcat does and provides is detailed in the servlet/JSP specs: it must handle WAR files, it must service JSPs, and so on. In turn, most of the upgrade process involves you, the developer, testing and adjusting your app to fit the new specs. Looking at the upgrade guide I've assembled, there were only a couple of changes to Tomcat config files. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: gc output for tomcat?? where is it
What I find is that when something goes to the console but not to the stdout.log file it is going to Standard Error. Do you have any way of checking where the stderr stream is going? Can you write a line into your file saying: System.err.println(Find this line.); and then do a search of the stdout.log file for it. if it's not there then do a text seach of the Tomcat tree, then the drive! Chances are, when you find one you'll find the other. Andoni. - Original Message - From: Pooleery, Manoj [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Tuesday, November 16, 2004 2:55 PM Subject: RE: gc output for tomcat?? where is it No, it doesn't print it in the stdout.log either. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 15, 2004 4:46 PM To: Tomcat Users List Subject: RE: gc output for tomcat?? where is it Hi, Well, the console is trapped to stdout.log when running as a service, isn't it? That's where I'd expect it. But I don't care enough for JDK 1.3 to actually test this for you ;) Yoav Shapira http://www.yoavshapira.com -Original Message- From: Pooleery, Manoj [mailto:[EMAIL PROTECTED] Sent: Monday, November 15, 2004 4:44 PM To: 'Tomcat Users List' Subject: RE: gc output for tomcat?? where is it Can somebody from the developer team answer this question please? -Xloggc: works only from JDK 1.4 onwards. With JDK 1.3.1 and Tomcat running as a service, I was also not able to get any gc logs anywhere. When it is running as a console, with the -verbose:gc flag, it was showing the gc output on the console itself, but when changed to start as a service, there was no trace of it. Thanks -Manoj Pooleery. -Original Message- From: David Boyer [mailto:[EMAIL PROTECTED] Sent: Monday, November 15, 2004 3:49 PM To: [EMAIL PROTECTED] Subject: Re: gc output for tomcat?? where is it try adding -Xloggc:file [EMAIL PROTECTED] 11/15/2004 12:39:45 PM I have set the -verbose:gc flag for tomcat. Where does the output go? Do I need to set the log level to Info instead of Error?? John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 Before you criticize someone, walk a mile in their shoes. That way, you'll be a mile from them, and you'll have their shoes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Pooling
I think what you are looking for is this: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html This one is for Tomcat 5.x of course but varies little. Follow the links to find ones for other Tomcats under JDBC DataSources. Andoni. - Original Message - From: Scott Purcell [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Tuesday, November 16, 2004 9:35 PM Subject: Database Pooling I am developing a mid-sized application, which will use JSP Model 2 Architecture. Currently I have a class that does Database Pooling, but I am curious about some threads I see time to time. I have noticed that some developers on this list refer to Tomcats Database Pooling. It looks like there are some hooks into the deployment file. So I guess my question is as follows. does Tomcat offer this type of pooling? and if so, is it good, and is it portable? Links, references would be great. Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Suggestion - upgrade scripts.
Hello, Ever since a recent conversation about the status of the 4.1.xx branch of the Tomcat tree I have been wondering about the best route for upgrading the servers which I manage. Having browsed the Tocmat website and seen the differences between the different versions I have noticed what's missing. I think there should be some development effort put into scripts for upgrading from the previous version of Tomcat. If these scripts could also download from the website then the simplest answer to I'm running 4.1.27 and it crashes when I ... would be Then run the upgrade script and call back! I actually hope the user list never becomes this rude but you get my gist. At least a lot more people would have the option to upgrade if they didn't have to know exactly what was involved (i.e. a script could know for them). Anyone got any free development time? Just a suggestion. Andoni.
Re: Context element problems in conf/server.xml
Hi Andrew, Definitely cleaning up Server.xml to remove all those confusing comments and commented out sections is a great idea. I'd also suggest you change all XML tags to be on one line each and indent the whole file properly if you haven't already done so. I must admit that I have no idea why it is requiring you to use the path=/ attribute with the forward slash. The very first option looks fine to me. Have you tried not using servername as the name of your env. variable, if that is in fact what you are using? It may be conflicting with something else. Other things you might try, if you don't want to just leave well enough alone! Are: 1. Try setting up a second Host, leave the one that's there alone but set up Host name=www.joebloggs.com and configure that up. Then add it to your LMHOSTS file in the Windows/system32 directory. 2. Change the name of the Environment variable to servername2 and see if it's a conflict issue. 3. Leave well enough alone! Sorry I could not help any further. Rgds, Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Monday, November 15, 2004 11:52 AM Subject: Re: Context element problems in conf/server.xml Thanks again. That works great, I'm accessing my webapp fine as the default webapp with the following Engine name=Catalina defaultHost=localhost debug=9 Host name=localhost debug=9 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=pets-proper debug=9 Environment name=servername type=java.lang.String value=dev.andrew override=false/ /Context /Host /Engine However, my application can't find the 'servername' environment property again! The combinations I've tried (each one three times to be sure) and their behaviour path=, docBase=xxx, WAR named xxx.war --- WAR is unpacked, webapp starts but property not found path=/, docBase=xxx, WAR named xxx.war --- WAR is unpacked, webapp starts but property not found path=, docBase=ROOT, WAR named ROOT.war --- WAR is not unpacked, webapp does not start path=/, docBase=ROOT, WAR named ROOT.war --- WAR is unpacked, webapp starts and property found! I'm now really confused. The last option was where I came in! This didn't work previously and now does. I really wish that I understood tomcats behaviour. The only other change is that I've cleaned up my server.xml file but only to remove comments and commented out sections. Andoni, thank you for your replies. Does this make any sense at all to you? If I have the time I'll take a look at the tomcat source but deadlines are looming at the moment... For the moment I have my fingers crossed (not my favourite policy) that all will keep working. Regards Andrew Andoni wrote: Yes, you can have any xxx.war that you access from http://localhost/login.jsp so long as it's path= and it is the only context in that Host which has path=. This is what makes it the default app. Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, November 12, 2004 5:00 PM Subject: Re: Context element problems in conf/server.xml Hi Andoni Thanks again for your reply. I hope I'm understanding what you say correctly, apologies if not. If I rename my WAR to say, app.war, then to access a page the URL would become http://localhost/app/login.jsp. The reason why I changed the appBase to ROOT and renamed my WAR ROOT.war was so that the URL would be http://localhost/login.jsp. This is a customer directive. Is the problem that I'm going about this the wrong way in the first place? Can I have an app.war and access it like http://localhost/login.jsp? Best regards Andrew Andoni wrote: Ok, You can ignore the logger's and valve's when you are worrying about configuration. So what you are left with is: Engine name=Catalina defaultHost=localhost debug=9 Host name=localhost debug=9 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/ docBase=ROOT debug=9 /Context /Host /Engine What you have to be aware of is that ROOT is more than just another name for a webapp. ROOT is a special name for the default webapp in a host. Therefore what you should do is to remove all references to root. Comment out this line of the server.xml, call your .war file something else and set the path=. Regards, Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, November 12, 2004 11:30 AM Subject: Re: Context element problems in conf/server.xml Thanks for your reply. Please find below the tags as requested. Thank you for taking the time. Engine name=Catalina defaultHost=localhost debug=9 Valve className
Re: Context element problems in conf/server.xml
Ok, You can ignore the logger's and valve's when you are worrying about configuration. So what you are left with is: Engine name=Catalina defaultHost=localhost debug=9 Host name=localhost debug=9 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/ docBase=ROOT debug=9 /Context /Host /Engine What you have to be aware of is that ROOT is more than just another name for a webapp. ROOT is a special name for the default webapp in a host. Therefore what you should do is to remove all references to root. Comment out this line of the server.xml, call your .war file something else and set the path=. Regards, Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, November 12, 2004 11:30 AM Subject: Re: Context element problems in conf/server.xml Thanks for your reply. Please find below the tags as requested. Thank you for taking the time. Engine name=Catalina defaultHost=localhost debug=9 Valve className=org.apache.catalina.valves.RequestDumperValve/ Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=9 resourceName=UserDatabase/ Host name=localhost debug=9 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/ docBase=ROOT debug=9 Environment name=servername type=java.lang.String value=dev.andrew override=false/ /Context Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ /Host /Engine Andoni wrote: Hello, You certainly don't need the / in the path attribute. This is not going to work as it cannot match just one slash. Would you please post the Engine Host and Context tags. They should all be seen as a group to know exactly what's being called. Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 11, 2004 4:19 PM Subject: Context element problems in conf/server.xml Hi I posted a problem a couple of days ago which I've made some progress with. Originally my webapp ROOT.war would not unpack. I've figured out the problem was with the Context element as shown below Context path= docBase=ROOT debug=9 Environment name=servername type=java.lang.String value=dev.andrew/ /Context If I unpacked ROOT.war manually then my application worked fine. By adding a forward slash to the path attribute as shown below Context path=/ docBase=ROOT debug=9 Environment name=servername type=java.lang.String value=dev.andrew/ /Context tomcat now unpacks the WAR fine. However, my application no longer starts because it cannot find the 'servername'! Yikes! Does anybody have any suggestions please? Thanks again Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context element problems in conf/server.xml
Yes, you can have any xxx.war that you access from http://localhost/login.jsp so long as it's path= and it is the only context in that Host which has path=. This is what makes it the default app. Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, November 12, 2004 5:00 PM Subject: Re: Context element problems in conf/server.xml Hi Andoni Thanks again for your reply. I hope I'm understanding what you say correctly, apologies if not. If I rename my WAR to say, app.war, then to access a page the URL would become http://localhost/app/login.jsp. The reason why I changed the appBase to ROOT and renamed my WAR ROOT.war was so that the URL would be http://localhost/login.jsp. This is a customer directive. Is the problem that I'm going about this the wrong way in the first place? Can I have an app.war and access it like http://localhost/login.jsp? Best regards Andrew Andoni wrote: Ok, You can ignore the logger's and valve's when you are worrying about configuration. So what you are left with is: Engine name=Catalina defaultHost=localhost debug=9 Host name=localhost debug=9 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/ docBase=ROOT debug=9 /Context /Host /Engine What you have to be aware of is that ROOT is more than just another name for a webapp. ROOT is a special name for the default webapp in a host. Therefore what you should do is to remove all references to root. Comment out this line of the server.xml, call your .war file something else and set the path=. Regards, Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, November 12, 2004 11:30 AM Subject: Re: Context element problems in conf/server.xml Thanks for your reply. Please find below the tags as requested. Thank you for taking the time. Engine name=Catalina defaultHost=localhost debug=9 Valve className=org.apache.catalina.valves.RequestDumperValve/ Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=9 resourceName=UserDatabase/ Host name=localhost debug=9 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/ docBase=ROOT debug=9 Environment name=servername type=java.lang.String value=dev.andrew override=false/ /Context Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ /Host /Engine Andoni wrote: Hello, You certainly don't need the / in the path attribute. This is not going to work as it cannot match just one slash. Would you please post the Engine Host and Context tags. They should all be seen as a group to know exactly what's being called. Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 11, 2004 4:19 PM Subject: Context element problems in conf/server.xml Hi I posted a problem a couple of days ago which I've made some progress with. Originally my webapp ROOT.war would not unpack. I've figured out the problem was with the Context element as shown below Context path= docBase=ROOT debug=9 Environment name=servername type=java.lang.String value=dev.andrew/ /Context If I unpacked ROOT.war manually then my application worked fine. By adding a forward slash to the path attribute as shown below Context path=/ docBase=ROOT debug=9 Environment name=servername type=java.lang.String value=dev.andrew/ /Context tomcat now unpacks the WAR fine. However, my application no longer starts because it cannot find the 'servername'! Yikes! Does anybody have any suggestions please? Thanks again Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE][RESULT] Tomcat 5.5.4 Stability
Hi, Congratulations all, I look forward to trying it out. Who is entitled to vote? Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 7:25 PM Subject: [VOTE][RESULT] Tomcat 5.5.4 Stability Hi, After ample time for voting, we've ratified Tomcat 5.5.4 as a stable release, the first one of the 5.5 branch. The voting archive is here: http://marc.theaimsgroup.com/?t=10996632613r=1w=2. There were 3 binding +1 votes (Remy, Mladen, myself) and 1 non-binding +1 vote (David). There were no other votes (where is everyone? ;)). I'm now going to update the web site and download links accordingly. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE][RESULT] Tomcat 5.5.4 Stability
Hi, Congratulations all, I look forward to trying it out. Who is entitled to vote? Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 7:25 PM Subject: [VOTE][RESULT] Tomcat 5.5.4 Stability Hi, After ample time for voting, we've ratified Tomcat 5.5.4 as a stable release, the first one of the 5.5 branch. The voting archive is here: http://marc.theaimsgroup.com/?t=10996632613r=1w=2. There were 3 binding +1 votes (Remy, Mladen, myself) and 1 non-binding +1 vote (David). There were no other votes (where is everyone? ;)). I'm now going to update the web site and download links accordingly. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ask for the best way to handle an exception
Hello, I find that I get this error a lot in two situations: 1. When I have just put a new webapp live and not precompiled the JSPs myself. 2. When there is heavy load on the server. So, I suggest, if you are compiling your JSPs before making your app available to your users, and you are still getting a large number of these errors, you need a faster machine. Of course some will always be present but you should monitor the number of them even just by taking a mental note each day of the number of them in the log. Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 10, 2004 9:21 PM Subject: RE: Ask for the best way to handle an exception Hi, First, this error is not serious and can safely be ignored. But if you want avoid it, don't click other buttons until the action is done ;) Of course that's easier to say than to enforce. One way to enforce this is some basic JavaScript: set all form buttons to disabled when one is clicked, and have each button's action re-enable the other buttons when it's done. There are JavaScript examples online that do this, it's easy. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 4:17 PM To: Tomcat Users List Subject: Ask for the best way to handle an exception In a JSP page, there are buttons. clicking one will launch an action which may read/write socket. In my program, all actions work well. But exception caused in the circumstance: I clicked a button. Before that action finished (in the middle of read/write socket), immediately, I clicked another button. I get an error, attached at the end of my email. Please forward your instruction. Thanks. Nov 10, 2004 11:47:47 AM org.apache.jk.server.JkCoyoteHandler action SEVERE: Error in action code java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:489) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:697) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:487) at org.apache.coyote.Response.action(Response.java:226) at org.apache.coyote.Response.finish(Response.java:348) at org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328) at org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse. java : 497) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:339) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java :650 ) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja v a:688) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More apps = More load ?
Hello, Does Tomcat use more resources depending on how many apps are present even if they are not being used? In the last few days, customers have been ringing the helpdesk in my company complaining about the speed of the web sites we host on the Tomcat Servers. I associated this with the fact that I had just made a copy of one of the biggest sites on the Tomcat machine for use as a test app in the live environment. So I removed all non-essential apps from the server and found that it is now going much faster than it was before. I would have thought that it was the number of connections to a server and the amount of users/usage there of that would have caused a load which would slow it down. In my case though there was very little usage in any of the test apps but their presence seemed to be slowing things down. Does this sound right?
Re: Context element problems in conf/server.xml
Hello, You certainly don't need the / in the path attribute. This is not going to work as it cannot match just one slash. Would you please post the Engine Host and Context tags. They should all be seen as a group to know exactly what's being called. Andoni. - Original Message - From: Andrew Watters [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 11, 2004 4:19 PM Subject: Context element problems in conf/server.xml Hi I posted a problem a couple of days ago which I've made some progress with. Originally my webapp ROOT.war would not unpack. I've figured out the problem was with the Context element as shown below Context path= docBase=ROOT debug=9 Environment name=servername type=java.lang.String value=dev.andrew/ /Context If I unpacked ROOT.war manually then my application worked fine. By adding a forward slash to the path attribute as shown below Context path=/ docBase=ROOT debug=9 Environment name=servername type=java.lang.String value=dev.andrew/ /Context tomcat now unpacks the WAR fine. However, my application no longer starts because it cannot find the 'servername'! Yikes! Does anybody have any suggestions please? Thanks again Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic authentication
Hello, The answer to your question is that you cannot serve the User database (now tomcat-users.xml) from inside a .war file as it cannot be read from in there but you can change its location to be below your webapps directory. This can be achieved by changing the path to it which is currently in Server.xml. You need not use a flat file format though to serve your username/password combinations just because you are using Basic Authentication. The two are separate issues: issue one is: What type of authentication do I want? Form, Basic, Digest, Client-Cert. This is a Sun servlet secification issue/list version 2.2 of which can be found here: http://java.sun.com/products/servlet/2.2/ Issue two is: Where am I going to store my database of users? Database (JDBC Realm), LDAP directory (JNDI Realm), Flat File (Memory Realm), etc. This is a Tomcat container specific issue/list which can be found here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html Hope this all helps, Andoni. - Original Message - From: Michal Kwiatek [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 11, 2004 4:25 PM Subject: Basic authentication I would like to use container-based declarative authentication without the need to modify any files in $CATALINA_HOME/conf directory. To simplify my question a bit: is it somehow possible to make tomcat read tomcat-users.xml from the war file, and not from $CATALINA_HOME/conf? Michal. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Speed of jsp:useBean tags.
Hello, I have an application which is just a front-end for a main-frame. The process on the mainframe which my application calls takes 8 seconds to complete so I am trying to make my Java application as fast as possible so that there is as little time as possible wasted. Can anybody give any tips or sites for speeding up Tomcat/Java/Webapps? Can anybody tell me if using jsp:useBean tags to pass an entire object to a JSP is a slow way of doing things? Am I quicker passing a list of strings using various request.setAttribute() methods? Or is this insignificant? I am really stuck because I don't know how to choose the best way of going forward. If I can't significantly improve the speed of the app. I should just abandon the project but that is not desirable as you can imagine! Andoni.
Re: Speed of jsp:useBean tags.
There are two alternatives with the Mainframe. One is to do a call to a batch file which searches through a directory tree for the files I want and then opens them and returns the data from them. This is the one currently in use live. The second alternative is the one I am trying to implement and is just going to the appropriate directory using Java code and replacing the Runtime.exec() call which was calling the batch file. I thought that this would significantly improve performance but my initial tests don't agree (though there is an improvement). Now I am not sure whether to spend more time programming this solution for the few seconds it gains or to put it on hold. Is there a way to tune the JVM's File Access methods maybe? I will also try JMeter as I have never used this before. Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Wednesday, November 10, 2004 1:54 PM Subject: RE: Speed of jsp:useBean tags. Hi, First, please don't blindly tune anything. Change one parameter at a time, and measure the impact using a program like JMeter, Grinder, ab, wget, or whatever load tester you like. For example, chances are the minProcessors/maxProcessors advice in the other response to your message is irrelevant, and by increasing those you'll just be taking away CPU resources from the code that needs those resources. I have an application which is just a front-end for a main-frame. The process on the mainframe which my application calls takes 8 seconds to complete so I am trying to make my Java application as fast as possible so that there is as little time as possible wasted. How much time does your Java app take now? If it's significantly less than 8 seconds (say, less than 3 sec) don't bother tuning it, and focus instead of tuning the mainframe call if at all possible. Can anybody give any tips or sites for speeding up Tomcat/Java/Webapps? There are a ton of sites online about Java performance tuning. But again, if your app already does its thing in less than 3 seconds and the mainframe takes 8, you're wasting your time and reducing the maintainability of your code (most likely) but tuning it further. Can anybody tell me if using jsp:useBean tags to pass an entire object to a JSP is a slow way of doing things? Am I quicker passing a list of strings using various request.setAttribute() methods? Or is this insignificant? Insignificant for the most part. I am really stuck because I don't know how to choose the best way of going forward. If I can't significantly improve the speed of the app. I should just abandon the project but that is not desirable as you can imagine! Are there alternatives to the mainframe call? Or ways to tune the code on the mainframe rather than your own? Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: two domains, one site
Hi, No, you only need the one host and then an alias/alias tag with the other domain. HTH, Andoni. PS: Ref is here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Host%20Name%20Aliases A. - Original Message - From: Didier McGillis [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 04, 2004 5:27 PM Subject: two domains, one site If I have two domains pointing to the same webapp (long story on why two domains). Do I need to have two Hosts defined inside the container Engine ... Host name=localhost ... or Host name=www.domain.com ... Host name=www.domain.us ... _ Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new MSN Search! Check it out! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Virtual host (JSP) in Apache+Tomcat+Mod_jk
Hello, I know that what I missed for years when trying to get this working was that Tomcat has to have virtual hosts set up also. What to do is remove Apache from the equation altogether and get www.virtual-host-1.com:8080 working on tomcat. This is done by copying the Host section in server.xml and changing the name of the host from localhost to www.virtual-host-1.com. Then you can make another copy for the next host etc. Hope this helps, Andoni. - Original Message - From: Batpurev [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Tuesday, November 02, 2004 5:47 AM Subject: FW: Virtual host (JSP) in Apache+Tomcat+Mod_jk Dear all, I am sure the list is always talking and discussing about Virtual host (JSP) in Apache+Tomcat+Mod_jk problems. Though I need some advices from experts or experienced people in this list. I have Apache 2.0.49 Tomcat - 4.1.30 Mod2_jk Need to do some JSP virtual hosts. I have read many guides, manuals from internet that I could find with no luck. I think that my configuration for httpd.conf, server.xml, workers2.properties and jk2.properties are all correct. But the problem is virtual hosts doesnot come up. When accessing www.virtual-host-1.com http://www.virtual-host-1.com/ instead Tomcat default page is shown. I tried many different configuration with no luck. What could be the reason for this? I tried changing appBase, docBase, path directives in the server.xml file. But when I open www.virtual-host-1.com/virtual-host-1/ then it shows the website I want to see when accessing www.virtual-host-1.com http://www.virtual-host-1.com/ which is in /Catalina_home/webapps/virtual-host-1/ directory. I tried appBase=//Catalina_home/webapps/virtual-host-1 etc., Please advice me ASAP, Thank you in advance, Purvee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: index.jsp doesn't change
Hello, You might try deleting the contents of the $CATALINA_HOME/work directory. This is where the compiled .jsp files are kept. Andoni. - Original Message - From: Ross Rankin [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Tuesday, November 02, 2004 1:00 AM Subject: index.jsp doesn't change This is on 4.1.30. I have updated the index.jsp page in the $CATALINA_HOME/webapps/root directory and I even deleted all instances of the original splash pages (i.e. *If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!) *And still that is the page that shows up when I go to the root of the server http://www.mydomain.com/ I'm guessing the old one is still there compiled... How do I force this to recompile, restarting the server doesn't help... Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upgrading for the sake of it?
Hello, My questions here are fairly broad and open to opinion, I have not the experience to be dealing with these scenarios though so if you could help me it would be much appreciated. I do not mean to be inflammatory so if it is please ignore. Recently there was a post asking why people are still using Tomcat 4 instead of upgrading to version 5. I have been using Tomcat 4.0.4/Apache 1.3.26 for years and only recently upgraded Tomcat to 4.1.24. Now I am in a position I have never had before. I have been given a Windows server to manage and free reign over what to put onto it. So is the best advice to go with what I know best (and can be sure my websites run under) and install old versions. Or to go with the very latest of everything. If so then is it a good idea to keep updating Tomcat and Apache (httpd) or should I get one thing working and stick with what works? The answer to a previous post of mine about Tomcat 4.1.31 told me that is was a 'maintenance release', if this is the case then should all 4.1.x administrators have updated to it? Thanks, Andoni. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upgrading for the sake of it?
Hi, Running the two in parallel is not something I had thought of. I could run TC4 and TC5 and just switch back if an issue arises in testing (or production) of TC5. Andoni. - Original Message - From: Ben Souther [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Friday, October 22, 2004 12:23 PM Subject: Re: Upgrading for the sake of it? If you're convinced that the conditions such as your code, your requirements, the status of the underlying system, and/or the security of all the pieces involved (and there are no guarantees that someone won't find a security hole in one of them this afternoon) are never going to change then going with what you know is probably the path of least resistance. There are lots of mainframes out there with apps written in the 70s and 80s that are chugging along just fine. If not, it's easier to make incremental changes with each stable release than to upgrade across several major releases. At a minimum, I would try installing the latest stable releases and test your apps on them. If your apps are spec compliant, you will probably find that there is very little to do, if anything, to get them running on the newer releases. Releases come fast in open source projects so you need to figure out what kind of an upgrade schedule best suits your business model. The acquisition of a new server sounds like a great opportunity to consider upgrading the whole stack, especially if it means having the opportunity to run the two in parallel for a while before going live with it. On Fri, 2004-10-22 at 06:49, Andoni wrote: Hello, My questions here are fairly broad and open to opinion, I have not the experience to be dealing with these scenarios though so if you could help me it would be much appreciated. I do not mean to be inflammatory so if it is please ignore. Recently there was a post asking why people are still using Tomcat 4 instead of upgrading to version 5. I have been using Tomcat 4.0.4/Apache 1.3.26 for years and only recently upgraded Tomcat to 4.1.24. Now I am in a position I have never had before. I have been given a Windows server to manage and free reign over what to put onto it. So is the best advice to go with what I know best (and can be sure my websites run under) and install old versions. Or to go with the very latest of everything. If so then is it a good idea to keep updating Tomcat and Apache (httpd) or should I get one thing working and stick with what works? The answer to a previous post of mine about Tomcat 4.1.31 told me that is was a 'maintenance release', if this is the case then should all 4.1.x administrators have updated to it? Thanks, Andoni. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Access to j_security_check directly
Hi, This is an age-old problem, if you ever find a complete answer let me know. As for 95% complete answers here goes: 1. Your biggest problem is bookmarks. You need to always load you login page inside a frame. A single HTML page with a single frame can work fine, that way they'll bookmark xxx.com/jsp/index.html instead of xxx.com/jsp/login.jsp. This will mean that they will still always call the secure page even if they have book-marked the login screen. 2. The second problem is the back button. You need to use a JSP for your login screen and use the session.isNew() method to check if the session is being started by your login screen. If not then you should redirect to your single-framed page. 3. You can also re-direct with a custom error page from the error you receive to the single framed page. 4. Search the history of this list and find more suggestions. This question has come up several times over the years and usually gets some responses. I am using j_security_check in all my production apps. and with a combination of measures in place it works fine. I do suggest that you work out *Exactly* what is going on before trying to proceed as false assumptions can have your head spinning :-) Hope that helps, Andoni OConchubhair. - Original Message - From: Ben [EMAIL PROTECTED] To: Tomcat [EMAIL PROTECTED] Sent: Wednesday, October 20, 2004 1:58 AM Subject: Access to j_security_check directly Hi How can I deal with users that access to j_security_check directly? I have used the error-code 400 and redirect the users to the index page but the system doesn't recognise the them as logged in users. Any help? Thanks. Cheers, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Class loading in tomcat 5.0
I'd hazard a guess that your answer is no. The way in which the JVM loads classes is documented here: http://java.sun.com/docs/books/vmspec/2nd-edition/html/ConstantPool.doc.html good luck reading this! How about writing 2 (one's a copy) classes CalledClass.java, CalledClass.java and CallingClass.java to find out? Andoni. - Original Message - From: QM [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, October 14, 2004 12:56 PM Subject: Re: Class loading in tomcat 5.0 On Thu, Oct 14, 2004 at 06:13:59AM +0200, Narayan, Satya wrote: : I have a doubt regarding class loading in tomcat 5.0 . Is it different from tomcat 4.0 ? Compare the classloader docs for the two versions and see. It's been a while since I've used Tomcat 4, but my guess is that if you stick with the standard locations (WEB-INF/lib, common/lib, etc.) then you should be fine. : Can I hav an order of class loading within a folder ? I'm not sure what this means. Are you trying to control which jar is loaded first in the classpath? What are you trying to do? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: administration webapp
Hi, Make the following the entire contents of your tomcat-users.xml file and all will be happy. ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=express/ role rolename=tomcat/ role rolename=role1/ user username=tomcat password=tomcat roles=tomcat/ user username=role1 password=tomcat roles=role1/ user username=both password=tomcat roles=tomcat,role1/ user username=express password=thames roles=manager,admin/ /tomcat-users Andoni. - Original Message - From: Michael Simpson [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 2:26 PM Subject: RE: administration webapp Hi Yoav. I actually tried that bit of code before - tried again just now and still does not work. Error generated is Invalid username or password. Anything else I can check? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 14 October 2004 13:50 To: Tomcat Users List Subject: RE: administration webapp Hi, This is the code from tomcat_users.xml : ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ user username=tomcat password=tomcat roles=tomcat/ user username=role1 password=tomcat roles=role1/ user username=both password=tomcat roles=tomcat,role1/ user username=express password=thames roles=manager,admin/ /tomcat-users So the express user has the admin and manager roles, but those roles are not defined. Add two lines to the file, role rolename=manager / role rolename=admin / Restart Tomcat, and try again. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The NMA: Opening Up Newspapers http://www.nmauk.co.uk Visit Express Newspapers and OK Magazine online picture archive at http://www.expresspictures.com/ ###EXN2004### _ Any views or opinions are solely those of the author and do not necessarily represent those of Express Newspapers _ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.If you are not the intended recipient of this message please do not read ,copy, use or disclose this communication and notify the sender immediately. It should be noted that any review, retransmission, dissemination or other use of, or taking action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. Email communications may be monitored ##EXN2000## - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DataSourceRealm vs. Administration Tool - A bug?
Hello, I have just installed Tomcat 4.1.24 and I have it nearly exactly the way I want it now. I am doing my testing on Windows 2000 and Tomcat 4.1.27. The only other thing I want to implement is the DataSourceRealm. Here I am having problems though as I have the Administration Tool set up and therefore had to have the JMX MBeans listeners in server.xml enabled. These would seem to conflict with the DataSourceRealm though as when I have both in place I get the error: java.lang.Exception: ManagedBean is not found with DataSourceRealm When I remove either one the other works fine so I know the conflict is here. Is this just something I have to live with? I read the release notes for 4.1.31 and they seem to suggest that this is not something that has been fixed in a later release. Has it? My thanks as ever, Andoni
Re: DataSourceRealm vs. Administration Tool - A bug?
Hello, I have fixed my problem by adding the necessary section to mbeans-descriptors.xml for the DataSourceRealm. I basically coppied the section for JDBC Realm and changed the values. Zipped it back into catalina.jar where I got it from. Surely if this is not fixed in Tocmat 4.1.31 it should be considered as a fix necessary for 4.1.32 (when does the 4.1.x line end?). For those who want to use this I have included the XML I used, remember this has *not* been tested other than to watch it boot and note that there were no errors and then run both the Admin Tool and use the DataSource. STOP! Just used the DataSource and cannot login, I have thrown a couple of hours at it and will have to revert to the old realm :-( Unfortunately upgrading to version 5.0.28 is not an option for me. Andoni. mbean name=DataSourceRealm className=org.apache.catalina.mbeans.ClassNameMBean description=Implementation of Realm that works with any JDBC supported database and JNDI domain=Catalina group=Realm type=org.apache.catalina.realm.DataSourceRealm attribute name=className description=Fully qualified class name of the managed object type=java.lang.String writeable=false/ attribute name=debug description=The debugging detail level for this component type=int/ attribute name=dataSourceName description=The JNDI Description of the connection to use. type=java.lang.String/ attribute name=roleNameCol description=The column in the user role table that names a role type=java.lang.String/ attribute name=userCredCol description=The column in the user table that holds the user's credentials type=java.lang.String/ attribute name=userNameCol description=The column in the user table that holds the user's username type=java.lang.String/ attribute name=userRoleTable description=The table that holds the relation between user's and roles type=java.lang.String/ attribute name=userTable description=The table that holds user data type=java.lang.String/ /mbean - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 1:52 PM Subject: RE: DataSourceRealm vs. Administration Tool - A bug? Hi, If you get few responses to this question, I suggest trying 5.0.28 to see if the problem is still around in that version. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 8:30 AM To: Tomcat Users List Subject: DataSourceRealm vs. Administration Tool - A bug? Hello, I have just installed Tomcat 4.1.24 and I have it nearly exactly the way I want it now. I am doing my testing on Windows 2000 and Tomcat 4.1.27. The only other thing I want to implement is the DataSourceRealm. Here I am having problems though as I have the Administration Tool set up and therefore had to have the JMX MBeans listeners in server.xml enabled. These would seem to conflict with the DataSourceRealm though as when I have both in place I get the error: java.lang.Exception: ManagedBean is not found with DataSourceRealm When I remove either one the other works fine so I know the conflict is here. Is this just something I have to live with? I read the release notes for 4.1.31 and they seem to suggest that this is not something that has been fixed in a later release. Has it? My thanks as ever, Andoni This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Manager application in TC 4.1
Hello, I have just upgraded to Tomcat 4.1 and I have encountered the fact that the manager application is now at: www.mydomain.com:8080/manager/html/ What is the simples way to change this to be at www.mydomain.com:8080/manager ? I have changed the mappings but that breaks the mappings in the manager app. I know the comment in the manager's web.xml file says just to change the class but is that right? I think that's just a legacy comment. Thanks, Andoni
Re: Manager application in TC 4.1
Ok, now I have rebooted the server I know it doesn't work! I did exactly what it said to do in the comment and this did not work. The same thing (replacing the class name) *did* work in 4.0.4, which was my last version, which is why I tried it in the 1st place :-) Anyway any suggestion as to whether it is possible to change the URL for the manager application in Tomcat 4.1.24 are welcome. Thanks in advance. Andoni. - Original Message - From: Andoni [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Tuesday, October 12, 2004 9:58 PM Subject: Manager application in TC 4.1 Hello, I have just upgraded to Tomcat 4.1 and I have encountered the fact that the manager application is now at: www.mydomain.com:8080/manager/html/ What is the simples way to change this to be at www.mydomain.com:8080/manager ? I have changed the mappings but that breaks the mappings in the manager app. I know the comment in the manager's web.xml file says just to change the class but is that right? I think that's just a legacy comment. Thanks, Andoni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: euro sign tomcat 4 - 5
If the same web-app worked perfectly in Tomcat 4 and now doesn't that would suggest the problem is with Tomcat, but if you never made the change to UTF-8 in Tomcat4 then that would suggest the problem is with your webapp!! Anyway, to change Tomcat to use UTF-8 you have to tell this to the JVM as it starts. the best way to do this is by editing catalina.bat (window) and setting CATALINA_OPTS = -Dfile.encoding=UTF-8 CATALINA_OPTS is then inserted by the script into the call to the JVM. Hope that helps. Andoni. PS: I have never used Tomcat 5 but I would be surprised if this kind of thing has changed much. A. - Original Message - From: Michiel Toneman [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, October 11, 2004 2:07 PM Subject: Re: euro sign tomcat 4 - 5 IIRC you need 8859-15 for the EURO symbol if you are using the 8859 family of encodings. Better would be to use UTF-8. I'm guessing you were using UTF-8 before? Regards, Michiel Dale, Matt wrote: Sounds like your character set is set to 8859-1 instead of 8859-2. I'm not sure how or where to change this though. -Original Message- From: Xavier Frisaye [mailto:[EMAIL PROTECTED] Sent: 11 October 2004 13:50 To: Tomcat Users List Subject: euro sign tomcat 4 - 5 Hi all, I've ugraded from Tomcat 4.1.24 to 5.0.28 and i'm encountering problem with euro sign when i try to write it from a servlet : it appears as ? instead of , certainly charset problem. Is there any change made to tomcat 5 wich could explain this problem? (It works perfectly with Tomcat 4.1.24) Regards Xavier Frisaye Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michiel Toneman Software Engineer Bibit Global Payment Services Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AutoReply: ***
Can the owner of the list maybe write to [EMAIL PROTECTED] and ask them to fix this problem? Andoni. - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, October 11, 2004 2:48 PM Subject: AutoReply: Re: tomcat oracle jdbc pooling Hello Tomcat Users List [EMAIL PROTECTED], This refers to your mail with subject as Re: tomcat oracle jdbc pooling. Thank you for sending your CV and registering with A.S. Consultancy Services. Our team will review your CV and match it against current requirements. If your profile matches with any ongoing opening, we will contact you by telephone / email. We recommend that you update your profile and send us an updated CV whenever your contact details or your career path changes, so that your record is up-to-date with us. Please be assured that your CV will remain confidential with us and we will submit your profile to our clients only after due consultation with you. In case you require any further information please do contact us. with warm regards, Staffing Team A.S. Consultancy Services #1205, 2nd Main, 2nd Cross, Vijayanagar, Bangalore - 560040, India Tele - 91 80 2310 9012, Telefax - 91 80 2330 5364, Email - [EMAIL PROTECTED] URL: www.asconsultancy.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forum instead of mailist!!
I don't see why we just can't use NNTP and have a proper newsgroup. Andoni. - Original Message - From: Bernhard Slominski [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, October 11, 2004 4:13 PM Subject: Forum instead of mailist!! These autoreply is really annoying, but it can easily happen if you forget to unsubscribe, before leaving on holiday That's why I vote for a forum instead of a mailist! Does anyone agree? Cheers Bernhard -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Montag, 11. Oktober 2004 16:59 An: Tomcat Users List Betreff: AutoReply: Tomcat 4 as an NT Service Hello Tomcat Users List [EMAIL PROTECTED], This refers to your mail with subject as Tomcat 4 as an NT Service. Thank you for sending your CV and registering with A.S. Consultancy Services. Our team will review your CV and match it against current requirements. If your profile matches with any ongoing opening, we will contact you by telephone / email. We recommend that you update your profile and send us an updated CV whenever your contact details or your career path changes, so that your record is up-to-date with us. Please be assured that your CV will remain confidential with us and we will submit your profile to our clients only after due consultation with you. In case you require any further information please do contact us. with warm regards, Staffing Team A.S. Consultancy Services #1205, 2nd Main, 2nd Cross, Vijayanagar, Bangalore - 560040, India Tele - 91 80 2310 9012, Telefax - 91 80 2330 5364, Email - [EMAIL PROTECTED] URL: www.asconsultancy.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forum instead of mailist!!
That's excellent. If I unsubscribe can I still read these? Can I reply? Andoni. - Original Message - From: QM [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, October 11, 2004 5:20 PM Subject: Re: Forum instead of mailist!! On Mon, Oct 11, 2004 at 05:13:46PM +0200, Bernhard Slominski wrote: : That's why I vote for a forum instead of a mailist! Forum-like: http://news.gmane.org/gmane.comp.jakarta.tomcat.user NNTP: nntp://news.gmane.org/gmane.comp.jakarta.tomcat.user : Does anyone agree? Not I ;) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fw: Realm for Admin tool?
Hello, I have just changed over from Tocmat 4.0.4 to Tomcat 4.1.24 and now I want to get the Admin tool working. The error message I am getting is No Realm has been configured to authenticate against but there is no Realm in my Windows version of Admin tool either and it seems to work fine! The manager tool does not work either. I had them working at one stage but then while configuring Apache and copying things from the old server I broke it somehow. Can somebody please give me a hint as to what change that I made may have broken this? Thanks, Andoni.
Re: Howto deploy a new version of my webapp without disturbing the customer?
This is very interesting. Do you think it would copy over the sessions correctly? Surely the think that WO is doing is maintaining all sessions on the old machine until they are shut down. My way of doing this is simply to get up at 3:30am and make the changes then! I am lucky in that 90% of my users are 9-5 office workers. Andoni. - Original Message - From: Ralph Einfeldt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 01, 2004 12:09 PM Subject: RE: Howto deploy a new version of my webapp without disturbing the customer? Just a guess: - Use Apache + mod_jk(2) + 2 tomcat instances - Use sticky sessions (look at the jvmRoute of the engine tag) - Use the load factor to distribute 100% of the requests to the first instance. - Update the second instance. - Change the load factor to distribute 100% of the requests to the second instance. - Wait after all session moved to the second instance update the first instance and reverse the I haven't tried any of this but as far as I can remember I have seen posts in this list that indicate that this should be possible. -Original Message- From: Christian Mittendorf [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 12:15 PM To: [EMAIL PROTECTED] Subject: Howto deploy a new version of my webapp without disturbing the customer? Hello! My scenario is an order application, where my customers can order products. But the software or the design of the pages are changing rapidly. The question is now: how can I deploy a new version without the customer noticing anything? I'm searching for something similar to what WebObjects is offering. WO allows me to start a new instance (using the new version) of my application in parallel to the already running application. All new connections are then redirected to this new application. The existing sessions in the old application can continue their order process. When the number of open sessions in this old instance reaches zero, the instance is shut down. The customer out in the web does not see that a new version has been deployed. Is something simlilar possible using Tomcat? Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: context path for a war file
Yes, unless I'm mistaken, the inclusion of context elements in the .war file is a Tomcat 5+ feature. There is no way to upload .war files before this if you are going to serve from the .war file. Andoni. - Original Message - From: J S [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:21 AM Subject: RE: context path for a war file That's what I thought, but it still only deplot the app to /bar. I'm using tomcat 4.1.24 so not sure if that version is too old? Hi, Include in your WAR file a META-INF/context.xml file with a Context element like Context path=/foo/bar docBase=bar.war / Yoav Shapira Millennium Research Informatics Hi tomcat-users, I'm trying to upload a war file (called bar.war) through the tomcat manager. I want the context path to be /foo/bar. However tomcat initialises it to /bar. How do I get round this? Thanks, JS. _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FilePermission's in catalina.policy.
Hello, I am trying to run Tomcat with a very strict security cordon around it. So I am using catalina.policy to shut down everything except exactly what I need. I am having one problem with a small bit of this at the moment, I am trying to find get the following to allow files be read from my library by my web app. When I specify the directories in windows dependant style there is no problem but when I specify them using the property there is a problem. The property is set correctly as it is used to specify the code to do the reading. Any suggestions? Thanks in advance, Andoni. grant codeBase file:${catalina.home}${/}- { // permission java.security.AllPermission; permission java.util.PropertyPermission *, read,write; // The next two lines are what works for the library. // java.io.FilePermission cannot use ${catalina.home} or other properties. // permission java.io.FilePermission c:${/}tomcat41${/}webapps${/}extras${/}library${/},read; // Read listing. // permission java.io.FilePermission c:${/}tomcat41${/}webapps${/}extras${/}library${/}*,read; // Read files. // These next two don't work: permission java.io.FilePermission file:{catalina.home}${/}webapps${/}extras${/}library${/},read; // Read listing. permission java.io.FilePermission file:{catalina.home}${/}webapps${/}extras${/}library${/}*,read; // Read files. }; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FilePermission's in catalina.policy.
Problem solved. The file: is only used when defining a codeBase as it can be a URL or a file. i.e. this also works: permission java.io.FilePermission ${catalina.home}${/}webapps${/}extras${/}library${/},read; // Read listing. Andoni. - Original Message - From: Andoni List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 2:06 PM Subject: FilePermission's in catalina.policy. Hello, I am trying to run Tomcat with a very strict security cordon around it. So I am using catalina.policy to shut down everything except exactly what I need. I am having one problem with a small bit of this at the moment, I am trying to find get the following to allow files be read from my library by my web app. When I specify the directories in windows dependant style there is no problem but when I specify them using the property there is a problem. The property is set correctly as it is used to specify the code to do the reading. Any suggestions? Thanks in advance, Andoni. grant codeBase file:${catalina.home}${/}- { // permission java.security.AllPermission; permission java.util.PropertyPermission *, read,write; // The next two lines are what works for the library. // java.io.FilePermission cannot use ${catalina.home} or other properties. // permission java.io.FilePermission c:${/}tomcat41${/}webapps${/}extras${/}library${/},read; // Read listing. // permission java.io.FilePermission c:${/}tomcat41${/}webapps${/}extras${/}library${/}*,read; // Read files. // These next two don't work: permission java.io.FilePermission file:{catalina.home}${/}webapps${/}extras${/}library${/},read; // Read listing. permission java.io.FilePermission file:{catalina.home}${/}webapps${/}extras${/}library${/}*,read; // Read files. }; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Detecting The Stop Button
This is certainly not an easy thing to do, you could try to use JavaScript to continuously generate requests to the server every 5 seconds until the results are ready and then they are returned instead of the waiting screen. Then you would have to tell the servlet to expect requests every 5 (maybe a little more to allow for synchronization issues) seconds and when it doesn't get one to act on this fact by shutting down the process. When you see the airline sites where they are validating Visa card numbers in real time and they simply put up a page which says Please allow up to 60seconds for this process to complete. Do not hit back, stop or refresh until this process completes you can tell that any kind of detection is tricky because if it wasn't they'd implement it. What we have done on our company's site where we poll servers around the world for delay times we return an intermediary page which in turn calls the results page. This intermediary page has the Please wait... message on it. One useful tip I can give you is that when we tried to put an animated GIF on this page to keep the customer focused, it failed because the page did an immediate request and the GIF stopped as soon as the request went out. What does work though is a small flash animation which keeps running even though another page has been requested. Anyway that's my 2c worth, hope you can take something from it. Later, Andoni. - Original Message - From: Les Parkin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 13, 2004 10:51 AM Subject: Detecting The Stop Button Hi, I am working on an application that allows users to run database queries from a web browser (we are currently using Tomcat 5.0.25). A problem arises when a user starts a new query and then decides that they want to cancel it by hitting the browser stop button. After a lot of reading on this already, I appreciate that it is not possible for Tomcat to be notified that this has occurred, since no event is generated by the browser that Tomcat can detect. The solution I attempted was to start a background pinger thread in Tomcat which periodically writes back to the browser as the query is running. The theory was that if the user hits the stop button then I would get an IOException since the socket connection has been broken. In practice this does not happen, the pinger thread continues to write output without any exception or error occurring, and it is as if this output is being lost in a black hole somewhere! (the browser does not receive any more output after the stop button has been pressed, as expected). Has anybody got any suggestions as to how I can get this to work, or a more general approach to solving the stop button problem? Many Thanks! Les. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Realm-- pasword encryption servlet location in a webApp
Encryption: There is only one way to encrypt passwords if you are not using SSL. That is to use Paj's JavaScript module available here: http://pajhome.org.uk/crypt/md5/ Although the Tomcat Realm does have an MD5 flag which you can set to encrypt the passwords being sent to it this is too late as the passwords have already been sent in the clear over the internet to your server. The only use for this is when you are accessing a server on which the passwords are stored in MD5 encrypted format and you don't care about the network. You may also be told that you can use a Digest login instead of a Form login or Basic Login but again you have a problem: Digest logins are only available in IE so if you know all your users are definitely only using IE then go ahead, it will be doing the same job as the JavaScript i.e. encrypting before sending down the wire. In order to encrypt the passwords in the first place you can use Java1.4's java.security.* package or you can use Catalina's org.apache.catalina.realm.RealmBase which can be used at the command line thus: C:\java org.apache.catalina.realm.RealmBase -a MD5 mypassword or you can use the JavaScript. If you have the passwords in an Oracle Database you can also use the Oracle Function DBMS_OBFUSCATION_TOOLKIT.MD5() by writing an oracle Function something like this: CREATE OR REPLACE FUNCTION get_md5 (plaintext IN VARCHAR2) RETURN VARCHAR2 IS test VARCHAR2(16); BEGIN test:=DBMS_OBFUSCATION_TOOLKIT.MD5(INPUT_STRING=plaintext); RETURN test; END get_md5; / Note: using a function like this you can create a view of the passwords table in your database which would mean that though your passwords appear hashed to Tomcat, they are actually still visible to you! The servlet invoker /servlet/* If you are adding the servlets to your web.xml file then you do not need to use the servlet invoker anywhere and hence do not need to call it using /servlet/. Whether or not you add the servlets to the same package is a programming decision which has to do with what the servlets do and whether they do the same thing as the other classes in that package. This has no bearing on the administrative decisions of how to keep the server secure. Hope that all helps. Andoni. - Original Message - From: Ben Bookey [EMAIL PROTECTED] To: Tomcat User List [EMAIL PROTECTED] Sent: Thursday, August 05, 2004 9:02 AM Subject: Tomcat Realm-- pasword encryption servlet location in a webApp Dear list, 2 questions 1) I think I remember reading somewhere that there was a .bat batch file which we could run on production machines, so that passwords are encrypted. Can anyone enlighten ? 2) Whats the best configuration mechanism for my servlets? I think its better to add the the servlets to my com.mycompany.myapp package (or?), BUT, is it a security flaw when I set in my app, the url-pattern begininning with /servlet/* (see below example). I again have read that the servlet url-pattern should not begin with /servlet servlet-mapping servlet-nameservletName/servlet-name url-pattern/servlet/servletName/url-pattern /servlet-mapping regards. Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Convert Text to Image [OT]
Hello, Does anyone know of a tool for Converting Text to images so that I can still have image buttons on my site while having it localised? Thanks, Andoni. PS: I have taken a look at AcmeGif I am looking to see if there is something better though. Or tutorial help on AcmeGif. Acme GIF is at: http://www.acme.com/java/software/Acme.JPM.Encoders.GifEncoder.html Ta. A.
Re: virtual hosts
Hello, Try this: Back up server.xml, Delete all sections that are commented out, change all tags to be on a single line. Indent the file properly. Remove the examples context. Then comment the file by looking through the Docs. IMPORTANT: You need to have each host serving from a different directory on your system. I would recommend having tomcat_home/webapps/domain1/path_or_war tomcat_home/webapps/domain2/path_or_war Etc. Do not leave any apps/paths/wars at a higher level than any others. Regards, Andoni. - Original Message - From: 29djeo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 14, 2003 11:14 PM Subject: virtual hosts I followed the directions for setting up tomcat for virutal hosts: I added the following to server.xml lt;Host name=quot;domain1.comquot; debug=quot;0quot; appBase=quot;webappsquot; unpackWARs=quot;truequot;gt; lt;Aliasgt;www.domain1.comlt;/Aliasgt; lt;Logger className=quot;org.apache.catalina.logger.FileLoggerquot; directory=quot;logsquot; prefix=quot;domain1.quot; suffix=quot;.logquot; timestamp=quot;truequot;/gt; lt;Context path=quot;quot; docBase=quot;domain1 debug=quot;0quot; reloadable=quot;truequot;/gt; lt;Context path=quot;/testquot; docBase=quot;domain1quot; debug=quot;0quot; reloadable=quot;truequot;/gt; lt;/Hostgt; I also removed the default Host name reference to quot;localhostquot;. When I go to http://www.domain1.com I see a blank page and not the deployed application domain1. There are also numerous references to quot;localhostquot; in server.xml do these need to be modified to support multiple domains? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getting j_username from form
try String loginfo = (String)req.getRemoteUser(); Andoni. - Original Message - From: Ostad, James [EMAIL PROTECTED] To: Tom (E-mail) [EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 3:01 PM Subject: getting j_username from form I am trying to get the j_username from the form after authentication. But I am getting null each time. here is what I am using to get it: String loginfo = session.getAttribute(j_username); and the value of the loginfo is null. any help would be nice. James Ostad Application Developer/Analyst TMS Department Ex. 4457 E-mail: [EMAIL PROTECTED] Out--- (3) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to prevent direct access to login.jsp
I had this excact problem some time ago. You might search the archive for the subject line I used: j_security_check - Bookmarking the login page. A teaser! The problem was solved for me then. Andoni. - Original Message - From: Chaikin, Yaakov Y (US SSA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:59 PM Subject: How to prevent direct access to login.jsp Hi, I realized that my user can mess himself by bookmarking the login page he is asked to log in. The login.jsp appears in the URL address in the browser... Does anyone know how to avoid this? How do I block that URL for the user and not for the server? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NotSerializableException - DBCP
Hello, I have not been using the shutdown command when restarting Tomcat in Windows but now that I have I get exception traces for all my Session beans on shutting down and then again for each of two connection objects when starting up. Is this simply that the DBCP package's PoolableConnection Class does not implement Serializable? If so how can I get it to implement this. Is there any way to use a destroy method to remove the connection pool from the equation before persisting? Maybe using a SessionListener? All my session beans implement Serializable. StandardHost[www.myhostname.com]: Removing web application at context path StandardManager[]: Cannot serialize session attribute userSession for session 44B5000FB88CCCEDE215D47D3DAAFF9A java.io.NotSerializableException: org.apache.commons.dbcp.PoolableConnection at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143) ... etc. Thanks in advance, Andoni. Tomcat 4.0.4
NotSerializableException: StandardSessionFacade
I managed to get around the other problem with DBCP by removing the implements Serializable from the connection pooling bean. Now I am left with a problem I can't solve though as I cannot affect the: org.apache.catalina.session.StandardSessionFacade Each of my beans have an init() method that takes ServletContext and HttpSession as parameters so that they can call other beans at these levels. Are these the Sessions that I am being asked to serialize or remove? If so how can I do this? StandardHost[www.myhost.com]: Removing web application at context path StandardManager[]: Cannot serialize session attribute userSession for session A8D7FCFB58E0D018D6C1E07E64368A88 java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361) Thanks as ever. Andoni.
Re: NotSerializableException: StandardSessionFacade
Hello, I have now reworked my code so that instead of having an init() method in the jsp:useBean /jsp:useBean tag which is taking the session and the application implicit variables as parameters... Now I have code to fill objects with the contents of session and passing these as objects to the Beans which are in Session and application scope. Unfortunately the error message is still there. ;-( Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 2:01 PM Subject: RE: NotSerializableException: StandardSessionFacade Howdy, Don't put a Session as a session attribute. Yoav Shapira Millennium ChemInformatics -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:20 AM To: Tomcat Users List Subject: NotSerializableException: StandardSessionFacade I managed to get around the other problem with DBCP by removing the implements Serializable from the connection pooling bean. Now I am left with a problem I can't solve though as I cannot affect the: org.apache.catalina.session.StandardSessionFacade Each of my beans have an init() method that takes ServletContext and HttpSession as parameters so that they can call other beans at these levels. Are these the Sessions that I am being asked to serialize or remove? If so how can I do this? StandardHost[www.myhost.com]: Removing web application at context path StandardManager[]: Cannot serialize session attribute userSession for session A8D7FCFB58E0D018D6C1E07E64368A88 java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361) Thanks as ever. Andoni. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4 threads
Hello, You should not have to worry about when tomcat creates or pools threads. It will do this in the background in whatever way it does and you should not have to know about it. There are rules for keeping servlets thread-safe so that you will not be affected by the threading of servlets by the container. You can read about how to keep your servlets thread-safe in the servlet specification which you can download from here: http://java.sun.com/products/servlet/download.html Andoni. - Original Message - From: Walter do Valle [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:18 PM Subject: Tomcat 4 threads I have some doubts about Tomcat and his threads. If someone could help me, i will be very grateful. In what moment new threads are created in Tomcat when it's running? Is there a thread pool? In case positive: - What is the initial quantity of threads created? - What is the stagger algorithm? - After created, when a thread terminates (end of life, release)? - What means o large number of threads? Many users? Many sessions? Many requests? Thanks for any help - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please Help
Have you tried removing the connector line from server.xml? then tried going direct to Tomcat on the port 8080 or whatever it is set to in the Tomcat Connector on your machine (in server.xml) This is a JK problem so try to remove it from the Equation and make sure the rest works. what did you change or what changed before this started happening? Andoni. - Original Message - From: Yuval Zantkeren [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 01, 2003 5:07 PM Subject: Please Help why I'm getting this error : 01/12/2003 18:23:27 org.apache.jk.server.JkCoyoteHandler action INFO: RESET Which also causing my tomcat not to serve any more. Regards, Yuval Zantkeren Domain The Net Technologies Ltd. 81 Sokolov St. Ramat-Hasharon Israel 47238 Tel: 972-3-7600500 Fax: 972-3-7600505 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Editors
Hi, I don't use it because I am too used to my own editor (EditPlus) but one of my colleagues uses Macromedia Dreamweaver and it is really fabulous. I can't even begin to list all of it's amazing features. If you are looking to get the right editor this is what to go with. Andoni. - Original Message - From: Duncan [EMAIL PROTECTED] To: Tomcat User List [EMAIL PROTECTED] Sent: Friday, November 28, 2003 9:54 AM Subject: JSP Editors Sorry if off topic but... What do people use to edit JSPs? I'm after an editor, free if possible, to run on windows, with syntax colouring and possibly auto complete for java. Have tried vim for windows, but it doesn't seem as nice on windows as it is on linux. Any other suggestions? Cheers Duncan Smith Decker Telecom Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to add a context to server.xml?
You don't need to do it at all. Tomcat will create a default context in memory if it finds your war file in the right place. If you do want to specify things about the context you will need to add a section to server.xml. If you want to do this I recommend you first remove all the comments and extra rubbish you are not using in server.xml and then format the XML properly and then you will see that it is actually quite easy to understand. You may have to do some reading though! Andoni. If you are using Tomcat 4.1 then you need this: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html If you are using Tomcat 5.0 you will need this: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/index.html A. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 28, 2003 9:17 AM Subject: how to add a context to server.xml? hello, i installed a .war-file with manager. i noticed, that in server.xml there was no entry for the corresponding context afterwards. i wanted to do it with the tomcat-admin-page, i got the message, that my alterations were saved. but then again: no context in server.xml. must i do it by hand? (for a beginner not so fine!). greetings hans horwath, austria - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication with JAAS / Form Autenthication/ j_security_check
You don't have to instruct the user to do this. Just have login form as a hidden form and fill (and submit) it using JavaScript. You can get the values from a login form you call whatever you like and then append whatever you like to the end of each of the username and password. This does sound rather odd though and you should really be looking at the bigger picture of your architecture to see why you have this problem in the first place as it sounds like you are trying to hack a solution to me!! Sorry if your not! Andoni. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 27, 2003 10:08 PM Subject: Re: Authentication with JAAS / Form Autenthication/ j_security_check On 11/27/2003 06:41 PM Jose Antonio Chirinos wrote: Hi, i have a web application that use web authentication through j_security_check servlet; i need to add an extra parameter diferent of j_password and j_username; i guess that i have to put the extra parameter in the login form and in the definition of the realm; but where i have to include the code for the comparation of the new parameter.Thanks in Advanced.Jose Antonio Chirinos. Jose, tomcat (and all servlet spec compliant app servers) won't process any further parameters other than the two you mention. When you code your realm, you code a LoginModule or equivalent which is passed these 2 parameters. This means the only option you have is to instruct the user to place the extra parameter on the end of the username, perhaps after an appropriate seperator character, so that you can then split your extra parameter from the user name in your realm code. HTH Adam -- struts 1.1 + tomcat 5.0.14 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to compile class for JSPerror:
Hello, I realise that there are lots of entries about this error message in the log files but my experience is different to theirs. I have a perfectly functioning Tomcat 4.0.4 system working with Apache 1.3.26 I get a stack trace only every now and again from a user trying to access a page. It isn't always the same page and it doesn't always happen when one of these pages is accessed. From archives: 1. I have my JAVA_HOME set correctly. 2. I have a full JDK 1.3.1_08 installed. Here's the error I get: org.apache.jasper.JasperException: Unable to compile class for JSPerror: Can't read: TOMCAT_HOME/work/WORK_PATH/jsp/MY_FILE$jsp.java 1 error When it does this it seems to over-write the already existent .java file in the work directory with another as though it had not written one in the first place. Anybody any ideas? Andoni.
How to stop the URL comming up?
Hello, I am looking for a way to stop my users bookmarking pages in the site. There is a login screen and they shouldn't even really be let bookmark this. I was given someone's card today an then I went to his site: http://www.xeotrope.net and when I find that as I look around the site the url in the URL bar of my browser stays at http://www.xeotrope.net and never includes the page name. This means that all bookmarks only bring up the main page. Is there any way to do this with apache / Tocmat? Thanks. Andoni.
Re: How to stop the URL comming up?
Sorry address of example is http://www.xoetrope.net They are using a single frame for their front page. Very handy. Thanks, Andoni. - Original Message - From: Simone Chiaretta [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, November 27, 2003 11:37 AM Subject: R: How to stop the URL comming up? The url you gave us is not working. Anyway, you can make an inclusion at the top of each page to redirect to user to the start page (or, if u'r cool enough you can make a filter :-)) But if you want to see just the main url you have to trick around with HTML frames The main page is a frameset That includes a 0px height frame and the main frame that will contain all the website. Simone - Simone Chiaretta www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic -Messaggio originale- Da: Andoni [mailto:[EMAIL PROTECTED] Inviato: giovedì 27 novembre 2003 12.39 A: Tomcat Users List Oggetto: How to stop the URL comming up? Hello, I am looking for a way to stop my users bookmarking pages in the site. There is a login screen and they shouldn't even really be let bookmark this. I was given someone's card today an then I went to his site: http://www.xeotrope.net and when I find that as I look around the site the url in the URL bar of my browser stays at http://www.xeotrope.net and never includes the page name. This means that all bookmarks only bring up the main page. Is there any way to do this with apache / Tocmat? Thanks. Andoni. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: download file issue
Please give a little more detail about what actually goes wrong. Also have you looked at the log files? If there is something there that you can't interpret then post a few of the relevant lines to the list (but not the whole log file, obviously ;-) ). Andoni. - Original Message - From: Ostad, James [EMAIL PROTECTED] To: Tom (E-mail) [EMAIL PROTECTED] Sent: Monday, November 24, 2003 4:24 PM Subject: download file issue I have created a web site that allows users to download files. It is working at the server level, but not out site of the server, at user level. Server is win2k adv. server. Tomcat is 4.1.29 Any suggestion would appreciated. James Out--- (1) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: download file issue
Sorry, wasn't looking at list in date order!! A. - Original Message - From: Andoni [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 10:33 AM Subject: Re: download file issue Please give a little more detail about what actually goes wrong. Also have you looked at the log files? If there is something there that you can't interpret then post a few of the relevant lines to the list (but not the whole log file, obviously ;-) ). Andoni. - Original Message - From: Ostad, James [EMAIL PROTECTED] To: Tom (E-mail) [EMAIL PROTECTED] Sent: Monday, November 24, 2003 4:24 PM Subject: download file issue I have created a web site that allows users to download files. It is working at the server level, but not out site of the server, at user level. Server is win2k adv. server. Tomcat is 4.1.29 Any suggestion would appreciated. James Out--- (1) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page bug ?
.jsp files have never worked for me when they are at the root of a web-app. I still see them being used this way in books all the time though to don't take my word as gospel. Do you have any .jsp files running in this way? Andoni. - Original Message - From: Laurent Michenaud [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 20, 2003 3:25 PM Subject: error-page bug ? When my error page is at the root of the webapp, tomcat can't find it. In web.xml of the webapp : This works : error-page error-code404/error-code location/error/notfound.jsp/location /error-page This works error-page error-code404/error-code location//location /error-page This DOESNOT works : error-page error-code404/error-code location/notfound.jsp/location /error-page Tomcat is 4.1.29 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
j_security_check - Bookmarking the login page. A teaser!
Hello, I have recently switched my site to using form-based logins. I found as soon as I started testing that there is a fundamental problem with this approach. When the user get sent via a click to a protected page they get the login screen. The only problem arises when a user bookmarks the login screen. If they bookmark the login screen then use this bookmark to bring it up, when they enter their details Tomcat doesn't know where to bring them next and hence gives them an error message. I can use Apache rewriting or aliasing if you think either of these will help solve the problem. Any suggestions? Surely this problem has been encountered by everyone who has ever implemented form-based login, or do they just not? Thanks, Andoni
Re: j_security_check - Bookmarking the login page. A teaser!
Actually one of my first attempts at a solution was this in reverse. I was saying if there is a session take them on in to the main menu page. This does not work either though as if there was no session and they had only called this page (say from a bookmark) they were still stuck. The reason your way does not work is given by another response. Andoni. - Original Message - From: Graham Reeds [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 12:08 PM Subject: Re: j_security_check - Bookmarking the login page. A teaser! Just a noob firing off into the dark... Couldn't you have a small piece of code that checks for the session and if they are bringing up the login page directly (ie no session info) then take them to the index. I'm going to get this on my site too so I will interested in a solution. G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: j_security_check - Bookmarking the login page. A teaser!
Hi, I have implemented this and on first sight it seems to work perfectly. Can you please just confirm my understanding of it though so I am sure I know what I am doing: 1. The error page part need never really come in to play. 2. A user calls the login page and it basically is using the session's isNew method to decide whether this is a session just newly created from a bookmark or a session that was in existence before the login page was displayed as would be the case with one that had been created in whichever page had called index.jsp. Thanks, Andoni. - Original Message - From: Jon Wingfield [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 2:54 PM Subject: Re: j_security_check - Bookmarking the login page. A teaser! The bookmarking of the login page is a well known issue. However, without dumping CMS there seems to be little to do but resort to a few hacks ;( Our hack pt1: Add to the top of the login page a redirect to a sensible entry point for the app: % if (request.getSession(false).isNew()) response.sendRedirect(/index.jsp); % Our hack pt2: Add an error page that catches the 'illegal direct reference to login page' (or whatever it is). Use this error page to redirect to a sensible entry point to the app. eg: % Object badUri = request.getAttribute(javax.servlet.error.request_uri); Object errorCode = request.getAttribute(javax.servlet.error.status_code); if (/j_security_check.equalsIgnoreCase(badUri.toString()) 400.equals(errorCode.toString())) { response.sendRedirect(/index.jsp); return; } % Pt 2 also catches things like a user sitting on the login page until the session times out. HTH, Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Still character problems
You need to go with UTF-8 See the Tomcat FAQ. My application runs in 17 different languages with no problems using what I find there. Andoni. - Original Message - From: Burak Takmaz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 10:56 AM Subject: Still character problems I'am calling a method from my jsp pages.The method is placed in a bean class.Its return type is String.And it includes the characters such as ü,þ,ç,ö(some Turkish caracteres).But these characteres seem to be corrupted on the jsp pages.I put the page and meta tags who are denoting that the page's encoding is ISO-8859-9.Also i saved my bean class under ISO-8859-9 encoding.I started Tomcat with CATALINA_OPTS=-Dfile.encoding=ISO-8859-9.Did it work?Of course,it didn't.What can i do more? Burak Takmaz Web programmer - Bilgitaþ/Ýstanbul _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Character problem
Have a look at this entry in the tomcat FAQ and then come back with further questions: http://jakarta.apache.org/tomcat/faq/printer/misc.html#utf8 Andoni. - Original Message - From: Burak Takmaz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 9:54 AM Subject: Character problem On my jsp pages,i am calling a method from my class.Its return type is String.But in the browser the Turkish caracteres like þ,ð,ç seem to be corrupted.I put page directive on the of my jsp pages.Is that Tomcat who is changing my encoding?Where can i set the default encoding of Tomcat?Thanks for your helps. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reloadable
Hi, Would it be fair to say that especially with older versions of tomcat this cannot always be guaranteed to work correctly? I would recommend that if you are having any doubts that you delete the files from your work directory when you redeploy. Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:43 PM Subject: RE: reloadable Howdy, Tomcat will recompile the JSP. Reloadable affects only runtime performance. Yoav Shapira Millennium ChemInformatics -Original Message- From: Laurent Michenaud [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 10:42 AM To: [EMAIL PROTECTED] Subject: reloadable Hi, I've got a web application with reloadable=false. I start tomcat. I call a jsp file ( ex: toto.jsp ). The JSP is compiled in the work directory. I stop tomcat I update the jsp toto.jsp. I start tomcat. What does Tomcat ? Does it recompile the new jsp or does it use the old file in the work directory ? Thanks This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Automatically instantiate Servlet
Check out the load-on-startup tag in we.xml. The documentation can explain it much better than I. servlet servlet-namemyServ/servlet-name servlet-classcom.myaddress.myapp.HelloServlet/servlet-class load-on-startup1/load-on-startup /servlet Andoni. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:59 PM Subject: Automatically instantiate Servlet Hi, usually Tomcat Servlets are instanciated after a webapplication is accessing its url first time. Is there a method of automatically do this? Can I tell Tomcat to instanciate a servlet directly after startup using a config file (web.xml, server.xml)? If the answer is yes, can anybody provide an example? Cheers, Ralf -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Automatically instantiate Servlet
The one is the order in which you want numbered servlets to start up. Non-numbered servlets don't start until called. Andoni. - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 4:22 PM Subject: Re: Automatically instantiate Servlet Hi, thank you very much. It works. What do the 1 mean? Is it just a binary value 0 = off 1 = on ?? Cheers, Ralf Ralf, Can I tell Tomcat to instanciate a servlet directly after startup using a config file (web.xml, server.xml)? servlet servlet-nameyourServlet/servlet-name servlet-classyourClass/servlet-class load-on-startup1/load-on-startup /servlet -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can I find out if there is an active session from my JSP?
Hello, I have recently moved my web-app to Form-based container managed logins. I like very much the side effect that this has which is that if you go off to another site and come back you are not given the login screen again. What worries me is people who will bookmark the login screen, I would like to be able to check if they have an existing session and if so then forward them to the next .jsp (the main menu). Unfortunately the login screen is a .jsp so it automatically creates a new session if there is not already one in existence. Is there any way to stop it doing this? My thanks in advance as ever, Andoni.
Re: Can I find out if there is an active session from my JSP?
Sorry, just found this in the page directive %@ page session=false % I assume it will solve my problems. Thanks, Andoni. - Original Message - From: Andoni [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 17, 2003 3:23 PM Subject: Can I find out if there is an active session from my JSP? Hello, I have recently moved my web-app to Form-based container managed logins. I like very much the side effect that this has which is that if you go off to another site and come back you are not given the login screen again. What worries me is people who will bookmark the login screen, I would like to be able to check if they have an existing session and if so then forward them to the next .jsp (the main menu). Unfortunately the login screen is a .jsp so it automatically creates a new session if there is not already one in existence. Is there any way to stop it doing this? My thanks in advance as ever, Andoni. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I find out if there is an active session from my JSP?
On reading more closely I find that this directive does not allow me to use sessions at all. What I want is to be able to turn them off to start, or at least not create a new one if there is one in existence already, then turn them on when I need them. See if this bit of code helps explain what I mean: This does not wok as the off-switch in the [EMAIL PROTECTED] part is permanent. %@ page session=false %% // If this user has an active session... USE IT! if(null != request.getSession(false)) { response.sendRedirect(myMainMenu.jsp); } else { request.getSession(); } % - Original Message - From: Harry Mantheakis [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 17, 2003 3:24 PM Subject: Re: Can I find out if there is an active session from my JSP? Hello What worries me is people who will bookmark the login screen, I would like to be able to check if they have an existing session and if so then forward them to the next .jsp (the main menu). Unfortunately the login screen is a .jsp so it automatically creates a new session if there is not already one in existence. Is there any way to stop it doing this? Set the 'session' page directive to false: [EMAIL PROTECTED] session=false % Regards Harry Mantheakis London, UK Hello, I have recently moved my web-app to Form-based container managed logins. I like very much the side effect that this has which is that if you go off to another site and come back you are not given the login screen again. What worries me is people who will bookmark the login screen, I would like to be able to check if they have an existing session and if so then forward them to the next .jsp (the main menu). Unfortunately the login screen is a .jsp so it automatically creates a new session if there is not already one in existence. Is there any way to stop it doing this? My thanks in advance as ever, Andoni. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tracking sessions in JSPs
Hello, I am trying to find out if I can create a JSP which does not create a session (that bit's easy) and yet can use sessions if it decides that one doesn't exist already. Any ideas anyone? Thanks. Andoni.
j_security_check
Hello, I am trying to implement a JNDIRealm with form-based security. When I look at the output from my RequestDumperValve I see that the call to j_security_check is like: /jsp/j_security_check which is understandible as it is just on its own in the form tag thus: form method=post action=j_security_check name=loginform input type=hidden name=j_username input type=hidden name=j_password /form Is there something I should put before it which none of the documentation refers to? I am getting a 403 Access denied. Thanks in advance, Andoni.
Re: Enabling valve crashed ESRI Arcims applications.
I have an internationalised app running in UTF-8 on tomcat 4.0.4 and when I add in that Valve I get loads of errors because it seems to be converting my data to iso-8859-1. So I have to use a URLDecoder when I am using that valve. Hope this helps. Andoni. - Original Message - From: Yansheng Lin [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, November 14, 2003 3:09 PM Subject: RE: Enabling valve crashed ESRI Arcims applications. Oh once I commented that line, everything worked fine. I will try debug='100' today to see what kind of error I was getting. -Original Message- From: Januski, Ken [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 4:44 PM To: Tomcat Users List Subject: RE: Enabling valve crashed ESRI Arcims applications. It might be a good idea to put the comment back in, restart Tomcat, and then see whether or not you get these errors. At least that way you know whether or not they're related to your changes. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 5:59 PM To: 'Tomcat Users List' Subject: RE: Enabling valve crashed ESRI Arcims applications. Nope, no errors or exception(not that I know of:). I did a tail apache_log.2003-11-13.txt and the log just stop there after the first arcims request. And on the arcims server side, nothing happens, i.e., no arcims request was received. I do get the following exception when I started my tomcat. But I think that exception is always there, with or without Valve. -- 2003-11-13 15:20:14 [org.apache.catalina.connector.warp.WarpConnection] Exception on socket java.net.SocketException: Socket closed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:144) at org.apache.catalina.connector.warp.WarpConnection.recv(Unknown Source) at org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown Source) at org.apache.catalina.connector.warp.WarpConnection.run(Unknown Source) at java.lang.Thread.run(Thread.java:536) -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 3:46 PM To: Tomcat Users List Subject: Re: Enabling valve crashed ESRI Arcims applications. did you get a stack trace? Filip - Original Message - From: Yansheng Lin [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, November 13, 2003 2:41 PM Subject: Enabling valve crashed ESRI Arcims applications. Wow, this is kind of cool. And I couldn't explain it! If I uncomment the following header logging in my server.xml, all of 'arcims-related' application does not work anymore. And it seems that the request wasn't even sent to 'arcims' server. Valve className=org.apache.catalina.valves.RequestDumperValve/ Unfortunately, arcims uses a propriety servlet. So I have no idea what's inside of that class. All other application worked with logging. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serialized Java Beans.
My JavaBeans are being stored in session even though they don't explicitly implement java.io.Serializable. What am I missing? Should I add it? Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 5:19 PM Subject: RE: Serialized Java Beans. Howdy, It's good practice to make beans that you put in a session Serializable. Tomcat indeed serializes sessions by default, and if you put a non-Serializable bean in the session you'll get a runtime exception. However, tomcat doesn't due this to free memory under load as much as it does it to persist sessions across server restarts. Yoav Shapira Millennium ChemInformatics -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 10:10 AM To: Tomcat Users List Subject: Serialized Java Beans. Hello, I recently read that if a JavaBean implements Serializable the servlet engine can write it to disk if it is not being used and if it's algorithm decides this would be a good idea. Can anybody tell me if Tomcat does this? Should I be sure to always implement Serializable in JavaBeans that I am storing in session? The actual quote from the book is: Occasionally some servers may choose to write these attributes to disk to free memory. To take advantage of this functionality, it is a good idea to ensure that any objects placed inside a session implement the java.io.Serializable interface so that the object may be written to a stream. In a similar manner, applications that execute inside a distributed environment may have their entire sessions and session attributes passivated and reactivated on a different machine. If our application is marked as distributable then it is important that any session attributes are Serializable to support this. Wrox: Professional SCWCD Certification: ISBN 1-86100-770-1 Thanks, Andoni. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Serialized Java Beans.
Hello, I recently read that if a JavaBean implements Serializable the servlet engine can write it to disk if it is not being used and if it's algorithm decides this would be a good idea. Can anybody tell me if Tomcat does this? Should I be sure to always implement Serializable in JavaBeans that I am storing in session? The actual quote from the book is: Occasionally some servers may choose to write these attributes to disk to free memory. To take advantage of this functionality, it is a good idea to ensure that any objects placed inside a session implement the java.io.Serializable interface so that the object may be written to a stream. In a similar manner, applications that execute inside a distributed environment may have their entire sessions and session attributes passivated and reactivated on a different machine. If our application is marked as distributable then it is important that any session attributes are Serializable to support this. Wrox: Professional SCWCD Certification: ISBN 1-86100-770-1 Thanks, Andoni.
Re: JDBC Realm
Can you please explain this a little better. You have in your database a list of all your user's passwords encrypted using MD5. Do you also have a clear text copy of them? Then you want to encrypt this clear text copy for use in your configuration files? If you don't already have a cleartext copy of the passwords you are going to have to get your users to submit them as your MD5 version is useless. You could amend your application to read the password, store it in the clear, then compare it using MD5. Then as they all log in they will have given you a copy of their password. Andoni. - Original Message - From: Gardner, David [IT] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 28, 2003 3:15 AM Subject: JDBC Realm I have a JDBC Realm configured against a sybase database and it works fine. See below I have changed the details for obvious security reasons. Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.sybase.jdbc2.jdbc.SybDriver connectionURL=jdbc:sybase:Tds:foo.au.bar.com:666/foo_bar connectionName=foobar connectionPassword=foobar userTable=User userNameCol=userName userCredCol=password userRoleTable=UserRole roleNameCol=roleName digest=MD5/ I also have the user passwords encrypted using MD5 and this works fine. However we have a need to have all clear text passwords encrypted in configuration files. I need this realm to work with the connectionPassword value foobar encrypted. Does anyone know if this has been done and is there a patch of some sort available? David Gardner Software Developer Cititech Level 11, 2 Park Street Sydney NSW Australia 2000 Phone: (+612) 8225 4803 Fax: (+612) 8225 Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bug: RequestDumperValve - Tomcat 4.0.4 - UTF-8
Hello, I have recently started using the RequestDumperValve with my Tomcat 4.0.4 for windows. Now when I go to write applications that accept foreign character sets in UTF-8 I find that they come out as rubbish because they have been translated into ISO-8859-1. When I add a URLDecoder.decode(); statement in my servlet where the request.getParameter() comes in all works fine again. Unfortunately if I don't remove the URLDecoder when putting the application Live (my live site has no dumper valve) I get a string of question marks for the foreign characters. So: The RequestDumperValve in Tomcat 4.0.4 is translating the characters received into ISO-8859-1. Now what I need is the source code for the valve to fix this problem but I can't find the source code on the jakarta.apache.org site any more, can someone help me? Thanks, Andoni.
Re: Servlet and JSP.
What is the error message thrown? Andoni. - Original Message - From: anunay ashish [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, October 06, 2003 11:07 AM Subject: Servlet and JSP. Hi, I have a problem regarding my servlet. The JSP file calling the servlet is having the following code: HTML HEAD TITLE Page format /TITLE META NAME=Generator CONTENT=EditPlus META NAME=Author CONTENT= META NAME=Keywords CONTENT= META NAME=Description CONTENT= /HEAD BODY %@ page import=java.sql.* % jsp:useBean id=dbBean scope=session class=com.scheduler.DBUpdate / !--In the above statement the bean tag made an object of the class and called the constructor too.-- Welcome! The available page formats are: br table border=1 trtdbPage format/b/td/tr % ResultSet testRS; String query = Select * from lookup_page_format; //On giving a ; after the query did not return any record. dbBean.process(query); try { testRS = dbBean.getResultSet(); while(testRS.next()) { out.print(trtd + testRS.getString(2) + /td/tr); System.out.println(testRS.getString(2)); } } catch (SQLException e) { out.print(SQLException : + e); } % /table Please add a new page format of your choice: form action=servlet/com.scheduler.addDataServlet method=GET input type=text name=newPageFormat input type=Submit name=submitButton value=Submit /form /BODY /HTML The bean as well as the servlet packages is in the same folder as: C:\Program Files\Apache Group\Tomcat 4.1\webapps\Tracking_system\WEB-INF\classes\com\scheduler If I change the method in servlet from doGet to doPost and make the corresponding change in form method to POST then the JSP throws an error of something related to my bean package. Is the problem related to GET/POST? or to the fact that both the packages are in the same folder? Regards, Anunay Ashish. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Printing with page breaks.
Hello, I want my users to be able to print out a list of messages they receive with a single click on a print button. Incorporating the messages into a single JSP is no problem but then when they print this there are no page breaks. I have looked at the IETF's site at: http://www.ietf.org/rfc/rfc2045.txt where the RFC's all are text documents with Form Feed characters in them which produce page breaks. I can replicate this functionality but unfortunately these page breaks don't work in IE. It still prints these characters out as an unknown special character. Can anybody tell me if they have seen a page anywhere on the web that prints on separate pages. You can test if it does by choosing Print Preview from the file menu, you don't have to waist paper ;-) My thanks for any help, even if it is just to confirm that this is not possible. Regards, Andoni.