Installing Tomcat-5.5.25 in Solaris 10 (SPARC-64 bit)
Dear all, I have installed tomcat-5.5.25 in Solaris10 on Sun SPARC 64-bit platform after installing 64-bit JRE. I am able to start the tomcat using the startup.sh script. But when I tried to execute the JSP-Exmples , I am getting Servlet Exception like the following: ( I have executed the basic-arithmetic example ) HTTP Status 500 - -- *type* Exception report *message* *description* *The server encountered an internal error () that prevented it from fulfilling this request.* *exception* javax.servlet.ServletException: Wrapper cannot find servlet class org.apache.jsp.jsp2.el.basic_002darithmetic_jsp or a class it depends on org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:595) *root cause* java.lang.ClassNotFoundException: org.apache.jsp.jsp2.el.basic_002darithmetic_jsp org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1362) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:595) Please let me know that is there restriction to run Servlet in this platform ( SPARC 64-bit with Solaris 10 ) . When I deployed my Web Application , I am getting another servlet exception ( This servlet is using the package jfreechart for plotting some piechart, Exception came at this point. ie, From the line in which the jfreechart method is called. ) . Is there any restriction that jfreeshat (*version 1.0.0.*) will not work on tomcat-5.5.25 ?. Following is the exception which I got from my application : *Jun 24, 2008 8:40:53 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet StatusGraph threw exception java.lang.NoClassDefFoundError at org.jfree.chart.ChartFactory.createPieChart3D(ChartFactory.java:499) at my.util.PieChart.createTransparentPieChart3D(PieChart.java:344)* Is there any solution so that I can execute the Servlet without any bug in this platform. Please tell me how to achieve this. -- Regards, Hareesh V
RE: URL encoding problem IIS6 / JK1.2.25 / Tomcat 5.5.20
André Warnier wrote: It would appear (from the logs), that there is some double-encoding of the URI going on. [snip] But, if somewhere along the line, a piece of code was receiving the encoded URI http://.../test%5Bbrackets%5D.jsp;, and decided to re-encode it again using the % hex hex method, then you would get this URI : http://.../test%255Bbrackets%255D.jsp; (where %25 is the encoded version of %). Then the next step would decode this URI back into http://.../test%5Bbrackets%5D.jsp;, and that is what the server would try to access, what would be logged, and also what you seem to experience. So, which is the culprit which re-encodes something it should not ? And is there not some parameter somewhere which forces it to do so ? Thanks for your excellent answer. I have fixed the problem now. There is a setting for the isapi_redirecor called uri_select. This parameter controls the URI's which are passed to Tomcat from IIS. It defaults to value proxy, which leads to some re-encoding. I have changed the parameter's value to unparsed now, which has solved the problem. For those who want to know more, the parameter is explained here: http://tomcat.apache.org/connectors-doc/reference/iis.html Jesse. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat caching and deployment issues
Steven Probetts wrote: Thanks for your replies. Couple of things, I'm in Australia so that is why I don't get back to you straight away. Also, I hope I'm replying properly and that this message get put in the correct location in the thread list. To deploy I: Stopped tomcat added the war file to my wars directory edited the context fragment file (in conf/Catalina/localhost/mycontext.xml to point the docBase attribute to the correct war file) started tomcat I am wondering if maybe I didn't 'undeploy' the app in the Tomcat manager (or another manager app called probe). You need to do something to tell Tomcat that the context.xml has changed and that the classes etc need to be reloaded. Restarting Tomcat will do that but there might be a less invasive way. Have you tried re-loading just the changed webapp. Both Tomcat manager app and probe (assuming that is lambdaprobe, an excellent tool) will let you do that. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Tomcat-5.5.25 in Solaris 10 (SPARC-64 bit)
hareesh wrote: Please let me know that is there restriction to run Servlet in this platform ( SPARC 64-bit with Solaris 10 ) . There is no restriction that I am aware of. This should just work. Is there any restriction that jfreeshat (*version 1.0.0.*) will not work on tomcat-5.5.25 ?. Again, not that I am aware of. Is there any solution so that I can execute the Servlet without any bug in this platform. Please tell me how to achieve this. Lets get the examples working first, then your webapp. A couple of questions: - How did you install Tomcat? Where did you download it from? - Do you see any error messages in the logs when Tomcat starts? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Tomcat-5.5.25 in Solaris 10 (SPARC-64 bit)
Thanks for the reply. Is there any special step that I should do for these examples to work ? Is so, please give those steps. Thanks in advance. On Wed, Jun 25, 2008 at 7:22 AM, Mark Thomas [EMAIL PROTECTED] wrote: hareesh wrote: Please let me know that is there restriction to run Servlet in this platform ( SPARC 64-bit with Solaris 10 ) . There is no restriction that I am aware of. This should just work. Is there any restriction that jfreeshat (*version 1.0.0.*) will not work on tomcat-5.5.25 ?. Again, not that I am aware of. Is there any solution so that I can execute the Servlet without any bug in this platform. Please tell me how to achieve this. Lets get the examples working first, then your webapp. A couple of questions: - How did you install Tomcat? Where did you download it from? - Do you see any error messages in the logs when Tomcat starts? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Hareesh V
Re: URL encoding problem IIS6 / JK1.2.25 / Tomcat 5.5.20
Jesse Klaasse wrote: [...] Good. Now, I should add that using [ and ] in URL's is not really something I would recommend, if only for legibility reasons. It will always make people wonder if what they're seeing in the logfile is normal, or if it's some programming syntax which escaped there. And I would bet that naming your servlet that way is also going to bring you trouble if you ever have to reference it in a Javascript line for instance. André - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL encoding problem IIS6 / JK1.2.25 / Tomcat 5.5.20
Jesse Klaasse wrote: [...] Good. Now, I should add that using [ and ] in URL's is not really something I would recommend, if only for legibility reasons. It will always make people wonder if what they're seeing in the logfile is normal, or if it's some programming syntax which escaped there. And I would bet that naming your servlet that way is also going to bring you trouble if you ever have to reference it in a Javascript line for instance. André - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory
Caldarale, Charles R wrote: From: Ed Marshall [mailto:[EMAIL PROTECTED] Subject: RE: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory But when I'm already logged in, IE will never display the pdf. So it seems that Tomcat is behaving differently in each case. It's not Tomcat - it's Microsoft's less than brilliant interpretation of the HTTP RFC, coupled with IE's erratic implementation. You need to get rid of the no-cache headers; this should let IE open the file in situ. I agree 100% with the above. The erratic behaviour of IE across versions, subversions, patches, etc.. with respect to the Content-Type and Content-disposition HTTP headers is the subject of uncountable articles in newgroups and pages on the web, and cost uncountable hours of work to developers. In other words, it's broken and it's a mess. (search Google for : IE +Content-type to get an idea) Even on 2 PCs with exactly the same version of IE, the behaviour will sometimes be different depending on the other programs installed on that PC. I know this will sound as hocus-pocus, but please try it : If you have any of the Acrobat programs installed on that PC, and if it is possible without major work, then - de-install the Acrobat program - reboot your PC - re-install the same Acrobat program and try again. The chances are good that the behaviour of IE will change. André - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat, Radware AppDirector,IE6 Blank Page
The strange thing about is when the web app was accessed directly there seemed to be no problem at all. Yet when accessed though the load balancer, intermittently the problem occurred. The IE itself didn't hang because I can close it normally, but it seemed like it waited for something that never came. On Tue, Jun 24, 2008 at 5:08 PM, André Warnier [EMAIL PROTECTED] wrote: Dhanisworo Dhanisworo wrote: Dear All, I have encountered a problem using the configuration below 4 Clustered Tomcat + Radware AppDirector as Load balancer. The problem was when accessing the page produced by tomcat using IE6 by first hitting to the load balancer, intermittently we got a blank page, but not so if using FireFox. Upon direct access to the tomcat server, hence bypassing the load balancer, using IE6, no blank page ever occured. And using Firefox was fine too. Can somebody explain what happened and give me some clue to resolve this issue. Hi. I know not much about load balancing, Radware or clustered Tomcats. But I can tell you that over the years, I have encountered numerous cases of inconsistent behaviours of IE, varying between versions, sub-versions and patches, and even between different workstations having the exact same version of IE, but having different other software packages installed. For instance, there are cases where, for no very apparent or documented reason, IE will issue a HEAD request for a URL, prior to issuing a GET or POST to that same URL. Presumably (but that is pure speculation on my part) that is to find out in advance what kind of response it is likely to get afterward. Maybe that can explain what you're seeing ? André - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?xml version=1.0 encoding=ISO-8859 in web.xml
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André Warnier wrote: | What else does need to be done at the Tomcat configuration level so that | it would handle UTF-8 requests properly, and produce UTF-8 responses | properly ? sigh I hate responding with the same old stuff, but these sources of information really do cover everything we are perseverating over: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding http://wiki.apache.org/tomcat/Tomcat/UTF-8 Also: http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/ The last reference (which I did not know) is excellent. Thank you. But the other two references, if you are perseverating over them, are in my view not good references worth perseverating over. The article at http://wiki.apache.org/tomcat/Tomcat/UTF-8 is incorrect. The second part (Alternative) has been recently corrected for the better, but the very premise of the article is wrong and misleading. It has been recently shown in a thread in this same forum that one does not normally need a filter, and I would submit that using a filter as indicated will corrupt data in some instances. In the article at http://wiki.apache.org/tomcat/FAQ/CharacterEncoding there is also a problem in the form shown under the title How can I test if my configuration will work correctly? As demonstrated by a recent thread here also, the form tag as shown, is missing a enctype=multipart/form-data attribute. This will cause Tomcat to misinterpret the form data in some cases. One could also argue that adding an attribute accept-charset=UTF-8 would make it even more failsafe. In addition, the article also repeats a mistake often seen, which is to tell people that it's ok to send form data via a GET and use non US-ASCII data. This is a receipe for problems, see the first mentioned article at java.sun.com. That article explains the basic reason why it is a problem : although there exist (more or less) rules as to how to encode non-ASCII data in URLs, the problem is that when it receives such a request, the server has basically no idea how the URL was actually encoded, so it can only guess at how to decode it properly. This is also explicitly discouraged in the HTML 4.01 RFC at (http://www.w3.org/TR/html401/interact/forms.html#submit-format 17.13.4 Form content types ) Now, I know that these are Wiki articles and can be corrected by anyone, but isn't that a problem ? For better or worse, these articles are used as reference by Tomcat users. See your own response above. If someone goes ahead and posts incorrect technical stuff there, there is a problem, no ? I mean that I, as a mere user, don't feel at ease going ahead and modifying the Wiki article of someone else unilaterally, nor of posting another one saying the previous one is all wrong. But maybe there should be some form of authoritative control of the accuracy of what is posted there ? André - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: very large catalina logfile...
HI all, The Free Hex Editor could open the 23 GB log-file. normally, after the server starts up * **INFO: Server startup in 891 ms* *org.apache.coyote.http11.Http11BaseProtocol* *pause * occures then stop then destroy ... init, load, start, Server starts up again. But in the 23 GB logfile, this happens all the day untill the free space is completely full. Hope that some of you can help me with this. Greets Zaher On Fri, Jun 20, 2008 at 5:19 PM, Bruno Vilardo [EMAIL PROTECTED] wrote: Cris, Thanks a lot for the information. I will download the softwares and play around. Great tips are always welcome as well as great explanation.. Thanks a lot, Best Regards, Bruno On Fri, Jun 20, 2008 at 12:04 PM, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno, Bruno Vilardo wrote: | If it was Linux or Unix, or could use the command split to split the file in | small pieces so that you can read. 'split' is a GNU utility (part of coreutils) which is not specific to GNU/Linux. There are windows versions of them as well: http://gnuwin32.sourceforge.net/packages.html or http://unxutils.sourceforge.net/ That last one seems defunct, which is a shame since I've used those utilities myself many times. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhbxxIACgkQ9CaO5/Lv0PDf6gCgvuv8q17S8AYvIwD6E+fM5p13 OnIAnR3JV2LpID6lbuvsnhHPgIeQ8k7G =v1QE -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Zaher Srour GIS Consultant Realworld OO Systems Venusstraat 17 4105 JH Culemborg The Netherlands phone: +31 345 614406 mobile: +31 64700 4321 fax: +31 84 7225800 e-mail: [EMAIL PROTECTED] web-site: www.realworld-systems.com Demo's: ArcGIS Server: arc.realworld-systems.com/vogeleditor Flamingo/ArcGIS Server: www.samenlevingsatlas.nl Google Maps/ESRI: arc.realworld-systems.com/school_en_coffee
Re: Tomcat caching and deployment issues
- Original Message - From: Steven Probetts To: users@tomcat.apache.org Sent: Wednesday, June 25, 2008 4:13 AM Subject: Re: Tomcat caching and deployment issues Thanks for your replies. Couple of things, I'm in Australia so that is why I don't get back to you straight away. Also, I hope I'm replying properly and that this message get put in the correct location in the thread list. To deploy I: Stopped tomcat added the war file to my wars directory edited the context fragment file (in conf/Catalina/localhost/mycontext.xml to point the docBase attribute to the correct war file) started tomcat I am wondering if maybe I didn't 'undeploy' the app in the Tomcat manager (or another manager app called probe). I'm unclear as to whether I need to explicitly 'undeploy' to clear out the works directory etc. So, as Johnny Kewl said, there is legacy code being used from the old version. So do i need to 'undeploy' to clear out the work directory and any other directories that tomcat uses to run the app or does restarting tomcat do this automatically. Having said that, the solution I used was to stop and start tomcat, which apparently cleared out the cache, so why didn't it do this when i restarted tomcat after deployment. And it doesn't seem to answer the problem of when I changed the database directly and it didn't show up in the app. Here it seemed to cache the data rather than the application code (which resetting the browser or using a different browser or using a different machine that has never run the application before didn't fix). I'd like to explain how we deploy a bit clearer as I think I rushed it a bit earlier. We have two business sites that have two separate databases (running on the same database instance but that is irrelevant). For convenience, we wanted to have a single war file for the web app that all sites shared. So we do the following (and I lied earlier we use /var not /opt): We have a dir called /var/tomcat/wars in which we store the single war file We have a dir called /var/tomcat/instances which contains directories for each site ie /var/tomcat/instances/site_a /var/tomcat/instances/site_b in each of these directories we have the tomcat directories conf, webapps, work etc. The tomcat binary is in /opt/tomcat (and yes i do mean /opt this time) We have a context fragment file for each site which is /var/tomcat/instances/site_a/conf/Catalina/www.site_a.com.au/myContext.xml which contains Context docBase=/var/tomcat/wars/site_a-version1.war reloadable=false swallowOutput=true The server.xml file has a Host element that reads: Host name=www.site_a.com.au appBase=webapps unpackWARs=false autoDeploy=false xmlValidation=false xmlNamespaceAware=false There is no Context element Running version.sh returns:Using CATALINA_BASE: /opt/tomcatUsing CATALINA_HOME: /opt/tomcatUsing CATALINA_TMPDIR: /opt/tomcat/temp To deploy I: * Stop tomcat using launchctl (MacOSX's services controller, like init.d in Linux) * copy the war file into the wars directory (with a different name to the old app) *Edit the context fragment file so that docBase points to the new war file * restart tomcat using launchctl Regards, = Steven Ah... I see what you doing... this is what is wrong Do not change the name of the WEB APP of the WAR The way TC relates context and path is thru the actual name of the file. This is so that normal humans can easily change the context just by changing the file name... So make the context file in TC look something like this ?xml version=1.0 encoding=UTF-8? Context docBase=D:/DEV/Ext/test/WebApplication2.war path=/WebApplication2/ The path is the context you want it to run on ie domain/WebApplication2 Make them the SAME... Then do this... in HOST autoDeploy=true Then just drop the new wars over the old one and it will redeploy automatically. Notes... You are not sharing files like this, ie when it deploys, each TC is getting its own unpacked version in webapps... have a look. So you see what happens and its what you calling CACHING... is that when you change the name... TC looks for that context. Cant find it, BUT does find the old already unpacked one in webapps... and just runs that. It cant connect that the new WAR name, ie context must be the same as war file name. Context docBase=D:/DEV/Ext/test/WebApplication2.war path=/WebApplication2/ is the full way, so you can see if you can try match a context to a different war name, but I dont think TC will figure it out. If you want to mismatch war and context... you can but then you must undeploy from /manager/html and you must run this to redeploy http://localhost:8080/manager/deploy?config=file://path/to/context.xmlpath=/NewContext Too much pain... Then one last thing... becareful if you develop against one of these TC's... as soon as you do that, the IDE will steal the context away. And
Re: very large catalina logfile...
The logfile when it goes ok is attachted now On Wed, Jun 25, 2008 at 12:04 PM, Zaher Srour [EMAIL PROTECTED] wrote: HI all, The Free Hex Editor could open the 23 GB log-file. normally, after the server starts up * **INFO: Server startup in 891 ms* *org.apache.coyote.http11.Http11BaseProtocol* *pause * occures then stop then destroy ... init, load, start, Server starts up again. But in the 23 GB logfile, this happens all the day untill the free space is completely full. Hope that some of you can help me with this. Greets Zaher On Fri, Jun 20, 2008 at 5:19 PM, Bruno Vilardo [EMAIL PROTECTED] wrote: Cris, Thanks a lot for the information. I will download the softwares and play around. Great tips are always welcome as well as great explanation.. Thanks a lot, Best Regards, Bruno On Fri, Jun 20, 2008 at 12:04 PM, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno, Bruno Vilardo wrote: | If it was Linux or Unix, or could use the command split to split the file in | small pieces so that you can read. 'split' is a GNU utility (part of coreutils) which is not specific to GNU/Linux. There are windows versions of them as well: http://gnuwin32.sourceforge.net/packages.html or http://unxutils.sourceforge.net/ That last one seems defunct, which is a shame since I've used those utilities myself many times. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhbxxIACgkQ9CaO5/Lv0PDf6gCgvuv8q17S8AYvIwD6E+fM5p13 OnIAnR3JV2LpID6lbuvsnhHPgIeQ8k7G =v1QE -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Zaher Srour GIS Consultant Realworld OO Systems Venusstraat 17 4105 JH Culemborg The Netherlands phone: +31 345 614406 mobile: +31 64700 4321 fax: +31 84 7225800 e-mail: [EMAIL PROTECTED] web-site: www.realworld-systems.com Demo's: ArcGIS Server: arc.realworld-systems.com/vogeleditor Flamingo/ArcGIS Server: www.samenlevingsatlas.nl Google Maps/ESRI: arc.realworld-systems.com/school_en_coffee -- Zaher Srour GIS Consultant Realworld OO Systems Venusstraat 17 4105 JH Culemborg The Netherlands phone: +31 345 614406 mobile: +31 64700 4321 fax: +31 84 7225800 e-mail: [EMAIL PROTECTED] web-site: www.realworld-systems.com Demo's: ArcGIS Server: arc.realworld-systems.com/vogeleditor Flamingo/ArcGIS Server: www.samenlevingsatlas.nl Google Maps/ESRI: arc.realworld-systems.com/school_en_coffee - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat caching and deployment issues
Steven Probetts wrote: You say that restarting tomcat will tell tomcat that the context.xml file has changed. But does it clean out the cache. My understanding is that TC uses the work dir as its work area when running a war file in unpacked form. i am wondering if a TC restart tells TC that the context file has changed, but only changes the files in work that have changed, and leaves the others alone. On the other hand, an undeploy and redeploy does clean out ALL the files. A reload will not clean out the work dir but providing the timestamps on your files are correct (ie newer files have later timestamps and nothing has a timestamp in the future) then that shouldn't be a problem. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Tomcat-5.5.25 in Solaris 10 (SPARC-64 bit)
hareesh wrote: Thanks for the reply. Is there any special step that I should do for these examples to work ? Is so, please give those steps. Thanks in advance. Answering my original questions would enable people on this list to help you. On Wed, Jun 25, 2008 at 7:22 AM, Mark Thomas [EMAIL PROTECTED] wrote: A couple of questions: - How did you install Tomcat? Where did you download it from? - Do you see any error messages in the logs when Tomcat starts? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
proxy_ajp
I am currently using proxy ajp successfully and very happy with the simplicity of configuration compared to my experiences a few years ago! I have run into a problem however. I have two version of tomcat running on one of the servers. Here is the configuration -: ProxyPass /tc1/ ajp://www.xxx.yyy.zzz:8009/ ProxyPass /tc2/ ajp://www.xxx.yyy.zzz:8007/ I believe the second tomcat is configured correctly in server.xml to use 8007 I assumed it would be possible to use arbitrary ports, in this case 8007, but it is refusing to work. Could anyone please tell me if there is a reason why this wont work or indeed if it should work. [Wed Jun 25 13:04:22 2008] [error] (13)Permission denied: proxy: AJP: attempt to connect to www.xxx.yyy.zzz:8007 (www.xxx.yyy.zzz) failed [Wed Jun 25 13:04:22 2008] [error] ap_proxy_connect_backend disabling worker for (www.xxx.yyy.zzz) [Wed Jun 25 13:04:22 2008] [error] proxy: AJP: failed to make connection to backend: www.xxx.yyy.zzz Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: proxy_ajp
Mark Dewey wrote: I am currently using proxy ajp successfully and very happy with the simplicity of configuration compared to my experiences a few years ago! I have run into a problem however. I have two version of tomcat running on one of the servers. Here is the configuration -: ProxyPass /tc1/ ajp://www.xxx.yyy.zzz:8009/ ProxyPass /tc2/ ajp://www.xxx.yyy.zzz:8007/ I believe the second tomcat is configured correctly in server.xml to use 8007 I assumed it would be possible to use arbitrary ports, in this case 8007, but it is refusing to work. Could anyone please tell me if there is a reason why this wont work or indeed if it should work. What do the logs say? Did you change shutdown port as well? -- Mikolaj Rydzewski [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?xml version=1.0 encoding=ISO-8859 in web.xml
André Warnier wrote: The last reference (which I did not know) is excellent. Thank you. But the other two references, if you are perseverating over them, are in my view not good references worth perseverating over. The article at http://wiki.apache.org/tomcat/Tomcat/UTF-8 is incorrect. The second part (Alternative) has been recently corrected for the better, but the very premise of the article is wrong and misleading. It has been recently shown in a thread in this same forum that one does not normally need a filter, and I would submit that using a filter as indicated will corrupt data in some instances. The first solution is horrible as a standard approach but is a useful example of how you might recover mangled UTF-8 text. You could also add that a filter should be unnecessary but that many developers prefer it as it 'fixes' all pages with a few lines of code rather than having to fix every single page. In the article at http://wiki.apache.org/tomcat/FAQ/CharacterEncoding there is also a problem in the form shown under the title How can I test if my configuration will work correctly? As demonstrated by a recent thread here also, the form tag as shown, is missing a enctype=multipart/form-data attribute. Agreed. Feel free to fix it. This will cause Tomcat to misinterpret the form data in some cases. One could also argue that adding an attribute accept-charset=UTF-8 would make it even more failsafe. Wouldn't do any harm. In addition, the article also repeats a mistake often seen,s which is to tell people that it's ok to send form data via a GET and use non US-ASCII data. This is a receipe for problems, see the first mentioned article at java.sun.com. There you get into a grey area in the various specs. Probably the best solution is a comment that says POST is easier to control than GET but if you are stuck with GET for whatever reason then... Now, I know that these are Wiki articles and can be corrected by anyone, but isn't that a problem ? For better or worse, these articles are used as reference by Tomcat users. See your own response above. If someone goes ahead and posts incorrect technical stuff there, there is a problem, no ? I mean that I, as a mere user, don't feel at ease going ahead and modifying the Wiki article of someone else unilaterally, nor of posting another one saying the previous one is all wrong. But maybe there should be some form of authoritative control of the accuracy of what is posted there ? This is a community of which we are all members. We are all equally responsible for keeping the Wiki relevant and accurate. Any and every member of this community has an equal right to go and edit any Wiki article. There was a long time when Wiki changes were not posted to the dev list so no review took place. That has been fixed and all changes now get copied to the dev list where they will be reviewed. Gross inaccuracies are likely to be corrected quickly. And yes, I could have made all the changes above myself rather than write this but I really would like to see a few more people on this list take the plunge and start updating the Wiki, particularly the FAQ. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: proxy_ajp
Mark Dewey wrote: I am currently using proxy ajp successfully and very happy with the simplicity of configuration compared to my experiences a few years ago! I have run into a problem however. I have two version of tomcat running on one of the servers. Here is the configuration -: ProxyPass /tc1/ ajp://www.xxx.yyy.zzz:8009/ ProxyPass /tc2/ ajp://www.xxx.yyy.zzz:8007/ I believe the second tomcat is configured correctly in server.xml to use 8007 That should be fine. Can you show us the connector config from server.xml please? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Tomcat-5.5.25 in Solaris 10 (SPARC-64 bit)
I have downloaded Tomcat from the URL : http://archive.apache.org/dist/tomcat/tomcat-5/archive/v5.0.5/bin/jakarta-tomcat-5.0.5.tar.gz After downloading I unzip it using 'gunzip . After that I untared it using GNU tar (gtar) . Now the sample applications shipped with Tomcat is working fine. On Wed, Jun 25, 2008 at 11:43 AM, Mark Thomas [EMAIL PROTECTED] wrote: hareesh wrote: Thanks for the reply. Is there any special step that I should do for these examples to work ? Is so, please give those steps. Thanks in advance. Answering my original questions would enable people on this list to help you. On Wed, Jun 25, 2008 at 7:22 AM, Mark Thomas [EMAIL PROTECTED] wrote: A couple of questions: - How did you install Tomcat? Where did you download it from? - Do you see any error messages in the logs when Tomcat starts? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Hareesh V
ISAPI/JK redirector question
All, Is there a way to map an application to a back-end load-balanced/clustered tomcat farm from an IIS webserver such that an application deployed on the default host (i.e. deployed to the default webapps folder) can be addressed as a FQDN from the browser. For example: Application deployed at: http://tomcat00:8080/foo Can be reached by the end user at: http://www.myfancyname.com (Note that there is no foo on the end of that and the client has explicitly requested that this not show up.) I know that I can create a virtual host on Tomcat and deploy my app as ROOT, but then deployment and application management becomes somewhat painful. I'd like to be able to manage all my apps with a single lambda probe or Tomcat manager installation. Thanks! Brantley Hobbs - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL encoding problem IIS6 / JK1.2.25 / Tomcat 5.5.20
André Warnier wrote: [...] Now, I should add that using [ and ] in URL's is not really something I would recommend, if only for legibility reasons. It will always make people wonder if what they're seeing in the logfile is normal, or if it's some programming syntax which escaped there. And I would bet that naming your servlet that way is also going to bring you trouble if you ever have to reference it in a Javascript line for instance. I completely agree with you when you're saying [ and ] are not recommended in URL's. However, I don't really have a say in that, something to do with politics and legacy stuff.. Thanks again for your help! Jesse. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: proxy_ajp
Hi Mark, server.xml is as follows -: ?xml version='1.0' encoding='utf-8'? Server port=8003 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8090 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8444 / Connector port=8007 protocol=AJP/1.3 redirectPort=8444 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server Cheers, Mark Mark Thomas wrote: Mark Dewey wrote: I am currently using proxy ajp successfully and very happy with the simplicity of configuration compared to my experiences a few years ago! I have run into a problem however. I have two version of tomcat running on one of the servers. Here is the configuration -: ProxyPass /tc1/ ajp://www.xxx.yyy.zzz:8009/ ProxyPass /tc2/ ajp://www.xxx.yyy.zzz:8007/ I believe the second tomcat is configured correctly in server.xml to use 8007 That should be fine. Can you show us the connector config from server.xml please? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: very large catalina logfile...
From: Zaher Srour [mailto:[EMAIL PROTECTED] Subject: Re: very large catalina logfile... !-- disabled the listener to avoid the warning during shutdown. Listener className=org.apache.catalina.core.AprLifecycleListener/ -- That's the listener for the APR native-code connector (tcnative-1.dll); if you don't have it installed, it's o.k. to comment it out. However, the listener itself is not likely to be the source of the excessive log messages. !-- Define an AJP 1.3 Connector on port 8009 Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / -- That's the AJP connector used when front-ending Tomcat with httpd. If you're not using httpd, it's appropriate to remove the connector. Unless you have something poking messages at port 8009, it also shouldn't have been a problem. Removing it does reduce overhead slightly. I have doubts that either of the above by itself was causing the problem. However, if you actually do have the APR .dll file installed, it may be broken or misconfigured, which perhaps could produce the symptoms you're seeing. If you comment out the listener, you should also delete or rename that .dll file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: proxy_ajp
[Wed Jun 25 *13*:04:22 2008] [error] (*13*)*Permission* *denied*: *proxy*: *AJP*: attempt to connect to www.xxx.yyy.zzz:8007 (www.xxx.yyy.zzz) failed [Wed Jun 25 *13*:04:22 2008] [error] ap_proxy_connect_backend disabling worker for (www.xxx.yyy.zzz) [Wed Jun 25 *13*:04:22 2008] [error] *proxy*: *AJP*: failed to make connection to backend: www.xxx.yyy.zzz I have changed the shutdown port to 8003 and neither servers are using SSL Regards, Mark Mikolaj Rydzewski wrote: Mark Dewey wrote: I am currently using proxy ajp successfully and very happy with the simplicity of configuration compared to my experiences a few years ago! I have run into a problem however. I have two version of tomcat running on one of the servers. Here is the configuration -: ProxyPass /tc1/ ajp://www.xxx.yyy.zzz:8009/ ProxyPass /tc2/ ajp://www.xxx.yyy.zzz:8007/ I believe the second tomcat is configured correctly in server.xml to use 8007 I assumed it would be possible to use arbitrary ports, in this case 8007, but it is refusing to work. Could anyone please tell me if there is a reason why this wont work or indeed if it should work. What do the logs say? Did you change shutdown port as well? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: proxy_ajp
Mark Dewey wrote: [Wed Jun 25 *13*:04:22 2008] [error] (*13*)*Permission* *denied*: *proxy*: *AJP*: attempt to connect to www.xxx.yyy.zzz:8007 (www.xxx.yyy.zzz) failed [Wed Jun 25 *13*:04:22 2008] [error] ap_proxy_connect_backend disabling worker for (www.xxx.yyy.zzz) [Wed Jun 25 *13*:04:22 2008] [error] *proxy*: *AJP*: failed to make connection to backend: www.xxx.yyy.zzz I have changed the shutdown port to 8003 and neither servers are using SSL Does the second Tomcat really work? Are you able to connect using http connectors to both Tomcats? -- Mikolaj Rydzewski [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: proxy_ajp
Mark Dewey wrote: Hi yes I am. I get both over http and the usual white page for the ajp ports. I'd play with Location configuration element and balancer configuration to see whether it will work. http://httpd.apache.org/docs/2.2/mod/mod_proxy.html -- Mikolaj Rydzewski [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NullPointerExceptions - ReplicationValve problem...
Hello, i am getting null pointer exceptions when i add the following line in server.xml Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; / if i remove that line everything is working fine... but load is increased... here is part from catalina.out 23-Jun-2008 17:04:39 org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:348) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419) at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:394) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508) at java.lang.Thread.run(Thread.java:619) Thanks for any help. -- Milan Cvejić Sistem Administrator Inbox d.o.o. Software for Internet Bulevar AVNOJa 99, 11000 Beograd, Srbija tel +381 11 313 07 21 fax +381 11 313 37 34 [EMAIL PROTECTED] www.inbox-online.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Blocking Proxy Access
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Is there anyway to detect that a web user is trying to access my site via an open/anonymous proxy? Other than building a list of open proxy IP addresses and checking against it? This list would be huge and ever changing. There must be an easier way. Sorry if this post is slightly OT. Open/anonymous proxies deliberately have signatures that are almost identical to any other proxy, so there's no reliable way of knowing based on features of the request. You need that list. Unless someone else maintains it (and you trust them to correctly classify proxies), you'll have to build it yourself. If someone else maintains it, you may be able to use it. What on earth is the use case, if you don't mind me asking? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat: JNDI and Google Webtoolkit
From: nabruphonic [mailto:[EMAIL PROTECTED] Subject: Tomcat: JNDI and Google Webtoolkit - copy mysql-connector-java-5.1.6-bin.jar into TOMCAT/server/lib What happens if you put the mysql jar into common/lib as the documentation says to? http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#MySQL%20DBCP%20Example Make sure you remove the jar from server/lib - you don't want it in two places. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NullPointerExceptions - ReplicationValve problem...
what version of tomcat 6 are you using? Filip Milan Cvejic wrote: Hello, i am getting null pointer exceptions when i add the following line in server.xml Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; / if i remove that line everything is working fine... but load is increased... here is part from catalina.out 23-Jun-2008 17:04:39 org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:348) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419) at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:394) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508) at java.lang.Thread.run(Thread.java:619) Thanks for any help. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache and Tomcat
Hi, I know this may sound naïve but is it possible to have tomcat and apache running off the same port - 8080. I have iis running on port 80 and do not have another server to install apache and tomcat. Kind regards, Stuart
Re: Apache and Tomcat
Date sent: Wed, 25 Jun 2008 17:39:10 +0200 From: Stuart Caldwell [EMAIL PROTECTED] Subject:Apache and Tomcat To: users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org Hi, I know this may sound naïve but is it possible to have tomcat and apache running off the same port - 8080. No, TCP only allows one port per service. I have iis running on port 80 and do not have another server to install apache and tomcat. Then you can front end tomcat with iis. http://tomcat.apache.org/connectors-doc/reference/iis.html -Steve O. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NullPointerExceptions - ReplicationValve problem...
I am using 6.0.14 version of tomcat. And jdk 1.6 update 4. Any suggestions ? Thanks. Filip Hanik - Dev Lists wrote: what version of tomcat 6 are you using? Filip Milan Cvejic wrote: Hello, i am getting null pointer exceptions when i add the following line in server.xml Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; / if i remove that line everything is working fine... but load is increased... here is part from catalina.out 23-Jun-2008 17:04:39 org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:348) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419) at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:394) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508) at java.lang.Thread.run(Thread.java:619) Thanks for any help. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Milan Cvejić Sistem Administrator Inbox d.o.o. Software for Internet Bulevar AVNOJa 99, 11000 Beograd, Srbija tel +381 11 313 07 21 fax +381 11 313 37 34 [EMAIL PROTECTED] www.inbox-online.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache and Tomcat
From: Stuart Caldwell [mailto:[EMAIL PROTECTED] Subject: Apache and Tomcat I have iis running on port 80 and do not have another server to install apache and tomcat. Why do you want to install httpd, especially if you already have IIS in the picture? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Logging] Tutorial Contribution
Hi, Initially I was going to add to the WIKI FAQ, but all the Logging questions are so inter related that I decided to write a tutorial instead. I have not Tested this so there may be some inaccuracies. I'd appreciate feedback and will update the tutorial. As soon as the dust settles I'll post the end result on the WIKI. Note that there's also a couple of FAQs added at the end. Here's the tutorial: This document is provided as is, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the author be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with this document or the use or other dealings in this document. PRIMER ON java.util.logging and JULI The goal of this primer is to demonstrate how to to log with java.util.logging (JULI) as a backdrop to the rest of the tutorial, in particular the sections related to configuring Tomcat logging with the configuration file. One may think it's wise to skip this section and proceed directly to the section on the configuration file, but all the concepts talked about here and necessary to understand the configuration file. The examples used in this section show programmatically how logging is configured. The section on Tomcat's configuration file discusses how to accomplish declaratively what is done programmatically in this section. The following concepts (Classes) are important: - LogManager - Loggers - Handlers - Levels - Root Logger - Root Handler The official Tomcat logging documentation refers to these above concepts / classes extenstively. Lets start with Loggers. What's the purpose of a Logger? A Logger is what a developer uses to write a log statements to the console, to a file, to the network, etc. If you wanted to log something from your web application's class CriticalComponent using java.util.logging you would first create a logger like this: private String nameOfLogger = 'com.example.myapp.CriticalComponent'; or private String nameOfLogger = CriticalComponent.class.getName(); private static Logger myLogger = Logger.getLogger(nameOfLogger); Pay attention to how we defined the name of the Logger. This is important to the material explaining Tomcat's logging configuration. You may also want to think about why the myLogger is a static field (Hint myLogger is shared among all instances of CriticalComponent). Now you have a logger to create logging messages from you class CriticalComponent. For example you could now try something like this: public void wasssup() { myLogger.info(Ah Yeah Baby - that's the end of System.out.println); } If you ran this code with a deployed web application you would see this statement on the console or in catalina.out out like: INFO; 322125105255ms; 4407662;# 1; com.example.myapp.CriticalComponent; wasssup; Ah Yeah Baby - that's the end of System.out.println Notice that both the name of the Logger and the method that logged the message are mentioned in the log statement. This is important to know when you want to alter the configuration of the Logger. For example you might want to turn this logger off, because it's not that useful. What if you wanted the output to appear in a file and on the console? For that you need to define a 2 Handlers. Create the two like this: Handler fileHandler = new FileHandler(/var/log/tomcat/myapp.log); Handler consoleHandler = new ConsoleHandler(); myLogger.addHandler(fileHandler); myLogger.addHandler(consoleHandler); Now myLogger will log to both the console and the file /var/log/tomcat/myapp.log. So now we understand Loggers and Handlers, but we have not touched on Levels, Root Loggers, and Root Handlers yet. What are those? Lets start with a root Logger. A root logger is a logger whose name is . What's the purpose of it. Suppose you tried to do some logging with myLogger like this: myLogger.finest(So Fine); And nothing shows up in your log, but you know that this statement is being called. What's going on? The answer is that the JULI root logger's Level is set to INFO by default (TRUE?). The level INFO has a corresponding integer assigned to it, which is 3 (TRUE? - Comment: In any case I'm just using it as an example which fits with the rest of the tutorial...so the logic works out regardless). When myLogger attempts to log it first checks it's level. If myLogger's level is greater than the level intrinsic to the method doing the logging (finest), then the record will be logged. In this case the logging method finest corresponds to Level zero. Zero is less than 3, hence the logger does not log the message. My logger will only log messages with a level that is greater than or equal to 3. So for instance if myLogger.severe(Oohhh [EMAIL PROTECTED]) is called, it will get logged
Re: ?xml version=1.0 encoding=ISO-8859 in web.xml
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, André Warnier wrote: | It has been recently shown in a thread in this same forum | that one does not normally need a filter, and I would submit that using | a filter as indicated will corrupt data in some instances. I disagree. The filter is required for clients which silently submit UTF-8. In that case, the server defaults to ISO-8859-1 and your data is corrupted. Your demand that nobody should use GET parameters is unreasonable. Ergo, the filter is required. | In the article at | http://wiki.apache.org/tomcat/FAQ/CharacterEncoding | there is also a problem in the form shown under the title Then fix it. You are a member of this community, too, now ;) | How can I test if my configuration will work correctly? Create a URL that contains encoded UTF-8 characters that would displayed differently if interpreted as ISO-8859-1. This is not difficult to do. For instance, http://my.server.com/something?psi=ψ | As demonstrated by a recent thread here also, the form tag as shown, | is missing a | enctype=multipart/form-data | attribute. The default form enctype is application/x-www-form-urlencoded, which is fine when no input type=file / form elements are present (see http://www.w3.org/TR/html401/interact/forms.html#h-17.3). | This will cause Tomcat to misinterpret the form data in some cases. | One could also argue that adding an attribute | accept-charset=UTF-8 | would make it even more failsafe. Fair enough. I'm not sure this affects GET requests generated by forms, though. Also, not all parameters in GET URLs are from forms: some are normal links (and are often problematic). | In addition, the article also repeats a mistake often seen, which is to | tell people that it's ok to send form data via a GET and use non | US-ASCII data. This is a receipe for problems, see the first mentioned | article at java.sun.com. The only reason it's a recipe for problems is because clients are inconsistent about their use of character encoding in URLs. Non-ASCII characters are fine as long as the client and server agree on the encoding (which is sometimes problematic). Don't confuse the issue of non-ascii characters in URLs (which is fine) with the inability of clients and servers to communicate the character encoding properly (which is not fine). | Now, I know that these are Wiki articles and can be corrected by anyone, | but isn't that a problem ? For better or worse, these articles are used | as reference by Tomcat users. See your own response above. | If someone goes ahead and posts incorrect technical stuff there, there | is a problem, no ? Yes. If something is wrong, it should be fixed. We might only find out that it's broken because someone reads it and finds a problem. Given your passion for the Truth-with-a-capital-T, please correct the article. Someone in the future may re-correct it if your version of the truth turns out to be ... lacking. | I mean that I, as a mere user, don't feel at ease going ahead and | modifying the Wiki article of someone else unilaterally, nor of posting | another one saying the previous one is all wrong. But maybe there | should be some form of authoritative control of the accuracy of what is | posted there ? The Wiki is a wiki so that the documentation can grow organically, rather than having to wait until some blessed Tomcat developer gets around to fixing the documentation. The power has been placed into your hands for a reason. Wikis keep versions, so if you replace everything with porn, it'll just get reverted and you'll get booted off. Given that you will likely be making a positive contribution, I'm sure your changes will stick. You have to abandon the us versus them mentality that you have about you and the rest of the community. Most of the active users on this list are not Tomcat developers. There is no them. There is only us. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhieJoACgkQ9CaO5/Lv0PAsdACgqgKUeQEB+5y+hGWePFNEfpfk l/AAoKEItRcDZfU1BQmPss8qZ5OXc/Hu =cy91 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: proxy_ajp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, Mark Dewey wrote: |Connector port=8090 protocol=HTTP/1.1 | connectionTimeout=2 | redirectPort=8444 / |Connector port=8007 protocol=AJP/1.3 redirectPort=8444 / Is it possible that you have a firewall or iptables in the way? Can you telnet from the httpd machine to the app server over port 8007 (or 8009, depending on the server)? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhiefUACgkQ9CaO5/Lv0PD//ACeIX0RPcO5RSbktFKHJwMnXhY4 Ny8An2IZe8Z0F591ljVIWnIVyVdpEwWE =fH2k -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Logging] Tutorial Contribution
That helps! A few suggestions for the tomcat deployment: - make using log4j easier (either offer a binary version of tomcat-juli.jar that uses log4j - no source required since I can't build locally due to some dbcp error; alternatively it could use common-logging's autodetect, if log4j is available on the path, use it...) - adapt the main log4j formatter (I'll see if I can do that, I'll submit it here if it works) Thanks for the tutorial, Ole! []s Gus -Original Message- From: Ole Ersoy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2008 10:21 AM To: Tomcat Users List Subject: [Logging] Tutorial Contribution Hi, Initially I was going to add to the WIKI FAQ, but all the Logging questions are so inter related that I decided to write a tutorial instead. I have not Tested this so there may be some inaccuracies. I'd appreciate feedback and will update the tutorial. As soon as the dust settles I'll post the end result on the WIKI. Note that there's also a couple of FAQs added at the end. Here's the tutorial: This document is provided as is, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the author be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with this document or the use or other dealings in this document. PRIMER ON java.util.logging and JULI The goal of this primer is to demonstrate how to to log with java.util.logging (JULI) as a backdrop to the rest of the tutorial, in particular the sections related to configuring Tomcat logging with the configuration file. One may think it's wise to skip this section and proceed directly to the section on the configuration file, but all the concepts talked about here and necessary to understand the configuration file. The examples used in this section show programmatically how logging is configured. The section on Tomcat's configuration file discusses how to accomplish declaratively what is done programmatically in this section. The following concepts (Classes) are important: - LogManager - Loggers - Handlers - Levels - Root Logger - Root Handler The official Tomcat logging documentation refers to these above concepts / classes extenstively. Lets start with Loggers. What's the purpose of a Logger? A Logger is what a developer uses to write a log statements to the console, to a file, to the network, etc. If you wanted to log something from your web application's class CriticalComponent using java.util.logging you would first create a logger like this: private String nameOfLogger = 'com.example.myapp.CriticalComponent'; or private String nameOfLogger = CriticalComponent.class.getName(); private static Logger myLogger = Logger.getLogger(nameOfLogger); Pay attention to how we defined the name of the Logger. This is important to the material explaining Tomcat's logging configuration. You may also want to think about why the myLogger is a static field (Hint myLogger is shared among all instances of CriticalComponent). Now you have a logger to create logging messages from you class CriticalComponent. For example you could now try something like this: public void wasssup() { myLogger.info(Ah Yeah Baby - that's the end of System.out.println); } If you ran this code with a deployed web application you would see this statement on the console or in catalina.out out like: INFO; 322125105255ms; 4407662;# 1; com.example.myapp.CriticalComponent; wasssup; Ah Yeah Baby - that's the end of System.out.println Notice that both the name of the Logger and the method that logged the message are mentioned in the log statement. This is important to know when you want to alter the configuration of the Logger. For example you might want to turn this logger off, because it's not that useful. What if you wanted the output to appear in a file and on the console? For that you need to define a 2 Handlers. Create the two like this: Handler fileHandler = new FileHandler(/var/log/tomcat/myapp.log); Handler consoleHandler = new ConsoleHandler(); myLogger.addHandler(fileHandler); myLogger.addHandler(consoleHandler); Now myLogger will log to both the console and the file /var/log/tomcat/myapp.log. So now we understand Loggers and Handlers, but we have not touched on Levels, Root Loggers, and Root Handlers yet. What are those? Lets start with a root Logger. A root logger is a logger whose name is . What's the purpose of it. Suppose you tried to do some logging with myLogger like this: myLogger.finest(So Fine); And nothing shows up in your log, but you know that this statement is being called. What's going on? The answer is that the JULI root logger's Level is set to INFO by default (TRUE?). The level INFO has a corresponding integer assigned to it, which is 3 (TRUE? - Comment: In any case I'm
Re: [Logging] Tutorial Contribution
Hexsel, Gustavo wrote: That helps! A few suggestions for the tomcat deployment: - make using log4j easier (either offer a binary version of tomcat-juli.jar that uses log4j - no source required since I can't build locally due to some dbcp error; That could be because you are building with a 1.6 JDK. You have to build with a 1.5 JDK because of some API-breaking changes to the JDBC interfaces. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Rebuilding Tomcat from sources
From: JLucas ZB [mailto:[EMAIL PROTECTED] Subject: RE: Rebuilding Tomcat from sources I can't do the 'ant download' because our proxy disables some stations as ours Bloody annoying as well as being over-protective. Is your IT department run by someone named Mordac? You'll need to look at the download target in build.xml and perform all the steps by hand. It does a lot more than just grabbing one .tar file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat mod_proxy_ajp and root path
Hi, We setup an Apache Tomcat servlet and JSP engine using mod_proxy ajp as connector to host a JAVA application. Here is the httpd.conf entry: ProxyRequests Off ProxyVia Off ProxyPreserveHost On ProxyPass /servlet/ ajp://www.domain.com:8009/ ProxyPassReverseCookiePath / /servlet ProxyPassReverse /servlet ajp://www.domain.com:8009/ This is the server.xml entry: Host name=domain.com debug=0 appBase=/var/www/virtual/ domain.com/htdocs/servlet unpackWARs=false autoDeploy=true xmlValidation=false xmlNamespaceAware=false Logger className=org.apache.catalina.logger.FileLogger directory=/usr/share/tomcat-5.5.26/logs prefix=domain.com suffix=.log timestamp=true / Aliaswww.domain.com/Alias /Host We have an URL issue when the application redirect to the root path. Here it is what happens f.e.: The application shows a login page at the address http://www.domain.com/servlet/fp2008/ . When we try to logging in and click submit, the server redirect us to http://www.domain.com/fp2008/ with 404 ERROR. (correct URL should be http://www.domain.com/*servlet*/fp2008/ ) This happens for every dynamic link created by the application when a user perform an action. Any suggestion will be appreciate. Many thanks. Luca Stramenga OpenServers.it #1 GameProvider
RE: [Logging] Tutorial Contribution
From: Ole Ersoy [mailto:[EMAIL PROTECTED] Subject: [Logging] Tutorial Contribution Thanks for putting this together. I have a few comments, mostly nit-picking. The goal of this primer is to demonstrate how to to log with java.util.logging (JULI) This give the impression that java.util.logging == JULI, which is a bit misleading. Perhaps something more along the lines of java.util.logging, as implemented by JULI would be more appropriate. Now you have a logger to create logging messages from you class CriticalComponent. Typo: you class should be your class. If you ran this code with a deployed web application you would see this statement on the console or in catalina.out out like: Drop the out like from the end of that sentence. What if you wanted the output to appear in a file and on the console? For that you need to define a 2 Handlers. Remove the a prior to the 2. Lets start with a root Logger. A root logger is a logger whose name is . What's the purpose of it. Terminate that last sentence with a question mark, not a period. Now remember that once something gets logged by myLogger, it's handed over to myLogger's Handlers. But what if we never assigned any Handlers to myLogger. How would it get it's Handler? The first it's above is correct, as a contraction of it is; the second one is not, since the possessive its does not contain an apostrophe. There are several other occurrences of the same typo, which I won't list. .level = OFF Might want to also mention the other pseudo-level ALL for the serious tree-killers. How do I customize the location of the tomcat logging.properies file? logging.properies should be logging.properties. Example: -Djava.util.logging.config.file=/etc/tomcat/logging.properties Note that this property is not set when running catalina.sh. The reason for this is that the download provided by the Apache Tomcat project knows where the file is already. Not true - the script does set the property if the conf/logging.properties file exists. See lines 182-185 of the 6.0.16 catalina.sh script. It also set java.util.logging.manager to point to the JULI LogManager implementation. This is a superb addition to the Tomcat documentation set; thanks again for creating it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat mod_proxy_ajp and root path
From: Luca Stramenga [mailto:[EMAIL PROTECTED] Subject: tomcat mod_proxy_ajp and root path Logger className=org.apache.catalina.logger.FileLogger directory=/usr/share/tomcat-5.5.26/logs prefix=domain.com suffix=.log timestamp=true / If you're really using Tomcat 5.5 (you didn't bother to tell us), there is no Logger element in that level; that's not causing the problem, but should be fixed. The application shows a login page at the address http://www.domain.com/servlet/fp2008/ Looks like you're still trying to use the InvokerServlet, which you really, really don't want to do. Read this: http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3 - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache and Tomcat
Stuart Caldwell wrote: I know this may sound naïve but is it possible to have tomcat and apache running off the same port - 8080. I have iis running on port 80 and do not have another server to install apache and tomcat. TCP only allows one listener per port-IP combination. It really doesn't make sense to have more. How would the OS decide which listener gets the request? Are you using Apache as a front end to Tomcat using mod_jk or some other type of proxy? If so, do you really need direct access to Tomcat? I use Apache as a front end and route servlet/jsp requests to Tomcat via mod_jk. Apache is running on 80 but I've disabled the 8080 connector to Tomcat. There's no need for it since I can access Tomcat through Apache. If you do need direct access to Tomcat for some reason, is there some reason you can't put it on another port like say 8081 or something? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory
Thanks so much Chuck. Eliminating the no-cache headers did the job. An interesting footnote: Adding the following line to Context.xml within META-INF worked as expected. Valve className=org.apache.catalina.authenticator.FormAuthenticator disableProxyCaching=false / However, when I copy the same code from META-INF/Context.xml to conf/server.xml (of course adding docBase and path) and then delete META-INF/Context.xml, the Valve has no affect on the Headers. I expected the results to have been the same. Just curious. Thanks again for pointing me in the right direction! Ed -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2008 6:47 PM To: Tomcat Users List Subject: RE: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory From: Ed Marshall [mailto:[EMAIL PROTECTED] Subject: RE: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory But when I'm already logged in, IE will never display the pdf. So it seems that Tomcat is behaving differently in each case. It's not Tomcat - it's Microsoft's less than brilliant interpretation of the HTTP RFC, coupled with IE's erratic implementation. You need to get rid of the no-cache headers; this should let IE open the file in situ. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this e-mail is confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copy or use of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify us immediately at the e-mail address above and delete the original message. Thank you. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache and Tomcat
On 25/06/2008, at 17:43, Steve Ochani [EMAIL PROTECTED] wrote: I know this may sound naïve but is it possible to have tomcat and apache running off the same port - 8080. No, TCP only allows one port per service. You can let apache httpd use 8080, move tomcat to something else and use mod_proxy_ajp to forward the requests through httpd - although as the above poster mentioned - why do you want to use apache when you have iis installed? I have iis running on port 80 and do not have another server to install apache and tomcat.7 Then you can front end tomcat with iis. Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory
On 25 Jun 2008 at 13:45, Ed Marshall wrote: Date sent: Wed, 25 Jun 2008 13:45:42 -0500 From: Ed Marshall [EMAIL PROTECTED] Subject:RE: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory To: Tomcat Users List users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org Thanks so much Chuck. Eliminating the no-cache headers did the job. An interesting footnote: Adding the following line to Context.xml within META-INF worked as expected. Valve className=org.apache.catalina.authenticator.FormAuthenticator disableProxyCaching=false / However, when I copy the same code from META-INF/Context.xml to conf/server.xml (of course adding docBase and path) and then delete META-INF/Context.xml, the Valve has no affect on the Headers. I expected the results to have been the same. Just curious. Did you restart tomcat? BTW if using Tomcat 5 or 6 it isn't recommended to put context info into server.xml http://tomcat.apache.org/tomcat-6.0-doc/config/printer/context.html http://tomcat.apache.org/tomcat-5.5-doc/config/context.html -Steve O. Thanks again for pointing me in the right direction! Ed -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2008 6:47 PM To: Tomcat Users List Subject: RE: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory From: Ed Marshall [mailto:[EMAIL PROTECTED] Subject: RE: User Authentication - IE doesn't recognize mime type (pdf,xls)of files in protected directory But when I'm already logged in, IE will never display the pdf. So it seems that Tomcat is behaving differently in each case. It's not Tomcat - it's Microsoft's less than brilliant interpretation of the HTTP RFC, coupled with IE's erratic implementation. You need to get rid of the no-cache headers; this should let IE open the file in situ. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this e-mail is confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copy or use of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify us immediately at the e-mail address above and delete the original message. Thank you. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Logging] Tutorial Contribution
Chuck, Thanks for the Spring Cleaning and the positive feed back! After 3 days of analyzing logging, I was feeling a little Logged Out, so the pep definitely helps. I made all the changes you suggested (Good eye). I think it's ready the wiki now, unless anyone has additional modification. I still need to go through a few more of the earlier responses to the thread. Thanks again, - Ole Caldarale, Charles R wrote: From: Ole Ersoy [mailto:[EMAIL PROTECTED] Subject: [Logging] Tutorial Contribution Thanks for putting this together. I have a few comments, mostly nit-picking. The goal of this primer is to demonstrate how to to log with java.util.logging (JULI) This give the impression that java.util.logging == JULI, which is a bit misleading. Perhaps something more along the lines of java.util.logging, as implemented by JULI would be more appropriate. Now you have a logger to create logging messages from you class CriticalComponent. Typo: you class should be your class. If you ran this code with a deployed web application you would see this statement on the console or in catalina.out out like: Drop the out like from the end of that sentence. What if you wanted the output to appear in a file and on the console? For that you need to define a 2 Handlers. Remove the a prior to the 2. Lets start with a root Logger. A root logger is a logger whose name is . What's the purpose of it. Terminate that last sentence with a question mark, not a period. Now remember that once something gets logged by myLogger, it's handed over to myLogger's Handlers. But what if we never assigned any Handlers to myLogger. How would it get it's Handler? The first it's above is correct, as a contraction of it is; the second one is not, since the possessive its does not contain an apostrophe. There are several other occurrences of the same typo, which I won't list. .level = OFF Might want to also mention the other pseudo-level ALL for the serious tree-killers. How do I customize the location of the tomcat logging.properies file? logging.properies should be logging.properties. Example: -Djava.util.logging.config.file=/etc/tomcat/logging.properties Note that this property is not set when running catalina.sh. The reason for this is that the download provided by the Apache Tomcat project knows where the file is already. Not true - the script does set the property if the conf/logging.properties file exists. See lines 182-185 of the 6.0.16 catalina.sh script. It also set java.util.logging.manager to point to the JULI LogManager implementation. This is a superb addition to the Tomcat documentation set; thanks again for creating it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Logging] Tutorial Contribution
Hexsel, Gustavo wrote: That helps! Whh. Good! I was a little worried people would say This stinks! I'm more confused than ever!!!...And then I would have to go back to the drawing board again. :-) A few suggestions for the tomcat deployment: - make using log4j easier (either offer a binary version of tomcat-juli.jar that uses log4j - no source required since I can't build locally due to some dbcp error; alternatively it could use common-logging's autodetect, if log4j is available on the path, use it...) I would go after Log4J in the tutorial, but to be honest I did not really see any killer use cases for it. Also, for people just trying to figure out logging, it's much easier to start with what's already there, get very comfortable with that, and then attempt the log4j switcho in the event that there is a use case X that they just have to have. Do you have by chance? I could add a Why you should consider log4j section - adapt the main log4j formatter (I'll see if I can do that, I'll submit it here if it works) If you have a patch that makes using Log4J easier I would submit it directly through Bugzilla. I'm just a user, so the only thing I control is what goes into the tutorial initially. Thanks for the tutorial, Ole! Great to hear that you found it useful- Thanks, - Ole - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Permissions for Sun JSF RI and Security Manager under Tomcat 6.0?
Hi, I think I have found the cause! My application code contains the following:- FacesContext fc = FacesContext.getCurrentInstance(); ExpressionFactory ef = fc.getApplication().getExpressionFactory(); ELContext elc = fc.getELContext(); ValueExpression ve = ef.createValueExpression(elc, expr, clazz); Object result = ve.getValue(elc); The implementation of javax.el.ValueExpression is org.apache.jasper.el. JspValueExpression which is in the org.apache.jasper.el package. Access to this package is prevented by default by the catalina.properties file! Hurrah, problem resolved! However I still need somebody official to confirm this - as my hosting company wants some official statement. I will cross-post to the developer mailing list (so sorry to those affected) in case this is more of a development issue. Can anybody confirm and provide an official statement about the programmatic use of EL and security settings? Thanks, Mike On 24/06/2008, Michael Anstis [EMAIL PROTECTED] wrote: Hi, Firstly, sorry for the long stack traces in here but I included the lot incase what I discount somebody else picks up on. Anyway, when trying to use JSF 1.2-b20-FCS on Tomcat 6.0 with Java 2 Security Manager enabled I receive the below. This can be replicated by creating a new WAR and simply adding jsf-api.jar and jsf-impl.jar to the WEB-INF\lib folder on a vanila install of Tomcat 6.0. SEVERE: Exception sending context initialized event to listener instance of *class* com.sun.faces.config.GlassFishConfigureListener java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.org.apache.jasper.el) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:200) at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1874) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:546) at com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:769) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:511) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) 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:585) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1458) at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:820) at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:348) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
Re: [Logging] Tutorial Contribution
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ole, Ole Ersoy wrote: | I would go after Log4J in the tutorial, but to be honest I did not | really see any killer use cases for it. Also, for people just trying | to figure out logging, it's much easier to start with what's already | there [...] I agree. The use cases for log4j are all for advanced users IMO. There are things that I suspect are much easier to do using log4j (such as rolling logs on a schedule other than once per day) or things that cannot be done without either implementing a lot of stuff yourself or switching to log4j (such as logging to a database or UNIX syslog daemon). These topics should be considered advanced and the reader can be referred to existing Tomcat documentation for how to switch to using log4j. | Do you have by chance? I could add a Why you should consider log4j | section See above. I'm sure others will have other ideas. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhisroACgkQ9CaO5/Lv0PAIPQCgqprKLxvtP7mDhtWvFnec212D w7MAn1vSyw11RNs83Kf+StlDDpXuElQR =Hi69 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and JDeveloper - installing ADF runtime
Hi Jan, do you know how is ADF licensed? It is free only if you are going to use with Oracle Application server. It used to be part of JDeveloper and deployment was free of charge. See http://forums.oracle.com/forums/thread.jspa?threadID=379312 Only ADF Faces is for free! Regards, Zdenek On Tue, Jun 24, 2008 at 8:57 AM, jan [EMAIL PROTECTED] wrote: I am learning Oracle JDeveloper at the moment for a project that I pioneer, and I want to use it with Tomcat. According to Oracle's documentation it is possible, but there aren't many details. Does anybody here have any experience with this? Any documentation or howto? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Logging] Tutorial Contribution
Christopher Schultz wrote: SNIP There are things that I suspect are much easier to do using log4j (such as rolling logs on a schedule other than once per day) or things that cannot be done without either implementing a lot of stuff yourself or switching to log4j (such as logging to a database or UNIX syslog daemon). Thanks for pointing these out. Unix syslog sounds killer - but I need to play more. These topics should be considered advanced and the reader can be referred to existing Tomcat documentation for how to switch to using log4j. | Do you have by chance? I could add a Why you should consider log4j | section See above. I'm sure others will have other ideas. Thanks for the feedback. I agree your thoughts on that. I'm going to get the current content up on the wiki now, and then take a breather. Ole - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ISAPI/JK redirector question
Hi Brantley, Brantley Hobbs schrieb: All, Is there a way to map an application to a back-end load-balanced/clustered tomcat farm from an IIS webserver such that an application deployed on the default host (i.e. deployed to the default webapps folder) can be addressed as a FQDN from the browser. For example: Application deployed at: http://tomcat00:8080/foo Can be reached by the end user at: http://www.myfancyname.com (Note that there is no foo on the end of that and the client has explicitly requested that this not show up.) I know that I can create a virtual host on Tomcat and deploy my app as ROOT, but then deployment and application management becomes somewhat painful. I'd like to be able to manage all my apps with a single lambda probe or Tomcat manager installation. The server name is not the problem. Tomcat will look for all webapps in the default host, if there is not match for the host name. The /foo stripping is not trivial: the isapi redirector can rewrite request URLs, so it is able to add a /foo at the beginning of the URL. But if your webapp does any of the following things, this will not be enough: - including absolute links to itself in the response bodies. If the user clicks on those links, the browser will show the foo-URL (and try to reach it). - sending redirects to itself (redirects officially must use full URLs). - sending a cookie with path /foo. The browser will not send this cookie back with the next request, because it doesn't start with /foo. I don't know, if IIS can manipulate such things in responses. The isapi plugin itself can not. If you would use httpd, it is able to rewrite cookie pathes and redirect URLs, and with the freely available module mod_proxy_html, you can also rewrite URLs in the response body (eating some performance and only working nicely, if thoese URLs are verbose part of the HTML source and do not get created dynamically via Javascript etc.). These tools should generally better get combined with mod_proxy. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Logging] Tutorial Contribution] - Links
OK - It's up: http://wiki.apache.org/tomcat/Logging_Tutorial Plus a few additions to the FAQ: http://wiki.apache.org/tomcat/FAQ/Logging Thanks for all the feedback and earlier QA! Ole - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: proxy_ajp
Christopher Schultz schrieb: Mark, Mark Dewey wrote: |Connector port=8090 protocol=HTTP/1.1 | connectionTimeout=2 | redirectPort=8444 / |Connector port=8007 protocol=AJP/1.3 redirectPort=8444 / Is it possible that you have a firewall or iptables in the way? Can you telnet from the httpd machine to the app server over port 8007 (or 8009, depending on the server)? He should definitely try that. But I find strange, that errno is 13, which is EACCESS. The failing call should be connect() inside apr_socket_connect(). man pages on my Linux/Unix systems consistently tell me for connect(): EACCES Search permission is denied for a component of the path prefix; or write access to the named socket is denied. H. I guess this would be better discussed first on [EMAIL PROTECTED], and if no solution comes from there open an issue against httpd in the ASF bugzilla. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rebuilding Tomcat from sources
JLucas ZB schrieb: Hello, I can't do the 'ant download' because our proxy disables some stations as ours so i have dowloaded (from 'another server') : apache-tomcat-6.0.14-src from tomcat site, it's OK. Now, i just do from my tomcat src: ant and I still have the message: /exec/products/jlz/sources/apache-tomcat-6.0.14-src/build.xml:457: Warning: Could not find file /usr/share/java/tomcat-native-1.1.10/tomcat-native.tar.gz to copy. I tried to download tomcat-native-1.1.10.tar.gz and I could only get tomcat-native-1.1.10-src.tar.gz -- so, i have build it and it just created : ${tomcat-native-src}/jni/native/.libs/libtcnative-1.so.0.1.10 I do not understand Where can I download tomcat-native.tar.gz (http transfer from 'another server') ? The file tomcat-native.tar.gz is identical to tomcat-native-1.1.NN-src.tar.gz, where NN depends on the Tomcat version. In your case NN=10. Simply rename the .tar.gz. The most recent is NN=13, in a few days NN=14. The build will not build tcnative. Normal (non-Windows) Tomcat distributables simply bundle the tar.gz as a file in case the user wants to build the native connector on his platform. For running Tomcat without the native connector, you would never actually use this file, (although the ant build mandatory wants to bundle it in the Tomcat tarfile). Regards, Rainer Thank you JLZ Message du 24/06/08 19:25 De : Caldarale, Charles R A : Tomcat Users List Copie à : Objet : RE: Rebuilding Tomcat from sources From: JLucas ZB [mailto:[EMAIL PROTECTED] Subject: Rebuilding Tomcat from sources I don't know where to find the tomcat-native.tar.gz Did you do the ant download step as documented here: http://tomcat.apache.org/tomcat-6.0-doc/building.html#Building%20Tomcat Note CLASSPATH= $ECLIPSE_HOME\plugins\org.eclipse.jdt.core_3.3.1.v_780_R33x.jar You probably want to get rid of that - CLASSPATH should really never be used these days. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Logging] Tutorial Contribution
Caldarale, Charles R wrote: From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: [Logging] Tutorial Contribution You have to build with a 1.5 JDK because of some API-breaking changes to the JDBC interfaces. Could you elaborate on that? Or point us to a bugzilla entry? https://issues.apache.org/bugzilla/show_bug.cgi?id=43147 Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Logging] Tutorial Contribution
Hexsel, Gustavo schrieb: That helps! A few suggestions for the tomcat deployment: - make using log4j easier (either offer a binary version of tomcat-juli.jar that uses log4j - no source required since I can't build locally due to some dbcp error; alternatively it could use Tomcat 6 has static binding for the implementing log framework. So the type of installed tomcat-juli.jar decides, if you are using java.util.logging or Log4j. By default the j.u.l based one is bundled to keep dependencies low, but you can find the Log4j bindings at: http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.16/bin/extras/ (and in a similar directory on all mirrors). The directory contains - tomcat-juli.jar - tomcat-juli-adapters.jar which are described in http://tomcat.apache.org/tomcat-6.0-doc/logging.html#log4j The files mentioned there as lying in output/extras after building Tomcat extras are the same, that you can find at the above download URL. And yes; those downloads are a little hard to find ;) Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Blocking Proxy Access
See Thread at: http://www.techienuggets.com/Detail?tx=41765 Posted on behalf of a User It's to keep undesirables, who have been banned, off from a social networking site. In Response To: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Is there anyway to detect that a web user is trying to access my site via an open/anonymous proxy? Other than building a list of open proxy IP addresses and checking against it? This list would be huge and ever changing. There must be an easier way. Sorry if this post is slightly OT. Open/anonymous proxies deliberately have signatures that are almost identical to any other proxy, so there's no reliable way of knowing based on features of the request. You need that list. Unless someone else maintains it (and you trust them to correctly classify proxies), you'll have to build it yourself. If someone else maintains it, you may be able to use it. What on earth is the use case, if you don't mind me asking? - Peter - To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Blocking Proxy Access
Im confused by your statement is that republicans or democrats? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 25 Jun 2008 19:30:44 -0500 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Blocking Proxy Access See Thread at: http://www.techienuggets.com/Detail?tx=41765 Posted on behalf of a User It's to keep undesirables, who have been banned, off from a social networking site. In Response To: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Is there anyway to detect that a web user is trying to access my site via an open/anonymous proxy? Other than building a list of open proxy IP addresses and checking against it? This list would be huge and ever changing. There must be an easier way. Sorry if this post is slightly OT. Open/anonymous proxies deliberately have signatures that are almost identical to any other proxy, so there's no reliable way of knowing based on features of the request. You need that list. Unless someone else maintains it (and you trust them to correctly classify proxies), you'll have to build it yourself. If someone else maintains it, you may be able to use it. What on earth is the use case, if you don't mind me asking? - Peter - To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The other season of giving begins 6/24/08. Check out the i’m Talkathon. http://www.imtalkathon.com?source=TXT_EML_WLH_SeasonOfGiving