RE: storing images
Alexis, We do this exact same thing all the time. I solve the concurrency on the image problem by adding a small session hash value to the image name. It does mean we may get 10 of the same images if 10 concurrent access are happening, but it also allows us clean things up without worry of destroying an image someone is using. -Original Message- From: alexis [mailto:alz...@gmail.com] Sent: Friday, May 06, 2011 8:38 AM To: Tomcat Users List Subject: Re: storing images Image is built using a jfreechart object, once created it's stored as attribute in servletcontext, at this stage image is complete before the set. What im not sure if setattribute is synchronized, if not i can synchronize the method that creates and store the image. Enviado desde blackberry -Original Message- From: sebb seb...@gmail.com Date: Fri, 6 May 2011 14:05:14 To: Tomcat Users Listusers@tomcat.apache.org Reply-To: Tomcat Users List users@tomcat.apache.org Subject: Re: storing images If multiple threads try to create the image at the same time it is possible that one thread will see a partial file - or the file may be locked. If you are not doing this already, I suggest creating the file with a unique temporary name and then renaming it once complete. The rename may fail if another thread has meanwhile created it, but that can easily be allowed for. Trying to lock the file whilst it is created is likely to be harder to implement; however it might be worth it if the file creation is very expensive in system resources. On 6 May 2011 13:48, Thad Humphries thad.humphr...@gmail.com wrote: I'd store the image to java.io.tmpdir and retrieve it with a servlet. I doing this now with my Ajax application. On Thu, May 5, 2011 at 2:19 PM, alexis alz...@gmail.com wrote: Hello all, im facing an issue, ive been testing for a while different approaches without success. I have a servlet that basically does . creates an image . store the image on disk . returns an html img tag pointing to the stored image. reason why the servlet doesnt returns the image directly using a response type image/png is the servlet is called from an ajax script, this ajax script renders the inner text inside a div on a jsp page on the same context that the server runs. ajax can only render html on divs, there's no way to return binary content (the image) from the servlet to the ajax script. So, i have to create the image on the servlet (done) , store the image on the disk (done), and return the img tab also done. Thing is, where im able to store the image from the servlet im not able to read it from the jsp. I tried with /tmp, i tried with servletcontext.getpath to store the file on that dir, nothing seems to work. where should i store and reference those images to be written by the servlet and read by the jsp? thanks in advance - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be --Christopher Marlowe, *Doctor Faustus* (v, 121-24) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat on a Linux virtual machine
We're Apache-Tomcat-MySQL all in separate Cent-OS VM's with no problems. It wouldn't be Tomcat anyway, right? One might say that something is up with the drivers used by the connection pool, but, that's still not Tomcat, and to be accurate, the driver used by Tomcat or an app inside Tomcat doesn't know squat about the DB being inside or outside of a VM. So, I'd focus entirely on the DB config and its environment. Do you have a spare machine where you can setup a Tomcat/Postgres pair outside of a VM? -Original Message- From: Darryl Lewis [mailto:darryl.le...@unsw.edu.au] Sent: Friday, April 15, 2011 10:19 PM To: Tomcat Users List Subject: Tomcat on a Linux virtual machine I have an application (commercial) running on a virtual instance of Linux talking to a Postgres database. We are continually getting locks on the DB that are crashing the app. I think it's just bad programming on the suppliers side, but the supplier has latched onto the idea that it is because it is running on a virtual machine. Has any experienced any problems running Tomcat on a virtual machine similar to this? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7 Startup Problems
We have a newly installed Tomcat 7 64bit in Windows 7 (quad-core w/8gb ram, 322GB free disk space) We copied the msvcr71.dll into the bin directory, and have Java 1.6.0_23-b05 64 bit. Tomcat doesn't start, and all we get from it is: Service 'tomcat7' is missing the ImageFile None of the normal Tomcat logs are written even with debug set on, so it's clear the basics of Tomcat can't seem to get going... Any ideas are appreciated. Joe
RE: Tomcat 7 Startup Problems
We downloaded and installed apache-tomcat-7.0.8.exe install for Windows from the Apache site, and installed as we normally do, from the EXE, and, as you presume, as a service. We normally start it via the Tomcat monitor, but of course that isn't working. So, from the command line in the bin directory, we are running, simply, tomcat7.exe and it is from that we see the message. Now that I take a closer look at the bin dir... there isn't a startup.bat. -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, April 11, 2011 7:40 AM To: Tomcat Users List Subject: Re: Tomcat 7 Startup Problems Joseph Morgan wrote: We have a newly installed Tomcat 7 64bit in Windows 7 (quad-core w/8gb ram, 322GB free disk space) From where did you download / install it ? How did you install it ? We copied the msvcr71.dll into the bin directory, and have Java 1.6.0_23-b05 64 bit. Tomcat doesn't start, How do you start it ? and all we get from it is: Service 'tomcat7' is missing the ImageFile Where do you get that message ? Presuming it is installed as a Windows Service, what does the Windows Services applet show for this service ? (as an executable file) If you open a command window and navigate to Tomcat's installation directory, and enter bin/starstup.bat, what do you see ? None of the normal Tomcat logs are written even with debug set on, so it's clear the basics of Tomcat can't seem to get going... Any ideas are appreciated. Joe - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 7 Startup Problems
Yep.. the entirety of the Java parameters was blank If I run from the command line: Tomcat7 I get Service 'tomcat7' is missing the ImageFile If I run: Tomcat7 //RS/Tomcat7 I get two lines of output, but still no Tomcat. They both start with the date, then: Commons daemon procrun stdout initialized Commons daemon procrun stderr initialized And... I don't see logs anywhere... -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, April 11, 2011 8:40 AM To: Tomcat Users List Subject: Re: Tomcat 7 Startup Problems Joseph Morgan wrote: We downloaded and installed apache-tomcat-7.0.8.exe install for Windows from the Apache site, and installed as we normally do, from the EXE, and, as you presume, as a service. We normally start it via the Tomcat monitor, but of course that isn't working. So, from the command line in the bin directory, we are running, simply, tomcat7.exe and it is from that we see the message. Now that I take a closer look at the bin dir... there isn't a startup.bat. Right. Then, in short : run tomcat7w.exe, which should be there. That's a GUI which allows to edit parameters stored in the Registry, for the Tomcat JVM wrapper which is tomcat7.exe. In one of the tabs, there should be the path of the JVM to run, and that's probably what is wrong. Rectify it and retry tomcat7.exe. I'm not familiar with Tomcat7, but that's how it used to be for 5 and 6. -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, April 11, 2011 7:40 AM To: Tomcat Users List Subject: Re: Tomcat 7 Startup Problems Joseph Morgan wrote: We have a newly installed Tomcat 7 64bit in Windows 7 (quad-core w/8gb ram, 322GB free disk space) From where did you download / install it ? How did you install it ? We copied the msvcr71.dll into the bin directory, and have Java 1.6.0_23-b05 64 bit. Tomcat doesn't start, How do you start it ? and all we get from it is: Service 'tomcat7' is missing the ImageFile Where do you get that message ? Presuming it is installed as a Windows Service, what does the Windows Services applet show for this service ? (as an executable file) If you open a command window and navigate to Tomcat's installation directory, and enter bin/starstup.bat, what do you see ? None of the normal Tomcat logs are written even with debug set on, so it's clear the basics of Tomcat can't seem to get going... Any ideas are appreciated. Joe - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 7 Startup Problems
You would better to uninstall it and then reinstall (and now be sure to run the installer with run as administrator). After Andre's suggestion that we may not have properly installed as administrator, this is exactly what we just did... and I did notice the new version and downloaded 7.0.12.. and evidently we did not Run as Administrator when we installed things are working just fine now -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Monday, April 11, 2011 9:59 AM To: Tomcat Users List Subject: Re: Tomcat 7 Startup Problems 2011/4/11 Joseph Morgan joseph.mor...@ignitesales.com: Yep.. the entirety of the Java parameters was blank I understand that as the service was not actually installed, i.e. nothing was written into the registry. You would better to uninstall it and then reinstall (and now be sure to run the installer with run as administrator). Though if you want to install it manually, there is service.bat in the zip package. BTW, the exe installer prints the commands that were used to install the service into one of log files. Those can also be used to reinstall it. apache-tomcat-7.0.8.exe Why not 7.0.12? :/ We copied the msvcr71.dll into the bin directory, The above should not be needed. The service wrapper now has a workaround for the original problem. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Please Help
So. *what* is it not showing? Is it a JSP? If so, what is the time on your tomcat server compared to the time of the JSP. We have this sometimes when we deploy and find we have to update a JSP within a very short period of time, and our Tomcat server in our COLO is 2 time zones off. The JSP gets the local time, and if the server has compiled it, then it thinks the new JSP has already been compiled. -Original Message- From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com] Sent: Tuesday, March 29, 2011 1:32 PM To: Tomcat Subject: Please Help One problem I am having Using Tomcat 6.0 is it doesn't reflect the change what I made instantaneously.. I mean it keep showing old results though I have disabled option of 'Remembering History' in browser.. What I feel is it is fetching old results from somewhere and now it's not by browser.. So how to configure Tomcat 6.0 so that it never remember anything and do process entirely new every time when it comes the execution part.. Regards,Jinal Dhruv
RE: Please Help
You can 1) Restart Tomcat or your web app, or 2) read this: http://stackoverflow.com/questions/415520/how-do-i-make-tomcat-stop-caching-my-servlet-responses -Original Message- From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com] Sent: Tuesday, March 29, 2011 1:47 PM To: Tomcat Users List Subject: Re: Please Help I am having problem particularly with running Servlets programs.. Though I clear browser history, delete .class file and comile .java file again, it shows old results..So from where it come? Is Tomcat is storing it at somewhere? From: Joseph Morgan joseph.mor...@ignitesales.com To: Tomcat Users List users@tomcat.apache.org; Jinal Dhruv dhruv.ji...@yahoo.com Sent: Wednesday, 30 March 2011 12:08 AM Subject: Re: Please Help So. *what* is it not showing? Is it a JSP? If so, what is the time on your tomcat server compared to the time of the JSP. We have this sometimes when we deploy and find we have to update a JSP within a very short period of time, and our Tomcat server in our COLO is 2 time zones off. The JSP gets the local time, and if the server has compiled it, then it thinks the new JSP has already been compiled. -Original Message- From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com] Sent: Tuesday, March 29, 2011 1:32 PM To: Tomcat Subject: Please Help One problem I am having Using Tomcat 6.0 is it doesn't reflect the change what I made instantaneously.. I mean it keep showing old results though I have disabled option of 'Remembering History' in browser.. What I feel is it is fetching old results from somewhere and now it's not by browser.. So how to configure Tomcat 6.0 so that it never remember anything and do process entirely new every time when it comes the execution part.. Regards,Jinal Dhruv - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Please Help
I suspect you installed Tomcat as a service. If so, you should be able to find the tomcat monitoring application. Click on your start icon in Win7 and then, in the search box, type Tomcat. Hopefully, you will see a Monitor Tomcat entry. Right-click over that, and select Run As Administrator. Once you get the screen up, you should have a set of tabs (General, Log On, Logging, ...). On the General tab, you should have buttons along the bottom, Start, Stop, Pause, and Restart. If the tomcat service is running, click Stop. Once stopped, click Start. To restart just the web app, you can run the manager application (if you installed it). Open a browser window and enter: http://localhost:8080/manager/html If that works, then you installed the manager app, and this will allow you to control individual applications. -Original Message- From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com] Sent: Tuesday, March 29, 2011 2:12 PM To: Tomcat Users List Subject: Re: Please Help Actually, I am using Tomcat from last 15 days only..One thing worked is if I restart PC, then it works fine..so it looks like restarting Tomcat works.. The problem on given link is excatly what I am facing..Thanx a ton for this.. but still can U tell me exactly how to restart Tomcat without restarting PC as one green signal is not appearing in my taskbar and I am using Windows7 as well as what do you mean by restarting webapp? From: Joseph Morgan joseph.mor...@ignitesales.com To: Tomcat Users List users@tomcat.apache.org; Jinal Dhruv dhruv.ji...@yahoo.com Sent: Wednesday, 30 March 2011 12:36 AM Subject: Re: Please Help You can 1) Restart Tomcat or your web app, or 2) read this: http://stackoverflow.com/questions/415520/how-do-i-make-tomcat-stop-caching-my-servlet-responses -Original Message- From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com] Sent: Tuesday, March 29, 2011 1:47 PM To: Tomcat Users List Subject: Re: Please Help I am having problem particularly with running Servlets programs.. Though I clear browser history, delete .class file and comile .java file again, it shows old results..So from where it come? Is Tomcat is storing it at somewhere? From: Joseph Morgan joseph.mor...@ignitesales.com To: Tomcat Users List users@tomcat.apache.org; Jinal Dhruv dhruv.ji...@yahoo.com Sent: Wednesday, 30 March 2011 12:08 AM Subject: Re: Please Help So. *what* is it not showing? Is it a JSP? If so, what is the time on your tomcat server compared to the time of the JSP. We have this sometimes when we deploy and find we have to update a JSP within a very short period of time, and our Tomcat server in our COLO is 2 time zones off. The JSP gets the local time, and if the server has compiled it, then it thinks the new JSP has already been compiled. -Original Message- From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com] Sent: Tuesday, March 29, 2011 1:32 PM To: Tomcat Subject: Please Help One problem I am having Using Tomcat 6.0 is it doesn't reflect the change what I made instantaneously.. I mean it keep showing old results though I have disabled option of 'Remembering History' in browser.. What I feel is it is fetching old results from somewhere and now it's not by browser.. So how to configure Tomcat 6.0 so that it never remember anything and do process entirely new every time when it comes the execution part.. Regards,Jinal Dhruv - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Cannot create a link to a file - suspecting tomcat is the issue
John, Think about what the browser is doing. When the browser sees file:///C:/Users/OEM/Desktop/testa.text, it wants to load a file from the local system where it is running, which is NOT your Apache + Tomcat server, but the user's machine. For so many reasons we cannot get into here, you do not what to make it so anyone hitting your site can absolutely reach any file on that server, at least, unless you want a love affair with the hacker community. You want it relative so that 1) Your user's browser can find it and 2) so hackers can't just reach anywhere into your machine and grab something, say... a config file, or a password file. If you need user specific areas, then organize your app directory structure that way, and link relatively to each user's area. Joe -Original Message- From: John C [mailto:jac_legend_...@hotmail.com] Sent: Thursday, March 10, 2011 9:21 AM To: users@tomcat.apache.org Subject: RE: Cannot create a link to a file - suspecting tomcat is the issue In case I did not explain myself well. I am trying to create a link to a file in a webpage. The link works fine using Apache + Tomcat if the file and link are both relative. This means that the html file containing the link to the text file is located in the same directory as the file itself. However I would like to link to absolute files anywhere on the system where the Apache + Tomcat server is hosted. In this case I am running on local host and using the absolute link to the file (file:///C:/Users/OEM/Desktop/testa.txt). Unfortunately this doesn't work. Any idea what I am doing wrong? From: jac_legend_...@hotmail.com To: users@tomcat.apache.org Subject: Cannot create a link to a file - suspecting tomcat is the issue Date: Fri, 11 Mar 2011 04:07:47 +1300 I am trying to create a link to a file in my webpage. The anchors href for the link is file:///C:/Users/OEM/Desktop/testa.txt. When I run my webpage from file I can click the link (file:///C:/Users/OEM/Documents/NetBeansProjects/WebApp/web/main.htm). However when I run my webpage using Apache Server and Tomcat I cannot click the link (http://localhost:8080/WebApp/main.htm). What I am trying to achieve is to be able to create a link to a file located anywhere on the server. Since I am using localhost, I would like to point to this file (file:///C:/Users/OEM/Desktop/testa.txt). How do I do this? Does the file have to be relative to Apache Server? Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 500 Internal Server Error after 5 minutes
What do the client's server's Tomcat logs for that app show? -Original Message- From: Uma Maheswara Rao M [mailto:mail2m...@gmail.com] Sent: Thursday, February 17, 2011 11:40 AM To: users@tomcat.apache.org Subject: 500 Internal Server Error after 5 minutes Hi , Need help in resolving below issue. We are requesting a servlet and that servlet will run for 20 min to provide the information, meanwhile exactly after 5 minutes we are getting Internal Server Error. We are using apache-tomcat-6.0.26. Is there any setting which can cause this error? Is there any solution for this problem? It is happening only in client's environment, it is not reproducible in our environments. Please help me in resolving this issue. Thanks Regards, UmaMaheswaraRao - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 500 Internal Server Error after 5 minutes
Sounds like you are looking at the 900lb Gorilla. Is the servlet is capturing exceptions and either not logging them or ignoring them? If the servlet is yours, instrument the code and follow it within the logs. If the servlet is not yours, then appeal to those responsible for it. Is it loading too much data into memory? What are the JVM memory settings? You should provide a little more detail (without sending source code)... Otherwise, Martin's suggestion was right on.. what is your client's name and billing address -Original Message- From: Uma Maheswara Rao M [mailto:mail2m...@gmail.com] Sent: Thursday, February 17, 2011 12:38 PM To: Tomcat Users List Subject: Re: 500 Internal Server Error after 5 minutes No specific information in the log. On Thu, Feb 17, 2011 at 1:10 PM, Joseph Morgan joseph.mor...@ignitesales.com wrote: What do the client's server's Tomcat logs for that app show? -Original Message- From: Uma Maheswara Rao M [mailto:mail2m...@gmail.com] Sent: Thursday, February 17, 2011 11:40 AM To: users@tomcat.apache.org Subject: 500 Internal Server Error after 5 minutes Hi , Need help in resolving below issue. We are requesting a servlet and that servlet will run for 20 min to provide the information, meanwhile exactly after 5 minutes we are getting Internal Server Error. We are using apache-tomcat-6.0.26. Is there any setting which can cause this error? Is there any solution for this problem? It is happening only in client's environment, it is not reproducible in our environments. Please help me in resolving this issue. Thanks Regards, UmaMaheswaraRao - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Is IBM Right About Java?
Chuck, So are you saying it will reduce the upper consumed heap? I have -Xms = -Xmx, so maybe that's why I never see a reduction. Our core load is from 9am - 7pm CST, and we have virtually nothing from 11pm to 5am. So if low heap usage should ever cause the JVM to drop the consumed heap, that is when it would, but it has never happened. Like I said before, though, it gets to about 15% of max memory available and seems to run just fine there. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Tuesday, February 08, 2011 12:53 PM To: Tomcat Users List Subject: RE: Is IBM Right About Java? From: Robinson, Eric [mailto:eric.robin...@psmnv.com] Subject: RE: Is IBM Right About Java? As I understand it, it would actually not work because instances that peak at 512M but then go back down to, say, 128M, would still never return the unused memory to the OS so it can be used by other instances. Not true - that's the whole point of the -Xms setting. If GC can squeeze the heap down, it will do so and avoid allocations in the now unused virtual space. There are some heuristics in place within GC to avoid bouncing up and down, so heap usage has to stay low for a while before you'll see a lower upper limit and a corresponding reduction in the real memory usage. (Note that the unused virtual space may not be returned to the OS, but the real space behind it won't be referenced so the pages will age out - but only if the OS needs the space for some other process.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to configure Tomcat/Coyote to deliver a P3P Header on Every Request
-Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, January 14, 2011 3:05 PM To: Tomcat Users List Subject: RE: How to configure Tomcat/Coyote to deliver a P3P Header on Every Request From: Joseph Morgan [mailto:joseph.mor...@ignitesales.com] Subject: How to configure Tomcat/Coyote to deliver a P3P Header on Every Request Using Tomcat 6.0.13 So what's your upgrade schedule? Once a decade? It's an old system still running quite a few apps, but we're leaving it for dead. how do we configure the Coyote server to deliver a P3P header on every request, even if for a JavaScript, Image, CSS, etc? Interesting question, especially in light of the following quote from a related Mozilla bugzilla entry: Ah the memories. We (IBM) wrote the original P3P implementation and then Netscape proceeded to write their own. So both our companies wasted immense amounts of time that everyone thought was a crappy proposal to begin with. Remove it. https://bugzilla.mozilla.org/show_bug.cgi?id=225287#c12 Now THAT is a good quote! But, our old apps recently ran into problem when our clients began loading these apps into div overlays, IE stopped saving cookies. Further research took us down the road of studying P3P headers and how browsers respond to them, and it seems that if the P3P header is not returned on every request, IE throws the baby out with the bath water. Write a filter. Will do Thanks - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to configure Tomcat/Coyote to deliver a P3P Header on Every Request
Thanks... sometimes the easiest thing to do is the last thing you think of... not to mention that my programmers said that filters would only work if a servlet/jsp is called, but not if a JS or CSS file is requested. Teaches me to listen to them! -Original Message- From: Ronald Klop [mailto:ronald-mailingl...@base.nl] Sent: Friday, January 14, 2011 5:11 PM To: Tomcat Users List Subject: Re: How to configure Tomcat/Coyote to deliver a P3P Header on Every Request We do this with a filter mapped to /*. Ronald. Op vrijdag, 14 januari 2011 21:32 schreef Joseph Morgan joseph.mor...@ignitesales.com: Using Tomcat 6.0.13, how do we configure the Coyote server to deliver a P3P header on every request, even if for a JavaScript, Image, CSS, etc? Joseph M. Morgan Ignite Sales, Inc. Director of Technology and Operations Office 972-789-5523 Email: joseph.mor...@ignitesales.com Web: www.ignitesales.com Guaranteed Increase in Core Revenue for Banks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to configure Tomcat/Coyote to deliver a P3P Header on Every Request
You know what... I need to learn to read what I write... you are correct, it needs to be added to every response. Thanks -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Friday, January 14, 2011 3:07 PM To: Tomcat Users List Subject: Re: How to configure Tomcat/Coyote to deliver a P3P Header on Every Request Joseph Morgan wrote: Using Tomcat 6.0.13, how do we configure the Coyote server to deliver a P3P header on every request, even if for a JavaScript, Image, CSS, etc? I don't know about the Coyote server, and it won't work for a request, but if you are talking about a Tomcat webapp and its responses, how about a servlet filter mapped to /* and adding such a header to every response ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to configure Tomcat/Coyote to deliver a P3P Header on Every Request
Using Tomcat 6.0.13, how do we configure the Coyote server to deliver a P3P header on every request, even if for a JavaScript, Image, CSS, etc? Joseph M. Morgan Ignite Sales, Inc. Director of Technology and Operations Office 972-789-5523 Email: joseph.mor...@ignitesales.com Web: www.ignitesales.com Guaranteed Increase in Core Revenue for Banks
RE: How to schedule events on Tomcat?
Why can't you use process scheduling of your OS? -Original Message- From: Brian [mailto:bbprefix-tom...@yahoo.com] Sent: Thursday, December 02, 2010 1:52 PM To: users@tomcat.apache.org Subject: How to schedule events on Tomcat? Hi, I have a regular app in my Tomcat server, based on the request/response paradigm. I need some processes tu run at some specific intervals, lets say after 30 minutes of some events, or maybe every 30 minutes. Is there a way to do that on Tomcat, to schedule events? I don't want to try tying this process to the requests, because it would make them run slower, and it would run twice at the same time if two requests arrive almous simultaneously. Thanks, Brian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Serialization
This has nothing to do with Tomcat it has to do with Java, serialization and OO. What are you trying to persist because it looks like you are persisting what amounts to be an inner class to a JSP? Consider changing that to a simple JavaBean not considered an inner class to the compiled JSP and you'll be fine. You'll never be able to cast w4a$ddm2 into w4b$ddm2 or vice-versa, but you can cast an instance of w4a$ddm2 or w4b$ddm2 to their common type, if they have one. Just having the same code does not make then the same class when compiled. -Original Message- From: Wolfgang Orthuber [mailto:orthu...@kfo-zmk.uni-kiel.de] Sent: Monday, October 04, 2010 8:10 AM To: Tomcat Users List Subject: Serialization Hello, my tomcat version is 5.5.17, my question concerns serialization of objects, below is a code section for writing and reading an object. If I call write immediately before read: d5.write(); d5.read(); then all works fine, but if I use only read (on an formerly written file) with the same code included in another program module, I got the exceptions like this: java.lang.ClassCastException: org.apache.jsp.w.w4a_jsp$1ddm2 cannot be cast to org.apache.jsp.w.w4b_jsp$1ddm2 in which w4a.jsp and w4b.jsp are two different modules which include the same code for read and write. The name of the program module is stored in the serialized object, but the name of the program module does not matter, because both modules include the same code. Do you know a simple solution which avoids the exception? Wolfgang The code section with read and write: class dm5t implements Serializable { public ArrayListddm2v5; public dm5t () { v5 = new ArrayListddm2 (); } public String topicpath(){return getServletContext().getRealPath()+/tp/;} public synchronized boolean write () { String fn=fntopics; boolean ok=true; try { String spath = topicpath(); FileOutputStreamfs = new FileOutputStream (spath+fn); ObjectOutputStreamos = new ObjectOutputStream(fs); os.writeObject (v5); os.close ();} catch (IOException e) {ok=false;} return ok;} public synchronized booleanread () { String fn=fntopics; boolean ok=true; ArrayListddm2v5tmp=null; try { String spath = topicpath(); FileInputStreamfs = new FileInputStream (spath+fn); ObjectInputStreamos = new ObjectInputStream(fs); v5tmp = (ArrayListddm2) os.readObject (); os.close (); } catch (IOException e) {ok=false;} catch (ClassNotFoundException e) {ok=false;} if (ok)if (v5tmp != null) v5=v5tmp; return ok;} } - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: HtttServletRequest.getSession()
Mark... on that thought, Java 1.5+ has the java.net.CookieHandler class... is there a way to insert a CookieHandler into Tomcat??? -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Thursday, September 16, 2010 8:26 AM To: Tomcat Users List Subject: Re: HtttServletRequest.getSession() On 16/09/2010 13:49, Brian McBride wrote: Is there a way to persuade Tomcat to use Set-Cookie2 headers? Not though the Servlet API. The servlet spec references v0 and v1 cookies but not the v2 spec. Given the IE doesn't even fully implement the v1 cookie spec, I would estimate the chances of it being spec compliant with v2 cookies somewhere rather close to zero. IE's user base may be declining but it is still a very large percentage. It may be possible to implement some form of custom extension but doing that without touching any of the javax.servlet classes would be tricky at best (and we can't touch them since that would break the spec). Your best bet may be to just set the cookie header manually. That won't help with session cookies since Tomcat creates those. Lobbying the Servlet EG has been known to get the spec changed if a strong argument is presented (eg httpOnly support in cookies). Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to spwan child processes.
Charles... in his defense (though I'm not saying he shouldn't understand the spec), this actually stems from a series of misunderstandings, mostly brought on by poser authors, grad and teach college professors, and instructors who regurgitate slides rather than actually knowing anything. Many a programmer has been told that spawning your own threads cannot or should not be done in the JEE space, when what they really mean to convey is that programmers should not try to handle request concurrency through their own threading mechanism... because the container already does so. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Monday, August 23, 2010 10:02 AM To: Tomcat Users List Subject: RE: How to spwan child processes. From: Wesley Acheson [mailto:wesley.ache...@gmail.com] Subject: Re: How to spwan child processes. Thats my point I thought new Thread() was something I couldn't do (by JEE specs) I'm curious - where in any of the Java EE specs did you come across that? Questions: 1 Should this be delegated to the container? Is such a capability even hinted at in the servlet spec? If no, then it's a bit difficult to delegate. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How can i tell how much of allocated heap is being used?
For java, you'll do something like this: Runtime runtime = Runtime.getRuntime(); long maxMemory = runtime.maxMemory(); long totalMemory = runtime.totalMemory(); long freeMemory = runtime.freeMemory(); Maximum memory is the total memory the JVM will allocate. Total Memory is the total amount of memory current allocated. Free memory is the amount of memory free of the total currently allocated. -Original Message- From: laredotornado [mailto:laredotorn...@gmail.com] Sent: Wednesday, August 18, 2010 1:42 PM To: users@tomcat.apache.org Subject: How can i tell how much of allocated heap is being used? Hi, I'm using Tomcat 6.0.26, Java 1.6 on Linux kernel 2.6.18-164.11.1.el5. I'm trying to figure out if there if we can figure out how much of our allocated heap memory is actually being used. Grateful for any thoughts you might have, - Dave -- View this message in context: http://old.nabble.com/How-can-i-tell-how-much-of-allocated-heap-is-being -used--tp29474695p29474695.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to call an external class from a webapp (i.e. - implement a plugin)
What's wrong with providing instructions to the customer on how to install the plugin with a particular web app? -Original Message- From: Goren Il [mailto:gore...@hotmail.com] Sent: Monday, July 05, 2010 2:44 AM To: users@tomcat.apache.org Subject: How to call an external class from a webapp (i.e. - implement a plugin) I would like my webapp to call an external class, which will be provided (as a name) in an XML file at run time. The external class will be developed by 3rd party, and might include additional JARs. I will refer to the external class and JARs as the plugin. My webapp is provided as a WAR, so it is not possible to add the plugin into the same WAR (unless the customer performs it himself). I do not want to put the plugin's JARs in the common lib of Tomcat, so that it will not affect other webapps (the plugin might include JARs of different versions than the webapps use). I considered putting the plugin in a separate folder, and implement my own class loader that will look at that folder as well. It seems like too much of an effort for a simple task. What is the recommended way to achieve plugin capabilities for a webapp? Thanks G. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Where is this class?
http://jcp.org/en/jsr/detail?id=303 -Original Message- From: laredotornado [mailto:laredotorn...@gmail.com] Sent: Thursday, April 22, 2010 12:22 PM To: users@tomcat.apache.org Subject: Where is this class? Hi, Im running Tomcat 6.0.26. In my app, I'm getting a java.lang.ClassNotFoundException: javax.validation.ValidatorFactory exception. Does anyone know where to find the ValidatorFactory class? More generally, is there a web site taht will tell me what JAR a particular class belongs to? Thanks, - Dave -- View this message in context: http://old.nabble.com/Where-is-this-class--tp28332023p28332023.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Where is this class?
Sorry. Go to this page: http://jcp.org/aboutJava/communityprocess/final/jsr303/index.html And then click on the Reference Implementation link to download it from there. Unzip the file and in the lib directory you'll find a validation-api-1.0.0.GA.jar which will have the class in it -Original Message- From: laredotornado [mailto:laredotorn...@gmail.com] Sent: Thursday, April 22, 2010 12:45 PM To: users@tomcat.apache.org Subject: RE: Where is this class? Is this just the documentation ? I'm not able to find the JAR file to download from this page. Thanks, - Dave Joseph Morgan-2 wrote: http://jcp.org/en/jsr/detail?id=303 -Original Message- From: laredotornado [mailto:laredotorn...@gmail.com] Sent: Thursday, April 22, 2010 12:22 PM To: users@tomcat.apache.org Subject: Where is this class? Hi, Im running Tomcat 6.0.26. In my app, I'm getting a java.lang.ClassNotFoundException: javax.validation.ValidatorFactory exception. Does anyone know where to find the ValidatorFactory class? More generally, is there a web site taht will tell me what JAR a particular class belongs to? Thanks, - Dave -- View this message in context: http://old.nabble.com/Where-is-this-class--tp28332023p28332023.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Where-is-this-class--tp28332023p28332333.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Basic Question
Depends upon how geeky you want it. You can try this, as it will be certainly the most definitive answer, but somewhat like beef jerky to digest: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd You could start here for a everything you want to know: http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html But I sometimes like to reference something more quick and dirty, but nicely done: http://wiki.metawerx.net/wiki/Web.xml -Original Message- From: Rhino [mailto:rhi...@sympatico.ca] Sent: Friday, April 16, 2010 7:25 AM To: Tomcat Users List Subject: Re: Basic Question Can you remind me how to do that (or where to find documentation describing it)? FileUploadServlet is one that I wrote some time back and it has a web.xml file associated with it. I'm pretty sure I created it myself although I don't actually remember doing so at this point. Here are the current contents but I'm not sure if this is still how the web.xml should look at this point: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app servlet servlet-nameform/servlet-name servlet-classupload.UploadForm/servlet-class /servlet servlet servlet-nameservlet/servlet-name servlet-classupload.UploadServlet/servlet-class init-param param-nameuploadDir/param-name param-valueuploads/param-value /init-param /servlet servlet-mapping servlet-nameform/servlet-name url-pattern/form/url-pattern /servlet-mapping servlet-mapping servlet-nameservlet/servlet-name url-pattern/servlet/url-pattern /servlet-mapping /web-app Also, does this file need to be put into Tomcat somehow so that Tomcat can see it? If so, what is the proper mechanism to do so? Or does the act of exporting to the war file do that automagically? Again, my memory is really fuzzy on this stuff and I don't remember where these techniques are described. -- Rhino Joseph M Morgan wrote: Did you configure your servlets in your web.xml properly? Also...it sounds as though you are deploying each servlet in its own app. Make sure you are invoking the servlet through the proper app. -Original message- From: Rhino rhi...@sympatico.ca To: tomcat-user tomcat-u...@jakarta.apache.org Sent: Fri, Apr 16, 2010 01:07:29 GMT+00:00 Subject: Basic Question I hope someone will take pity on me and help me with this very basic question. I was moderately fluent with servlets and Tomcat several years ago but haven't touched them in a while. I'm trying to get back into servlets now. I am having trouble getting my servlets to start in Tomcat. I inevitably get a 404 error. I am running Tomcat 6.0.26 on Windows XP SP2. The sample applications in Tomcat run fine. My servlets are in Eclipse 3.5.2. They compile fine and I have used the Tomcat menu to export them to the war file directory; no error gets reported when I do the export. I did a manual deploy of the war file from the war file to deplay section of the Tomcat Manager page. When I start the Tomcat Manager in my browser, it shows several servlets, including the examples and the servlets that I have deployed myself. In each case, my own servlets seem to be started just fine. All of them say running, the number of sessions is 0 for each of them, and all of them have stop, reload and undeploy options which are clickable and a start option which is not clickable. To me, that says these puppies are started and there is no error in any of them. However, when I click on my servlets, like /FileUploadServlet for example, I get this: HTTP Status 404 - /FileUploadServlet/ *type* Status report *message* _/FileUploadServlet/_ *description* _The requested resource (/FileUploadServlet/) is not available._ Apache Tomcat/6.0.26 I feel sure that I've simply neglected to do something simple and straightforward but my memory is failing me. I can't remember what other steps are needed to get a servlet configured so that it runs in Tomcat. I was going to try to run the servlet in Eclipse but I'm darned if I can remember how to start it there either. Can someone help me out? -- Rhino - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail:
RE: Tomcat Supported Windows Operating Systems
Add Windows Vista 32 Bit and 64 bit to that -Original Message- From: David kerber [mailto:dcker...@verizon.net] Sent: Wednesday, March 31, 2010 2:07 PM To: Tomcat Users List Subject: Re: Tomcat Supported Windows Operating Systems On 3/31/2010 2:57 PM, Curtis LaPrise wrote: Hi All, The company I work for is looking at purchasing a product that requires Tomcat (on a Windows based System). We would ideally like to install this on one of our Windows Server 2008 R2 servers. As such I have been looking over the various tomcat documentation (in Vein) trying to find a list of OS's supported, more specifically the Windows platforms supported. Also let me clarify the term support as I'm afraid it might be misconstrued; Obviously since Tomcat is open source it does not offer support, however what I'm trying to find is whether Tomcat will run (without issue) on Windows Server 2008 R2. Tomcat, being written in java, will run fine on any OS with a good JVM. Specifically in my experience, it runs fine on all versions of windows server from NT to 2008. I can also personally vouch that it runs fine on the desktop versions of NT and Win2k, XP 32-bit, Win7 x64, and Debian Linux. IOW, if you own it, tomcat will probably run fine on it... D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Examining where Tomcat is serving files from
I'm getting 404s for everything Is it your tag not being accessed, or files accessed from your tag, or the whole webapp missing? If it is just an issue of your tag not being able to find files as you think they should, Just create a File (new File(xxx)) within your tag and System.out the absolute path of that file. That will Tell you what the tag sees as your root! Is there a way to set up a debugger or something? You can do remote debugging of the JSP containing the tag. Oh, and by the way, I'm using the ancient Tomcat 4.1 Why? -Original Message- From: PCJ [mailto:peter.jones@gmail.com] Sent: Friday, March 12, 2010 10:58 AM To: users@tomcat.apache.org Subject: Examining where Tomcat is serving files from Hi, I'm trying to test a custom tag library and not quite getting there. I'm using Tomcat to serve the files but when I navigate to where they should be, I'm getting 404s for everything. I have a project in Eclipse called MyTagLib, which Tomcat (integrated into Eclipse) is serving on port 8080, and my Web content is in MyTagLib/web/content appropriately enough. I have the following tag set in org.eclipse.wst.common.component: wb-resource deploy-path=/ source-path=/web/content/ So localhost:8080/blarg.html should serve MyTagLib/web/content/blarg.html, but it doesn't. What I want to know is, if Tomcat isn't seeing these files, how can I examine where it IS looking? Is there a way to set up a debugger or something? Oh, and by the way, I'm using the ancient Tomcat 4.1, but if anybody knows anything about dealing with this in newer versions I'll make an effort to translate. Thanks! -- View this message in context: http://old.nabble.com/Examining-where-Tomcat-is-serving-files-from-tp278 79973p27879973.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Secured photo rendering
On Wed, Mar 10, 2010 at 7:46 AM, Christopher Schultz ch...@christopherschultz.net wrote: Just for the sake of mental mast... er, fun! you could write a javascript event handler that ... ..would work until the user switched off JavaScript? or kicked off `wget` with the image URL? :-) ... or someone is using screen recording software such as Camtasia or other similar software. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Secured photo rendering
Joseph Morgan wrote: I think the OP is asking how to prevent an image from being cached by a client and, I cannot imagine there is a way if the image is to display in a client at all, the image is now there, and the client can do anything it wants... But it should not, if the server sends the image with the appropriate no caching and/or expires HTTP headers. Assuming a well behaved client... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Secured photo rendering
I think the OP is asking how to prevent an image from being cached by a client and, I cannot imagine there is a way if the image is to display in a client at all, the image is now there, and the client can do anything it wants... Angelo... am I correct? You want to prevent the image from being cached, right? -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Monday, March 08, 2010 9:11 PM To: Tomcat Users List Subject: RE: Secured photo rendering the easiest implementation would be develop a security fence for your front end (https with secure connnector) http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html once the request is 'inside' the servlet (or listener or filter) you can reference 'local' folders which contain the necessary jpgs in this scenario all the jpgs in the folder would be behind a firewall there are more primitive means of securing (such as implementing .htaccess) although you'll want to weigh the performance degradation if you decide to go this route http://httpd.apache.org/docs/1.3/howto/htaccess.html hth Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Mon, 8 Mar 2010 15:22:59 -0800 From: angelochen...@yahoo.com.hk To: users@tomcat.apache.org Subject: Secured photo rendering Hi, As I notice, the photo rendering usually uses file system/Apache to speed up displaying, a url point at a photo URL, the photo is still available even when the page is finished. Is there a way to show the photo only thru the page? somehow secure the photo? Thanks, Angelo -- View this message in context: http://old.nabble.com/Secured-photo-rendering-tp27829228p27829228.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. http://clk.atdmt.com/GBL/go/201469229/direct/01/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Secured photo rendering
Everyone is right... but... I think the OP has to better describe the need at hand. -Original Message- From: David kerber [mailto:dcker...@verizon.net] Sent: Tuesday, March 09, 2010 8:35 AM To: Tomcat Users List Subject: Re: Secured photo rendering Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Secured photo rendering But it should not, if the server sends the image with the appropriate no caching and/or expires HTTP headers. The headers don't matter, since the client has the image in hand. Browsers, for example, allow a right-click to save the image, regardless of the caching state. I've seen javascript used to prevent right-clicking to save the image, but nothing can prevent them from taking a screen shot. Now how one would set such headers easily in Tomcat for static documents, that I don't know. Filters - but it won't help. - Chuck - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat generate empty 0 kb logs
These may not be as empty as they appear. For example. Startup Tomcat and, once up, open the catalina log file... Windows may not be reporting their actual size. However, shutdown Tomcat and you will usually see the size update. -Original Message- From: Miriam esteve [mailto:miesvesa...@gmail.com] Sent: Wednesday, March 03, 2010 5:52 AM To: users@tomcat.apache.org Subject: Tomcat generate empty 0 kb logs O/s Windows Vista jdk1.5.0_22 TOMCAT 5.5.28 My problem is that Tomcat that I have installed as a server in Windows only create empty (0 Kb) Logs Files. I have searched in all system, in windows events logs, and of course in tomcat/logs/ but there is nothing!! Someone knows why?? I have every time I start tomcat a new 0kb log file for all of this: jakarta_service_-mm-dd.log. stderr_-mm-dd.log. stdout_-mm-dd.log. admin.-mm-dd.log. catalina.-mm-dd.log. host-manager.-mm-dd.log. localhost.-mm-dd.log. manager.-mm-dd.log. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat threads
scalable also seems to be a relative term here, and there are well documented strategies for scalability. So, the question is, are you just looking for strategies for scalability or do you have a real problem with load? -Original Message- From: Bharath Vasudevan [mailto:bharath@gmail.com] Sent: Tuesday, March 02, 2010 6:43 PM To: Tomcat Users List Subject: Re: Tomcat threads Why is it illlogical? Fast is a relative term. If the number of requests increases, the number of threads that can be handled by the system goes down . The context switches and the pain to handle the switches makes handling of the requests in lesser threads which is scalable. On Tue, Mar 2, 2010 at 4:34 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Bharath Vasudevan [mailto:bharath@gmail.com] Subject: Re: Tomcat threads If we get a request on a thread, let some other thread do the work for it and store the response info. The thread which does the work writes the response on that request. If the processing is fast, why would you go to the complexity and overhead of switching to another thread to process the request? You should also read the servlet spec, in particular SRV.2.3.3.3: Implementations of the request and response objects are not guaranteed to be thread safe. This means that they should only be used within the scope of the request handling thread. References to the request and response objects should not be given to objects executing in other threads as the resulting behavior may be nondeterministic. If the thread created by the application uses the container-managed objects, such as the request or response object, those objects must be accessed only within the servlet's service life cycle and such thread itself should have a life cycle within the life cycle of the servlet's service method because accessing those objects after the service method ends may cause undeterministic problems. The illogical behavior you're asking for simply isn't allowed. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat generate empty 0 kb logs
What is your logging level set to? -Original Message- From: Miriam esteve [mailto:miesvesa...@gmail.com] Sent: Wednesday, March 03, 2010 7:20 AM To: Tomcat Users List Subject: Re: Tomcat generate empty 0 kb logs The log size are 0 kb because are empty, I start, stop and all can I do, and the logs are empty allways. 2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com These may not be as empty as they appear. For example. Startup Tomcat and, once up, open the catalina log file... Windows may not be reporting their actual size. However, shutdown Tomcat and you will usually see the size update. -Original Message- From: Miriam esteve [mailto:miesvesa...@gmail.com] Sent: Wednesday, March 03, 2010 5:52 AM To: users@tomcat.apache.org Subject: Tomcat generate empty 0 kb logs O/s Windows Vista jdk1.5.0_22 TOMCAT 5.5.28 My problem is that Tomcat that I have installed as a server in Windows only create empty (0 Kb) Logs Files. I have searched in all system, in windows events logs, and of course in tomcat/logs/ but there is nothing!! Someone knows why?? I have every time I start tomcat a new 0kb log file for all of this: jakarta_service_-mm-dd.log. stderr_-mm-dd.log. stdout_-mm-dd.log. admin.-mm-dd.log. catalina.-mm-dd.log. host-manager.-mm-dd.log. localhost.-mm-dd.log. manager.-mm-dd.log. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: check number of http connection in tomcat
and that any people here who have actually used it are probably over 50 years old. And you know that after 35, it is downhill all the way : you start forgetting things and so on. Hey... I resemble that remark! They always say that the 2nd thing to go is memory. I don't remember what the first one is! -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Wednesday, March 03, 2010 2:40 AM To: Tomcat Users List Subject: Re: check number of http connection in tomcat chuikingman wrote: It is tomcat-3.3.2 in red hat linux AS4 , kernel 2.6.9 Can you take exmaple how to use manager webapp Please advice Tomcat 3.3.2 is so old that most people on this list may not even remember if there existed a manager application in it, never mind how to get it and install it and configure it under RedHat. The current released version is Tomcat 6.0. Before that, there have been Tomcat 5.5 and Tomcat 5.0 and Tomcat 4.1, at least. If you want to get help for that or any other Tomcat-related subject, I would strongly recommend that you upgrade that Tomcat to a more recent version (and probably also the Java JVM). In case the above is not clear enough : it is not that nobody here /would want/ to help you; they would if they could. But Tomcat 3.3.2 is so old that some of the people here were probably still in school when it was released, and that any people here who have actually used it are probably over 50 years old. And you know that after 35, it is downhill all the way : you start forgetting things and so on. Got it ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat generate empty 0 kb logs
So... can you get tomcat going at all, or is it just that the logs are always empty? -Original Message- From: Miriam esteve [mailto:miesvesa...@gmail.com] Sent: Wednesday, March 03, 2010 8:38 AM To: Tomcat Users List Subject: Re: Tomcat generate empty 0 kb logs my level set is Error. Redirect stdout and stderror AUTO and other question that may be help is that I can start only whit: *start tomcat5*, because startup.bat open Tomcat console but close it inmediatelly... (I obviously I can't see the log!!) 2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com What is your logging level set to? -Original Message- From: Miriam esteve [mailto:miesvesa...@gmail.com] Sent: Wednesday, March 03, 2010 7:20 AM To: Tomcat Users List Subject: Re: Tomcat generate empty 0 kb logs The log size are 0 kb because are empty, I start, stop and all can I do, and the logs are empty allways. 2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com These may not be as empty as they appear. For example. Startup Tomcat and, once up, open the catalina log file... Windows may not be reporting their actual size. However, shutdown Tomcat and you will usually see the size update. -Original Message- From: Miriam esteve [mailto:miesvesa...@gmail.com] Sent: Wednesday, March 03, 2010 5:52 AM To: users@tomcat.apache.org Subject: Tomcat generate empty 0 kb logs O/s Windows Vista jdk1.5.0_22 TOMCAT 5.5.28 My problem is that Tomcat that I have installed as a server in Windows only create empty (0 Kb) Logs Files. I have searched in all system, in windows events logs, and of course in tomcat/logs/ but there is nothing!! Someone knows why?? I have every time I start tomcat a new 0kb log file for all of this: jakarta_service_-mm-dd.log. stderr_-mm-dd.log. stdout_-mm-dd.log. admin.-mm-dd.log. catalina.-mm-dd.log. host-manager.-mm-dd.log. localhost.-mm-dd.log. manager.-mm-dd.log. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Java programm to Shutdwon the tomcat server
True...we still don't have a clue what the OP's really trying to do... -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, February 26, 2010 5:44 PM To: Tomcat Users List Subject: Re: Java programm to Shutdwon the tomcat server On 26/02/2010 18:40, Joseph Morgan wrote: And... if you are writing a java program do to this for you, such as a UI, then you'll need to essentially reverse this to start it. PID's idea to connect to the port to send the shutdown command will work for shutting it down, but to start it back up... you'll still need to do Runtime.getRuntime().exec(...) to get it going again from within the Java UI. At the risk of veering off-topic: if the OP wishes to start and stop Tomcat programmatically then they may consider the 'embedded' Tomcat method. http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/startup/Embedded.html p -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Friday, February 26, 2010 12:10 PM To: Tomcat Users List Subject: Re: Java programm to Shutdwon the tomcat server I suggest the following : I) If tomcat is running as a Windows service, then you should shut it down by stopping the Windows Service (and not by stopping down Tomcat directly). To stop the Tomcat-related Windows Service, there are two methods : a) use the Services applet of Windows (e.g. My Computer -- Manage -- Services and Applications -- Services -- Apache Tomcat 6), right-click and choose Stop service b) in a command window, use the command net stop Apache Tomcat 6 II) If Tomcat is not running as a Windows Service, but in a command window, then : a) if you have started Tomcat with the command startup.bat, then a separate command window was opened to run Tomcat. In that case, you have 2 choices to stop Tomcat : a-1) in the same window where you started Tomcat with the command startup.bat, enter the command shutdown.bat. a-2) in the command window where Tomcat is running, enter CTRL-C b) if you have started Tomcat with the command catalina.bat run, then Tomcat runs directly in the Window where you entered this command. To stop it, type CTRL-C. c) in any of the cases (a) or (b) above, the other methods indicated in the previous messages will work also. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Java programm to Shutdwon the tomcat server
Oops.. should have read the thread... I spoke too soon -Original Message- From: Joseph Morgan [mailto:joseph.mor...@ignitesales.com] Sent: Monday, March 01, 2010 7:06 AM To: Tomcat Users List; p...@pidster.com Subject: RE: Java programm to Shutdwon the tomcat server True...we still don't have a clue what the OP's really trying to do... -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, February 26, 2010 5:44 PM To: Tomcat Users List Subject: Re: Java programm to Shutdwon the tomcat server On 26/02/2010 18:40, Joseph Morgan wrote: And... if you are writing a java program do to this for you, such as a UI, then you'll need to essentially reverse this to start it. PID's idea to connect to the port to send the shutdown command will work for shutting it down, but to start it back up... you'll still need to do Runtime.getRuntime().exec(...) to get it going again from within the Java UI. At the risk of veering off-topic: if the OP wishes to start and stop Tomcat programmatically then they may consider the 'embedded' Tomcat method. http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/startup/Embedded.html p -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Friday, February 26, 2010 12:10 PM To: Tomcat Users List Subject: Re: Java programm to Shutdwon the tomcat server I suggest the following : I) If tomcat is running as a Windows service, then you should shut it down by stopping the Windows Service (and not by stopping down Tomcat directly). To stop the Tomcat-related Windows Service, there are two methods : a) use the Services applet of Windows (e.g. My Computer -- Manage -- Services and Applications -- Services -- Apache Tomcat 6), right-click and choose Stop service b) in a command window, use the command net stop Apache Tomcat 6 II) If Tomcat is not running as a Windows Service, but in a command window, then : a) if you have started Tomcat with the command startup.bat, then a separate command window was opened to run Tomcat. In that case, you have 2 choices to stop Tomcat : a-1) in the same window where you started Tomcat with the command startup.bat, enter the command shutdown.bat. a-2) in the command window where Tomcat is running, enter CTRL-C b) if you have started Tomcat with the command catalina.bat run, then Tomcat runs directly in the Window where you entered this command. To stop it, type CTRL-C. c) in any of the cases (a) or (b) above, the other methods indicated in the previous messages will work also. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Java programm to Shutdwon the tomcat server
You can send any system command through a Java program. Are you developing or working with some kind of management tool and you want to know how to program it to stop Tomcat??? It depends on if you are running tomcat as a service or not, but either way, you're going send your commands from java through code looking something like this: Runtime.getRuntime().exec(command to shut down tomcat); Or one of the exec variants, depending on what you need to do. -Original Message- From: dBenjamin [mailto:d...@mail.com] Sent: Thursday, February 25, 2010 10:30 PM To: users@tomcat.apache.org Subject: Java programm to Shutdwon the tomcat server Thanks for helping developers… Can you please help me I am facing problem to shutdown the tomcat server in windows platform (xp, vista, windows7). if you click CTRL+ C in the tomcat console window, server getting shutdown. Like that is any specific command to send through java program to shutdown the tomcat server. -- View this message in context: http://old.nabble.com/Java-programm-to-Shutdwon-the-tomcat-server-tp27714568p27714568.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Java programm to Shutdwon the tomcat server
Even better! -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, February 26, 2010 8:00 AM To: users@tomcat.apache.org Subject: Re: Java programm to Shutdwon the tomcat server On 26/02/2010 12:59, Joseph Morgan wrote: You can send any system command through a Java program. Are you developing or working with some kind of management tool and you want to know how to program it to stop Tomcat??? It depends on if you are running tomcat as a service or not, but either way, you're going send your commands from java through code looking something like this: Runtime.getRuntime().exec(command to shut down tomcat); Or one of the exec variants, depending on what you need to do. Or just connect to the appropriate port, and send the shutdown command. p -Original Message- From: dBenjamin [mailto:d...@mail.com] Sent: Thursday, February 25, 2010 10:30 PM To: users@tomcat.apache.org Subject: Java programm to Shutdwon the tomcat server Thanks for helping developers… Can you please help me I am facing problem to shutdown the tomcat server in windows platform (xp, vista, windows7). if you click CTRL+ C in the tomcat console window, server getting shutdown. Like that is any specific command to send through java program to shutdown the tomcat server. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Java programm to Shutdwon the tomcat server
And... if you are writing a java program do to this for you, such as a UI, then you'll need to essentially reverse this to start it. PID's idea to connect to the port to send the shutdown command will work for shutting it down, but to start it back up... you'll still need to do Runtime.getRuntime().exec(...) to get it going again from within the Java UI. -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Friday, February 26, 2010 12:10 PM To: Tomcat Users List Subject: Re: Java programm to Shutdwon the tomcat server I suggest the following : I) If tomcat is running as a Windows service, then you should shut it down by stopping the Windows Service (and not by stopping down Tomcat directly). To stop the Tomcat-related Windows Service, there are two methods : a) use the Services applet of Windows (e.g. My Computer -- Manage -- Services and Applications -- Services -- Apache Tomcat 6), right-click and choose Stop service b) in a command window, use the command net stop Apache Tomcat 6 II) If Tomcat is not running as a Windows Service, but in a command window, then : a) if you have started Tomcat with the command startup.bat, then a separate command window was opened to run Tomcat. In that case, you have 2 choices to stop Tomcat : a-1) in the same window where you started Tomcat with the command startup.bat, enter the command shutdown.bat. a-2) in the command window where Tomcat is running, enter CTRL-C b) if you have started Tomcat with the command catalina.bat run, then Tomcat runs directly in the Window where you entered this command. To stop it, type CTRL-C. c) in any of the cases (a) or (b) above, the other methods indicated in the previous messages will work also. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet takes up too much memory that is never released
I doubt this is due to code-size actually causing this, and suspect the servlet is filling up memory with data. Can you check the servlet code for a large data load and optimize that loading per request? -Original Message- From: Torsten [mailto:twisted2...@yahoo.de] Sent: Friday, February 19, 2010 9:14 AM To: users@tomcat.apache.org Subject: Servlet takes up too much memory that is never released Hi, I have a HTTPServlet that takes up a lot of memory. The servlet is initialized when its web page is opened for the first time. Then, memory consumption of the tomcat process rises by up to 400MB. This amount of memory is never released again, then, even though the servlet's web page is not accessed anymore and there is no activity in the servlet anymore. I wonder what I can do to make Tomcat unload my servlet after usage automatically. I read in the specs that the decision when a servlet is being unloaded by calling its destroy() method is up to the servlet container. However, it does not seem to unload a servlet at all, even though the complete process becomes very slow and all other servlets running inside the container are affected. Any ideas? Thanks a lot! __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: download a small file from tomcat server
Albert, This is a topic for a web programming forum, not a Tomcat forum. In the meantime, just copy the file to your local machine, create an HTML page with a link to the file, and test your JS. If in tomcat, stick the file in the tomcat root, create an HTML page with a link to the file, and then hit tomcat to test your JS. -Original Message- From: albertkao [mailto:albertk...@gmail.com] Sent: Friday, February 12, 2010 8:55 AM To: users@tomcat.apache.org Subject: download a small file from tomcat server I like to download a small file (C:\dir1\data.txt) from tomcat server to my local machine which is running a Prototype javascript. How to do that? Any sample code or tutorial? -- View this message in context: http://old.nabble.com/download-a-small-file-from-tomcat-server-tp2756475 8p27564758.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: download a small file from tomcat server
Go to the sun forums, sign up there, and then proceed to the correct area and ask your questions there. What you are asking is all very primitive programming, and many there will be able to give you answers. As a friendly hint, some out there are very abrasive towards these kinds of questions, as just about any reasonable search on JSP, DB, and server push (comet) will wield about 100 tutorials. Joe -Original Message- From: albertkao [mailto:albertk...@gmail.com] Sent: Friday, February 12, 2010 10:21 AM To: users@tomcat.apache.org Subject: RE: download a small file from tomcat server Joseph Morgan-2 wrote: Albert, This is a topic for a web programming forum, not a Tomcat forum. In the meantime, just copy the file to your local machine, create an HTML page with a link to the file, and test your JS. If in tomcat, stick the file in the tomcat root, create an HTML page with a link to the file, and then hit tomcat to test your JS. -Original Message- From: albertkao [mailto:albertk...@gmail.com] Sent: Friday, February 12, 2010 8:55 AM To: users@tomcat.apache.org Subject: download a small file from tomcat server I like to download a small file (C:\dir1\data.txt) from tomcat server to my local machine which is running a Prototype javascript. How to do that? Any sample code or tutorial? -- View this message in context: http://old.nabble.com/download-a-small-file-from-tomcat-server-tp2756475 8p27564758.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org What is the proper forum to ask the question? The goal is to refresh a JSP web page on a web browser when the Apache Derby DB database on the server is changed. The rate of database change is 1-10 times per hour. The record size is about 1000 bytes. The user use the browser to modify the data and write back to the Apache Derby DB database. The web server is tomcat. I am thinking of comet programming - pushing data from the server to client when the Derby DB is changed. Is that a good idea? How to do that with javascript or java? Any sample code or tutorial? -- View this message in context: http://old.nabble.com/download-a-small-file-from-tomcat-server-tp2756475 8p27565937.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JSP Page hangs... clues?
And... as most are coming around to... we think you need to examine the 900lb gorilla in the room: the code. I've seen a certain web browser get hold of some badly-written script or something, spend *minutes* blowing up to a huge size while running 100% of CPU the whole time with the UI completely unresponsive There are many bad results that can produce this, such as entity recursion, XML x-Ref, XSS, etc., so depending upon how the code produces the actual result, you cannot know. I still think that, since it runs the first time, then fails on the next or next subsequent hit, that something is 1) Caching and 2) Ignoring exceptions (as was previously suggested). To ignore an OutOfMemory error, the code needs to be written something like this: try { ... } catch (Throwable t) {} However, Throwable can be replaced with any of Error or VirtualMachineError or OutOfMemoryError. try { ... } catch (Exception e) {} won't work to catch an OutOfMemory error, because they are not in the same class hierarchy. Since you are getting nothing in the logs, I suspect there is a try { ... } catch (Throwable t) {} somewhere effectively hiding the error. That is, the code block following the catch may not be empty, but contains nothing that signals that something bad has happened, such as writing to the logs. -Original Message- From: Mark H. Wood [mailto:mw...@iupui.edu] Sent: Thursday, February 11, 2010 9:30 AM To: users@tomcat.apache.org Subject: Re: JSP Page hangs... clues? On Wed, Feb 10, 2010 at 12:26:42PM -0800, Jordan Michaels wrote: Yeah, it's hanging permanently. We've let it sit there for what... 15 mins or so? Which should be plenty since no one is using it right now except us. Maybe, maybe not. Did you monitor CPU and memory utilization, I/O load and I/O wait time on the server during one of these spells? I've seen a certain web browser get hold of some badly-written script or something, spend *minutes* blowing up to a huge size while running 100% of CPU the whole time with the UI completely unresponsive, then give all that memory back and continue as if nothing had happend. Maybe you've found a way to do something similar with Tomcat, but it takes 16 minutes to cycle. Just waiting until you think it's been long enough is not a very strong test. What's it doing while you wait? is a question you need to consider. -- Mark H. Wood, Lead System Programmer mw...@iupui.edu Friends don't let friends publish revisable-form documents. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Deploying
Telles, It depends on what you deployed, where, and the configurations of the app or apps. If you have the Manager application, use that to tell you quickly which apps are not started. There is a logs folder in the tomcat installation. You might want to take a look at all of them to give you hints as to what is not working. -Original Message- From: Telles Nobrega [mailto:tellesnobr...@gmail.com] Sent: Wednesday, February 10, 2010 10:48 AM To: users@tomcat.apache.org Subject: Deploying Im working with some webapp, and they were suppose to be running on tomcat, i got all together, put it all into the webapp folder, some worker, some didnt. can anyone explain the reason for that? -- -- Telles Mota Vidal Nobrega Undergraduated in Computer Science at Federal Univesity of Campina Grade (UFCG) Ex-Member of Ourgrid Team - www.ourgrid.org Member of SegHidro2 Team - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JSP Page hangs... clues?
Jordan, It sounds to me like a memory issue as well, but you should see an OutOfMemory error in the logs, or so I would think. Is the page (or the actions within it) caching anything in the context or session? Joe -Original Message- From: Jordan Michaels [mailto:jor...@viviotech.net] Sent: Wednesday, February 10, 2010 1:53 PM To: users@tomcat.apache.org Subject: JSP Page hangs... clues? We have an interesting situation and I'm wondering if anyone has any ideas on where we could look for possible solutions. We have a JSP page that performs a large mysql query of product titles (just the names). The list is then spit out on the page with drill-down links. Pretty simple really. The problem is that just after a tomcat restart, the first and occasionally the second and third requests will process all the way just fine, but most subsequent requests will hang on a random record. Occasionally one will go all the way through, but most will hang. Let me clarify, we restart tomcat, hit the page, and the page loads fine. We hit refresh once or twice, and the page will fail to load fully. The page will hang after a random product title and just stop responding. You can click on any other page on the site, but this one page with the large product listing query hangs in random spots. We've studied this intently. The server this is running on is a CentOS 4, 32-bit box with 1.5 GB RAM, Apache 2, and mod_jk. Our first thought was memory issues. We increased Tomcat's memory using the setenv.sh file, which now contains the following line: JAVA_OPTS=-Xms128m -Xmx1024m -Xss256m -XX:MaxPermSize=256m ; export JAVA_OPTS We've verified that the settings are in place by using the ps ax command and making sure the java process includes the updated settings. Unfortunately, this seems to have no effect at all. We then reviewed the logs: catalina.out, mod_jk.log, and apache's error_log, among others. We monitored these logs using tail so we could see if any errors were thrown as we hit the page. No errors were thrown if the request went through good or it failed. The logs were completely quiet. We've updated Tomcat, mod_jk, the JVM, and the MySQL driver to the absolute latest versions available as of this writing. Does anyone have any clues as to where we might look for what is happening to make this one page hang? It still feels like a memory issue, but with nothing in the logs and no indicators other then the problem itself, we'd appreciate any suggestions on what to look for at this point. Thank you in advance! -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Railo Community Distributions - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JSP Page hangs... clues?
Depends on if your machine can handle the memory load of everything on it. Is it hanging indefinitely... ie., does it ever come back?? I also suspect that you've verified that Tomcat is actually hanging and it's not just that the browser is, for some reason, not displaying everything. That is, have you hit the page with something like Curl to be sure?? What I'm getting at is that I'm really good at causing Tomcat to run out of memory, but I always get the error dump in the logs. -Original Message- From: Jordan Michaels [mailto:jor...@viviotech.net] Sent: Wednesday, February 10, 2010 2:12 PM To: Tomcat Users List Subject: Re: JSP Page hangs... clues? Hey Joseph, Honestly I'm not sure about the code. We didn't write the code for it and I haven't dug around in that part of it because the first few requests seem to go through without a hitch. We doubled the Xmx value from 512 to 1024 and added the MaxPermSize so I've been going under the impression that if those were part of the problem that I should be able to pull at least a few more hits out of the page, right? Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Railo Community Distributions Joseph Morgan wrote: Jordan, It sounds to me like a memory issue as well, but you should see an OutOfMemory error in the logs, or so I would think. Is the page (or the actions within it) caching anything in the context or session? Joe -Original Message- From: Jordan Michaels [mailto:jor...@viviotech.net] Sent: Wednesday, February 10, 2010 1:53 PM To: users@tomcat.apache.org Subject: JSP Page hangs... clues? We have an interesting situation and I'm wondering if anyone has any ideas on where we could look for possible solutions. We have a JSP page that performs a large mysql query of product titles (just the names). The list is then spit out on the page with drill-down links. Pretty simple really. The problem is that just after a tomcat restart, the first and occasionally the second and third requests will process all the way just fine, but most subsequent requests will hang on a random record. Occasionally one will go all the way through, but most will hang. Let me clarify, we restart tomcat, hit the page, and the page loads fine. We hit refresh once or twice, and the page will fail to load fully. The page will hang after a random product title and just stop responding. You can click on any other page on the site, but this one page with the large product listing query hangs in random spots. We've studied this intently. The server this is running on is a CentOS 4, 32-bit box with 1.5 GB RAM, Apache 2, and mod_jk. Our first thought was memory issues. We increased Tomcat's memory using the setenv.sh file, which now contains the following line: JAVA_OPTS=-Xms128m -Xmx1024m -Xss256m -XX:MaxPermSize=256m ; export JAVA_OPTS We've verified that the settings are in place by using the ps ax command and making sure the java process includes the updated settings. Unfortunately, this seems to have no effect at all. We then reviewed the logs: catalina.out, mod_jk.log, and apache's error_log, among others. We monitored these logs using tail so we could see if any errors were thrown as we hit the page. No errors were thrown if the request went through good or it failed. The logs were completely quiet. We've updated Tomcat, mod_jk, the JVM, and the MySQL driver to the absolute latest versions available as of this writing. Does anyone have any clues as to where we might look for what is happening to make this one page hang? It still feels like a memory issue, but with nothing in the logs and no indicators other then the problem itself, we'd appreciate any suggestions on what to look for at this point. Thank you in advance! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JSP Page hangs... clues?
Now I'm thinking request timeout.. but that would happen on all requests, right? Unfortunately, Mark Thomas' approach might be the way and I don't envy you for a second that you'll be walking that road! -Original Message- From: Jordan Michaels [mailto:jor...@viviotech.net] Sent: Wednesday, February 10, 2010 2:27 PM To: Tomcat Users List Subject: Re: JSP Page hangs... clues? Yeah, it's hanging permanently. We've let it sit there for what... 15 mins or so? Which should be plenty since no one is using it right now except us. Yeah, I know what you mean about the logs too. I'm very familiar with that happening and how to address it, but this time there's nothing in the logs at all. Makes it really hard to diagnose. =( And yeah, I'm sure it's something server-side. I should have mentioned it in the first post, but we watched the traffic between the browser (several browsers actually) and the server and it was all the same. The browser would perform the request, the server would respond with part of the page (with send/ack's all throughout) and at the very end the browser would send a okay, I got that last packet message but the server won't send anything else. Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Railo Community Distributions Joseph Morgan wrote: Depends on if your machine can handle the memory load of everything on it. Is it hanging indefinitely... ie., does it ever come back?? I also suspect that you've verified that Tomcat is actually hanging and it's not just that the browser is, for some reason, not displaying everything. That is, have you hit the page with something like Curl to be sure?? What I'm getting at is that I'm really good at causing Tomcat to run out of memory, but I always get the error dump in the logs. -Original Message- From: Jordan Michaels [mailto:jor...@viviotech.net] Sent: Wednesday, February 10, 2010 2:12 PM To: Tomcat Users List Subject: Re: JSP Page hangs... clues? Hey Joseph, Honestly I'm not sure about the code. We didn't write the code for it and I haven't dug around in that part of it because the first few requests seem to go through without a hitch. We doubled the Xmx value from 512 to 1024 and added the MaxPermSize so I've been going under the impression that if those were part of the problem that I should be able to pull at least a few more hits out of the page, right? Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Railo Community Distributions Joseph Morgan wrote: Jordan, It sounds to me like a memory issue as well, but you should see an OutOfMemory error in the logs, or so I would think. Is the page (or the actions within it) caching anything in the context or session? Joe -Original Message- From: Jordan Michaels [mailto:jor...@viviotech.net] Sent: Wednesday, February 10, 2010 1:53 PM To: users@tomcat.apache.org Subject: JSP Page hangs... clues? We have an interesting situation and I'm wondering if anyone has any ideas on where we could look for possible solutions. We have a JSP page that performs a large mysql query of product titles (just the names). The list is then spit out on the page with drill-down links. Pretty simple really. The problem is that just after a tomcat restart, the first and occasionally the second and third requests will process all the way just fine, but most subsequent requests will hang on a random record. Occasionally one will go all the way through, but most will hang. Let me clarify, we restart tomcat, hit the page, and the page loads fine. We hit refresh once or twice, and the page will fail to load fully. The page will hang after a random product title and just stop responding. You can click on any other page on the site, but this one page with the large product listing query hangs in random spots. We've studied this intently. The server this is running on is a CentOS 4, 32-bit box with 1.5 GB RAM, Apache 2, and mod_jk. Our first thought was memory issues. We increased Tomcat's memory using the setenv.sh file, which now contains the following line: JAVA_OPTS=-Xms128m -Xmx1024m -Xss256m -XX:MaxPermSize=256m ; export JAVA_OPTS We've verified that the settings are in place by using the ps ax command and making sure the java process includes the updated settings. Unfortunately, this seems to have no effect at all. We then reviewed the logs: catalina.out, mod_jk.log, and apache's error_log, among others. We monitored these logs using tail so we could see if any errors were thrown as we hit the page. No errors were thrown if the request went through good or it failed. The logs were completely quiet. We've updated Tomcat, mod_jk, the JVM, and the MySQL driver to the absolute latest versions available as of this writing. Does anyone
RE: jsp compilation fails depending on how WEB-INF classes are build
Fabian, This looks almost certainly like you are compiling with two different versions of the JDK. Spit out the version from the OS and compare that to the version set for Eclipse and Ant. Joe -Original Message- From: Fabian Panthen [mailto:f...@unitb-consulting.de] Sent: Monday, February 08, 2010 7:30 AM To: users@tomcat.apache.org Subject: jsp compilation fails depending on how WEB-INF classes are build Hello, not sure whether here is the right place to post, but i give it a shot... I have a webapp with JSP's using some classes from WEB-INF/classes in a declaration block (%!%), running in tomcat 6 on jdk1.6.0_14. The problem is such, if I compile the classes in WEB-INF/classes using eclipse Galileo everything runs fine. But if I compile those same classes using ANT, jsp comilation in tomcat fails with the following stack trace: org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.init(ClassFileReader.java:342) at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:206) at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:178) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:122) at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:178) at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2101) at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:69) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:134) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypeFor(SourceTypeBinding.java:1273) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields(SourceTypeBinding.java:604) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:582) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:431) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:616) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:392) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:429) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) This happens as well under tomcat 5.5. Changing the ANT build to use the same JDT compiler as eclipse did not change the problem. Using javap I checked both compiled versions of the classes and they do have the same major version. Any hint towards what might be the problem here is greatly appreciated. Thanks a lot, fabian -- u n i t b c o n s u l t i n g Brunnenstr. 156 10115 Berlin Tel:+49 [0]30 44 31 92 00 Fax:+49 [0]30 44 31 92 29 Mail: off...@unitb-consulting.de Web:http://www.unitb-consulting.de Geschäftsführer: Nico Adam, Thomas Timm Registergericht: AG Berlin-Charlottenburg - HRB 113607 Steuernummer: 37/249/21073 Ust-IdNr.: DE814984825 Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte Informationen enthalten.
RE: jsp compilation fails depending on how WEB-INF classes are build
I would think so, but there really has to be different versions somehow... I'm lost for ideas now. -Original Message- From: Fabian Panthen [mailto:f...@unitb-consulting.de] Sent: Monday, February 08, 2010 9:00 AM To: Tomcat Users List Subject: Re: jsp compilation fails depending on how WEB-INF classes are build Joseph Morgan schrieb: Fabian, This looks almost certainly like you are compiling with two different versions of the JDK. Spit out the version from the OS and compare that to the version set for Eclipse and Ant. Joe I thougth so, too. But checked this... java -version java version 1.6.0_14 Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode) echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_14 ant -diagnostics ... --- System properties --- java.runtime.name : Java(TM) SE Runtime Environment sun.boot.library.path : C:\Program Files\Java\jdk1.6.0_14\jre\bin java.vm.version : 14.0-b16 ... and eclipse is using that same jre6 for compilation so tomcat should einther have a problem with clase compiled by either one of them or with none, right? -- u n i t b c o n s u l t i n g Brunnenstr. 156 10115 Berlin Tel:+49 [0]30 44 31 92 00 Fax:+49 [0]30 44 31 92 29 Mail: off...@unitb-consulting.de Web:http://www.unitb-consulting.de Geschäftsführer: Nico Adam, Thomas Timm Registergericht: AG Berlin-Charlottenburg - HRB 113607 Steuernummer: 37/249/21073 Ust-IdNr.: DE814984825 Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: jsp compilation fails depending on how WEB-INF classes are build
There is an Ig-Nobel prize waiting to be atributed, if one can ever identify the guy who came up with that idea first. You mean it wasn't Bill??? :-) -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, February 08, 2010 10:20 AM To: Tomcat Users List Subject: Re: jsp compilation fails depending on how WEB-INF classes are build Mikolaj Rydzewski wrote: Fabian Panthen wrote: echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_14 I don't think that's the case, but... There're a lot howtos that encourage Windows users not to use paths-with-spaces for Java programs (Tomcat, ant, JDK itself, etc.). +1. I would even leave out the word Windows and anything after paths-with-spaces above. There is an Ig-Nobel prize waiting to be atributed, if one can ever identify the guy who came up with that idea first. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Viewing JSP's compiled code
Fred, there is a directory under the tomcat directory called work. Follow that structure through to the end.. it will be different depending on your apps, but it starts out with work-Catalina-{host}-{app}-org-apache-jsp, and even more if you have jsp's within sub-directories. You should see the generated java and class files there. -Original Message- From: fred basset [mailto:fredbasset1...@gmail.com] Sent: Friday, January 29, 2010 10:54 AM To: Tomcat Users List Subject: Viewing JSP's compiled code Hi All, Simple question, how do I keep and view the source code generated when a JSP is compiled? Thanks, Fred - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Viewing JSP's compiled code
A really poor man's way of doing this is to add a getXXX in ps class that calls The java function and returns the value. Then, you could just write something like: ${p.XXX} Replacing XXX with the name of the function. -Original Message- From: fred basset [mailto:fredbasset1...@gmail.com] Sent: Friday, January 29, 2010 11:07 AM To: Tomcat Users List Subject: Re: Viewing JSP's compiled code Thanks, found it. What I am trying to do is access a variable from a forEach loop. In the example below I want to call a java function to do some calculations on each p variable in the loop and output the results of the calculation in the table. How do I do this? tbody c:forEach var=p items=${model.projects} tr td class=zLargediv class=StdTableDataLefta href=editproject.html?id=${p.id} title=Open project${p.groupName}/a/div/td td class=zSmalldiv class=StdTableData${fn:length(p.travelTimeSegments)}/div/td td class=zSmalldiv class=StdTableDataneed to call java fn on p here/div/td td class=zSmalldiv class=StdTableData${p.modifyTime}/div/td /tr /c:forEach /tbody On Fri, Jan 29, 2010 at 8:57 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: fred basset [mailto:fredbasset1...@gmail.com] Subject: Viewing JSP's compiled code Simple question, how do I keep and view the source code generated when a JSP is compiled? Look in Tomcat's work directory - several levels deep, organized by webapp name. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Viewing JSP's compiled code
If the basic functions are there, you can do something like: c:set var=result value=${p.xxx + p.yyy / p.zzz}/ And then use: ${result} -Original Message- From: fred basset [mailto:fredbasset1...@gmail.com] Sent: Friday, January 29, 2010 11:47 AM To: Tomcat Users List Subject: Re: Viewing JSP's compiled code Yeah I would do this but the p in this case is a class auto generated by Hibernate, and I don't know yet if it's possible to customize those auto generated classes (but I'm going to find out). On Fri, Jan 29, 2010 at 9:18 AM, Joseph Morgan joseph.mor...@ignitesales.com wrote: A really poor man's way of doing this is to add a getXXX in ps class that calls The java function and returns the value. Then, you could just write something like: ${p.XXX} Replacing XXX with the name of the function. -Original Message- From: fred basset [mailto:fredbasset1...@gmail.com] Sent: Friday, January 29, 2010 11:07 AM To: Tomcat Users List Subject: Re: Viewing JSP's compiled code Thanks, found it. What I am trying to do is access a variable from a forEach loop. In the example below I want to call a java function to do some calculations on each p variable in the loop and output the results of the calculation in the table. How do I do this? tbody c:forEach var=p items=${model.projects} tr td class=zLargediv class=StdTableDataLefta href=editproject.html?id=${p.id} title=Open project${p.groupName}/a/div/td td class=zSmalldiv class=StdTableData${fn:length(p.travelTimeSegments)}/div/td td class=zSmalldiv class=StdTableDataneed to call java fn on p here/div/td td class=zSmalldiv class=StdTableData${p.modifyTime}/div/td /tr /c:forEach /tbody On Fri, Jan 29, 2010 at 8:57 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: fred basset [mailto:fredbasset1...@gmail.com] Subject: Viewing JSP's compiled code Simple question, how do I keep and view the source code generated when a JSP is compiled? Look in Tomcat's work directory - several levels deep, organized by webapp name. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Data Binding in JSP
Keep in mind the overall architecture. The user is actually using an HTML page containing HTML fields. The browser (nor the HTML) has no actual knowledge of the DB or any binding or ORM you have on your server. So, on the server side, you have 2 primary components; servlets for validating and processing the incoming page data and jsps for dynamically generating the HTML form for the user's consumption and use. This is a standard development pattern, and many ORMs exist (read up on Hibernate) for helping with the data, and many frameworks exist for helping with the control architecture (see Struts and Spring). In the middle of it all, you should have a nice set of POJOs for holding this data. The servlets can send populate these POJOs to the JSPs for inclusion in the HTML output. So, the question really becomes, what are you missing? -Original Message- From: jithu mada [mailto:jithu.m...@gmail.com] Sent: Sunday, January 24, 2010 6:28 PM To: Tomcat Users List Subject: Data Binding in JSP Hi, I need suggestion on how to do Data binding in JSP's? I have a requirement, which is to display the table data and the user can add,update or delete the data to it. I am using and JSP's and Servlets. I was searching online to find if there are any data binding frameworks available which I can use, so that when the user modifies the table data, I can bind it directly to the java beans. But only thing I found was displaying data, pagination and sorting. I couldn't find much info on binding the modified data. If you have done something similar before of have any suggestions, please send it to me. thanks, Jithu - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Securing Tomcat Applications from Reverse Engineering
http://proguard.sourceforge.net/ -Original Message- From: Kranti(tm) K K Parisa [mailto:kranti.par...@gmail.com] Sent: Thursday, January 21, 2010 5:05 AM To: Tomcat Users List Subject: Securing Tomcat Applications from Reverse Engineering Hi, Can anyone throw some light on this topic, seems it is possible to convert the tomcat+tomcat web applications to native code to secure them and further to run them on client machines easily. Please check this. http://www.excelsior-usa.com/jetinternals.html How could we achieve this without the above tool? Because the pricing of the above tool is very costly. Looking forward to hear some ideas for this. http://www.excelsior-usa.com/jetinternals.html Best Regards, Kranti K K Parisa - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tips on tracking down memory leaks
Greg, you've just awakened a 900 lb gorilla! My guess, based upon your description of the problem as large chunks at a time, is something related to reading and caching data, and this is why PMD and profiling tools won't help. Therefore, look at all the code accessing data from whatever storage you use (DB, File?), and find out where that data flows. I'd also guess is that someone is storing data in the context, maybe as a cache, or just because they don't know any better. So search for setAttribute calls in the code and trace the associated object. If that object points to the servlet context, then mark it as a candidate. This could be complicated by JSPs (if you are using them), because they could be storing data within the application scope within JSP pages (very bad practice, but very widely used). Also check out tag libraries, because it can be done there too. Check your session timeout to make sure it isn't too high (however, you did say it isn't slow growth, but check anyway). However, we could literally guess all day long, as there are dozens of ways code can eat up memory. Joe -Original Message- From: Greg McCane [mailto:gregmcc...@yahoo.ca] Sent: Monday, January 11, 2010 8:33 PM To: users@tomcat.apache.org Subject: Tips on tracking down memory leaks Hi Everyone, I am running tomcat 5.5 on Debian Linux (uname says Linux 2.6.26-2-amd64, /etc/debian_version says 5.0.2). The JVM version is 1.5.0_14-b03. We have 9 servlets running. The tomcat process itself is managed by monit. We see tomcat memory usage growing over time and have set monit to automatically restart it (using the /etc/init.d/tomcat5.5 startup script) when memory usage reaches 2.8 GB. It takes about 20 hours to get to this point. This is an attempt to avoid a tomcat crash/hang resulting in an outage for our users. The memory growth appears to be in large chunks rather than slow, steady growth. We have turned on incremental garbage collection with the following options: -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:+CMSIncrementalDutyCycle=10 -XX:-TraceClassUnloading -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled The JVM heap size is set with: -Xmx3072M -Xms1024M We have checked our code using pmd and have profiled it using TPT and Eclipse in our development environment. We have made improvements as a result of the findings from these tools, but we are still having problems. Any suggestions for next steps to help us get to the root cause of this problem? Thanks, Greg __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Exception in localhost file
Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet SwchServlet threw exception java.lang.ArrayIndexOutOfBoundsException There is no clue as to why this might be happening. False, that IS the clue. SwchServlet code is using an index into an array (or something ultimately treated as an array) and simply stepping outside the bounds. Is the code using a logger? Check how that is used/configured, as that might be why you're not seeing a full stack trace. Someone may have written code to trap an exception and then issue their own message. -Original Message- From: Mohit Anchlia [mailto:mohitanch...@gmail.com] Sent: Monday, January 11, 2010 8:10 PM To: Tomcat Users List Subject: Exception in localhost file tomcat 6: I am seeing following exception in localhost file with no stack trace. There is no clue as to why this might be happening. How do I get the full stack trace to narrow down the problem? We also have our application log where our application specific exceptions get logged with full stack trace but this is not being logged there. Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet SwchServlet threw exception java.lang.ArrayIndexOutOfBoundsException - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Exception in localhost file
This isn't a Tomcat issue at all, just code in SwchServlet behaving badly or getting unexpected data. -Original Message- From: Mohit Anchlia [mailto:mohitanch...@gmail.com] Sent: Tuesday, January 12, 2010 9:58 AM To: Tomcat Users List Subject: Re: Exception in localhost file There seems to be no code. This is logging properties. I am not sure why the exception is not getting logged. I do have application specific log4j.xml but that's only for application logs that is working fine. #org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].handlers = 4admin.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 5host-manager.org.apache.juli.FileHandler On Tue, Jan 12, 2010 at 5:29 AM, Joseph Morgan joseph.mor...@ignitesales.com wrote: Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet SwchServlet threw exception java.lang.ArrayIndexOutOfBoundsException There is no clue as to why this might be happening. False, that IS the clue. SwchServlet code is using an index into an array (or something ultimately treated as an array) and simply stepping outside the bounds. Is the code using a logger? Check how that is used/configured, as that might be why you're not seeing a full stack trace. Someone may have written code to trap an exception and then issue their own message. -Original Message- From: Mohit Anchlia [mailto:mohitanch...@gmail.com] Sent: Monday, January 11, 2010 8:10 PM To: Tomcat Users List Subject: Exception in localhost file tomcat 6: I am seeing following exception in localhost file with no stack trace. There is no clue as to why this might be happening. How do I get the full stack trace to narrow down the problem? We also have our application log where our application specific exceptions get logged with full stack trace but this is not being logged there. Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet SwchServlet threw exception java.lang.ArrayIndexOutOfBoundsException - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Running two tomcat servers on same system?
Ok then, Dean, why the two entirely different app servers instead of just two different applications in the same server? You stated two primary goals: 1) Separate public/private apps and 2) Not have them interfere with one another. A 10 hit a month app isn't going to interfere with anything unless those hits require a huge burden of processing. With that said, running it within a different Tomcat instance within the same machine isn't going to solve the problem. -Original Message- From: Dean Chester [mailto:dean.g.ches...@googlemail.com] Sent: Thursday, January 07, 2010 3:57 PM To: Tomcat Users List Subject: Re: Running two tomcat servers on same system? What is usage like on the server running two application servers. Please bare in mind my admin/private application might get 10 users a month. While the public stuff we hope more frequent. Dean On Thu, Jan 7, 2010 at 9:51 PM, John Tangney jo...@industriallogic.comwrote: Dean, On Jan 7, 2010, at 1:47 PM, Dean Chester wrote: I am wondering if it would be possible to have two tomcat servers running on the same system Yeah, we do this all the time. All you gave to do is to make sure that all the ports listed in your server.xml are unique. Also is it possible to share shutdown ports of tomcat servers? I am not sure. It's easy enough to give it a try. --johnt - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Uniqueness of a sessionId
Arnab, I've been silently following your thread (mainly because I'm not even remotely as smart as the folks out here), but it seems you have an issue of architecture, and not of Tomcat capabilities. I'm still not sure what you are doing, but it seems you want to be able to pass (and cache as a session) data between instances. Many do this with either a DB or a messaging system (which is essentially a DB app with correlation abilities). If you simply need unique IDs across contexts, you should think about setting up a service to issue those IDs. A quick hack on that would be to set up a very small app with a single service that spits back session id's. However, if those session id's need to be persistent, a DB table with a single autoincrement would suffice. -Original Message- From: Arnab Ghosh [mailto:gh...@glenwoodsystems.com] Sent: Friday, January 08, 2010 7:07 AM To: Tomcat Users List Subject: Uniqueness of a sessionId Dear Friends, I have an doubt.Tomcat is using *org.apache.catalina.session.ManagerBase* to generate sessionId. Now I wants to know whether this generated key will be unique in all context running under a tomcat service or it will be unique under a particular context?? Thanks, Ghosh - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Uniqueness of a sessionId
So, can you setup a service in A to generate all session ids for all contexts? -Original Message- From: Arnab Ghosh [mailto:gh...@glenwoodsystems.com] Sent: Friday, January 08, 2010 8:15 AM To: Tomcat Users List Subject: Re: Uniqueness of a sessionId Dear Joseph, Actually I am working on a cross-context application. There is one main application say A . It is a very big application . Now I want to create some more separate context which will reuse the context A. These other context will be very lightweight and will contain only one servlet and all request it will forward to appropriate URI of context A. While dispatching request from other context say B to A , a new session is getting created and then it is setting the JESSIONID cookie in request. Then it is forwarding the request to context B. Context B is checking the JESSIONID and creating a new session with the existing cookie. Now in this scenario, it may happen a session with that sessionId is already available in context B.(created and then forwarded by another context say C). In that case it will start using that session. So that's why I want a unique active sessionId set to maintain uniqueness of each session in context B. Thanks, Ghosh Now On Fri, Jan 8, 2010 at 7:06 PM, Joseph Morgan joseph.mor...@ignitesales.com wrote: Arnab, I've been silently following your thread (mainly because I'm not even remotely as smart as the folks out here), but it seems you have an issue of architecture, and not of Tomcat capabilities. I'm still not sure what you are doing, but it seems you want to be able to pass (and cache as a session) data between instances. Many do this with either a DB or a messaging system (which is essentially a DB app with correlation abilities). If you simply need unique IDs across contexts, you should think about setting up a service to issue those IDs. A quick hack on that would be to set up a very small app with a single service that spits back session id's. However, if those session id's need to be persistent, a DB table with a single autoincrement would suffice. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Comet and thread binding
Sounds to me you simply need to create a POJO to contain the execution context state (and definitely not static variables beyond that to support the singleton pattern). You could most simply use a HashMap, but there is a stronger argument around semantics for creating a POJO to hold that state. Then, you simply expose an interface to the POJO common to both (all) execution environments. However, comet is becoming more popular This is not so new as you might think. It was once called server push. In any case, it sounds like you are writing applets requiring a persistent connection to the web server? Don't ever forget the true beauty of a well behaved POJO, especially those that are serializable (or if you must use XML because it is sexy to do so, just use XMLEncoder). Just send the bean across the wire and go stateless! It can travel both ways. So the applet sends the bean to the server, which returns any new state within the bean to the applet. Isn't that essentially what you do in a stand-alone passing beans around? -Original Message- From: tbee [mailto:t...@tbee.org] Sent: Tuesday, January 05, 2010 5:06 AM To: users@tomcat.apache.org Subject: Comet and thread binding I often use (abuse?) the fact that a single thread is used to completely handle a request, by binding objects to the thread. Not all code down the line of a request is aware that it is running inside a web server. I have utility classes that are used in standalone applications and web application, business models that are used in both, etc. So I cannot rely on either environment being present. Furthermore I do not like passing a context (being it a request, or whatever) all the way down an execution path. So, in a standalone (swing) application I use static variables to hold certain instances, and within web applications these instances are placed in the session or application context. In order to make access to these instance uniform, I bind them to the current thread. This works fine; only when you start spawning worker threads, you need to make sure to copy the references, but it is uniform for both environments. However, comet is becoming more popular and this technique may suspend a request and freeing up the thread for reuse. This means the request may be resumed in another thread, which will screw up my bindings. So I'm losing my thread as a stable denominator... Is there anything that can uniquely identify a execution context; so in a webapp that would be the request and in a stand alone that would be a singleton. -- View this message in context: http://old.nabble.com/Comet-and-thread-binding-tp27026574p27026574.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: db jars in common/lib and shared/lib
Mohammad, Look in your Tomcat/conf/catalina.properties file. Within there you'll find a shared.loader= line, and I suspect it is empty. You'll likely want to enter a value there, such as shared.loader=${catalina.home}/shared,${catalina.home}/shared/*.jar -Original Message- From: Mohammad, Hammad Kasim Bekur [mailto:hammadkasimbekur.moham...@misys.com] Sent: Wednesday, December 09, 2009 8:01 AM To: Tomcat Users List Subject: RE: db jars in common/lib and shared/lib Tomcat: apache-tomcat-5.5.27 OS: Windows NT. Ant: 1.7 Not from OS, downloaded version. many thanks Kasim -Original Message- From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther Sent: 09 December 2009 19:07 To: Tomcat Users List Subject: Re: db jars in common/lib and shared/lib 2009/12/9 Mohammad, Hammad Kasim Bekur hammadkasimbekur.moham...@misys.com I have placed my db jars(ie db2jcc.jar, db2jcc_javax.jar and db2jcc_license_cu.jar ) in tomcat/common/lib, and started ant target to run the tomcat, server started up properly. Now I have removed these jar from common/lib and put under shared/lib, server throws an error saying couldnot load the driver. Can you please let me know why it is working when it is in common/lib and why it is not working when it is in shared/lib directory? It would help to have a few more details about your setup: Operating system? Tomcat version? The locations to put files have changed over the years. Is this Tomcat installed from http://tomcat.apache.org or is it a repackaged version that came with your operating system? - Peter Misys is the trade name for Misys plc (registered in England and Wales). Registration Number: 01360027. Registered office: One Kingdom Street, London W2 6BL, United Kingdom. For a list of Misys group operating companies please go to http://www.misys.com/corp/About_Us/misys_operating_companies.html. This email and any attachments have been scanned for known viruses using multiple scanners. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and Misys plc. Please refer to the executed contract between you and the relevant member of the Misys group for the identity of the contracting party with which you are dealing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: db jars in common/lib and shared/lib
That doesn't mean someone didn't ax it. -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Wednesday, December 09, 2009 8:09 AM To: Tomcat Users List Subject: Re: db jars in common/lib and shared/lib Joseph Morgan wrote: Mohammad, Look in your Tomcat/conf/catalina.properties file. Within there you'll find a shared.loader= line, and I suspect it is empty. You'll likely want to enter a value there, such as shared.loader=${catalina.home}/shared,${catalina.home}/shared/*.jar Nope. That is Tomcat 6. The OP is using 5.5.x Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: db jars in common/lib and shared/lib
Not required for the web app unless you are using connection pooling within tomcat. The DB drivers can be in shared. -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Wednesday, December 09, 2009 8:10 AM To: Tomcat Users List Subject: Re: db jars in common/lib and shared/lib Mohammad, Hammad Kasim Bekur wrote: I have placed my db jars(ie db2jcc.jar, db2jcc_javax.jar and db2jcc_license_cu.jar ) in tomcat/common/lib, and started ant target to run the tomcat, server started up properly. Now I have removed these jar from common/lib and put under shared/lib, server throws an error saying couldnot load the driver. Entirely as expected. Database drivers have always had to be located in common/lib so they are visible to both Tomcat internals (for connection pooling) and the web app (so it can use them). Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: db jars in common/lib and shared/lib
Kasim.. did you see Mark's note??? If you are using the connection pool under Tomcat, then the DB drivers need to be located in shared. -Original Message- From: Mohammad, Hammad Kasim Bekur [mailto:hammadkasimbekur.moham...@misys.com] Sent: Wednesday, December 09, 2009 8:14 AM To: Tomcat Users List Subject: RE: db jars in common/lib and shared/lib It verified and it as given as shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/li b/*.jar many thanks Kasim -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: 09 December 2009 19:39 To: Tomcat Users List Subject: Re: db jars in common/lib and shared/lib Joseph Morgan wrote: Mohammad, Look in your Tomcat/conf/catalina.properties file. Within there you'll find a shared.loader= line, and I suspect it is empty. You'll likely want to enter a value there, such as shared.loader=${catalina.home}/shared,${catalina.home}/shared/*.jar Nope. That is Tomcat 6. The OP is using 5.5.x Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Misys is the trade name for Misys plc (registered in England and Wales). Registration Number: 01360027. Registered office: One Kingdom Street, London W2 6BL, United Kingdom. For a list of Misys group operating companies please go to http://www.misys.com/corp/About_Us/misys_operating_companies.html. This email and any attachments have been scanned for known viruses using multiple scanners. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and Misys plc. Please refer to the executed contract between you and the relevant member of the Misys group for the identity of the contracting party with which you are dealing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: db jars in common/lib and shared/lib
Dang it... the db drivers need to be located in common/lib if being used as a source for a connection pool... Sorry for the mistake... -Original Message- From: Joseph Morgan [mailto:joseph.mor...@ignitesales.com] Sent: Wednesday, December 09, 2009 12:04 PM To: Tomcat Users List Subject: RE: db jars in common/lib and shared/lib Kasim.. did you see Mark's note??? If you are using the connection pool under Tomcat, then the DB drivers need to be located in shared. -Original Message- From: Mohammad, Hammad Kasim Bekur [mailto:hammadkasimbekur.moham...@misys.com] Sent: Wednesday, December 09, 2009 8:14 AM To: Tomcat Users List Subject: RE: db jars in common/lib and shared/lib It verified and it as given as shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/li b/*.jar many thanks Kasim -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: 09 December 2009 19:39 To: Tomcat Users List Subject: Re: db jars in common/lib and shared/lib Joseph Morgan wrote: Mohammad, Look in your Tomcat/conf/catalina.properties file. Within there you'll find a shared.loader= line, and I suspect it is empty. You'll likely want to enter a value there, such as shared.loader=${catalina.home}/shared,${catalina.home}/shared/*.jar Nope. That is Tomcat 6. The OP is using 5.5.x Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Misys is the trade name for Misys plc (registered in England and Wales). Registration Number: 01360027. Registered office: One Kingdom Street, London W2 6BL, United Kingdom. For a list of Misys group operating companies please go to http://www.misys.com/corp/About_Us/misys_operating_companies.html. This email and any attachments have been scanned for known viruses using multiple scanners. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and Misys plc. Please refer to the executed contract between you and the relevant member of the Misys group for the identity of the contracting party with which you are dealing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problems finding the right filepath
Ludwig, What is your dev language? -Original Message- From: Ludwig Magnusson [mailto:lud...@itcatapult.com] Sent: Monday, November 23, 2009 11:24 AM To: users@tomcat.apache.org Subject: Problems finding the right filepath Hello! We are a team developing a webapp running on a tomcat server. We need to list the files in a certain directory in our application, but we cannot find a way to always get the correct path on the different platforms and environments. Is this solvable through some IO-function or do we need to specify the path to our project in each environment? /Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problems finding the right filepath
Or... maybe within a initialization parameter for a servlet if you are using Java -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Monday, November 23, 2009 11:59 AM To: Tomcat Users List Subject: RE: Problems finding the right filepath From: Ludwig Magnusson [mailto:lud...@itcatapult.com] Subject: Problems finding the right filepath We are a team developing a webapp running on a tomcat server. What version of Tomcat? (Be precise.) What JVM? We need to list the files in a certain directory in our application, but we cannot find a way to always get the correct path on the different platforms and environments. Can you let the DefaultServlet do it? Directory listings are normally disabled, but you can enable them for your particular webapp if you wish Note that there is no requirement for a servlet container (e.g., Tomcat) to provide *any* access to the underlying file system (if there is one at all), other than to a scratch area for the webapp's internal use. If your webapp is deployed as a .war file, there is no file structure to look at. Is this solvable through some IO-function or do we need to specify the path to our project in each environment? You will likely need to specify the path through an environment variable, Java system property, or within the webapp Context element, via a nested Parameter or Environment setting. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problems finding the right filepath
Ludwig, it's been a while, but there used to be a function getRealPath or something very close to that on the ServletContext object where you can get a system-proper path of a resource. Have you tried that? -Original Message- From: Ludwig Magnusson [mailto:lud...@itcatapult.com] Sent: Monday, November 23, 2009 12:17 PM To: 'Tomcat Users List' Subject: RE: Problems finding the right filepath We are running Tomcat 6.0.20. The JDK is 1.6 but not the exact same version on all machines. My computer has 1.6.0.17, the server has 1.6.0.07 We are developing on both windows and mac. The server is ubuntu. To specify what I want, here is a model of my filesystem: /Tomcat-folder /conf /webapps /my-webapp /WEB-INF /web.xml /my-folder --- this is the folder I want to search If there is no specific way of solving this I can try the ones you have suggested. /Ludwig -Original Message- From: Joseph Morgan [mailto:joseph.mor...@ignitesales.com] Sent: den 23 november 2009 19:02 To: Tomcat Users List Subject: RE: Problems finding the right filepath Or... maybe within a initialization parameter for a servlet if you are using Java -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Monday, November 23, 2009 11:59 AM To: Tomcat Users List Subject: RE: Problems finding the right filepath From: Ludwig Magnusson [mailto:lud...@itcatapult.com] Subject: Problems finding the right filepath We are a team developing a webapp running on a tomcat server. What version of Tomcat? (Be precise.) What JVM? We need to list the files in a certain directory in our application, but we cannot find a way to always get the correct path on the different platforms and environments. Can you let the DefaultServlet do it? Directory listings are normally disabled, but you can enable them for your particular webapp if you wish Note that there is no requirement for a servlet container (e.g., Tomcat) to provide *any* access to the underlying file system (if there is one at all), other than to a scratch area for the webapp's internal use. If your webapp is deployed as a .war file, there is no file structure to look at. Is this solvable through some IO-function or do we need to specify the path to our project in each environment? You will likely need to specify the path through an environment variable, Java system property, or within the webapp Context element, via a nested Parameter or Environment setting. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: synchronizing in tomcat
I completely agree with Chuck, and completely disagree with Neil. Never rely upon static state in servlet classes unless you have complete control over class loading, which you shouldn't, otherwise you'd write your own servlet container. As Chuck says, it is not a Tomcat issue, but one for the DB. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Tuesday, November 17, 2009 10:13 AM To: Tomcat Users List Subject: RE: synchronizing in tomcat From: Neil Aggarwal [mailto:n...@jammconsulting.com] Subject: RE: synchronizing in tomcat At first thought, I would create a class with synchronized static methods to do each of your processing tasks. That way, you are guaranteed only one method is executing at a time. That's probably not going to work, since the posted scenario sounds more like a shopping cart situation, requiring lockout across multiple requests. Regardless, this has nothing to do with Tomcat. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Possible to do async processing?
Yes, there is a way, and I suspect you're doing fire-and-forget processing, but, could you give us a better idea as to what you are trying to do? Tomcat will handle servlet requests in multiple threads if needed, anyway. So it may not be necessary. I'm thinking you might want to investigate a messaging system, such as OpenMQ. BTW: To create a thread by hand, look at the Java docs for the Thread class and the Runnable interface. Keep in mind, this could get really out of hand if there are a lot of requests and you don't understand how to properly manage threads in this environment. Joe -Original Message- From: David Balažic [mailto:xerc...@gmail.com] Sent: Monday, November 16, 2009 11:44 AM To: Tomcat Users List Subject: Possible to do async processing? Hi! We are using tomcat 6.0 and now we have the need to trigger from the service() method of a servlet. So: - a request arrives - the servlet triggers an async event - servlet sends response and closes - the async task is done (independent of servlet opeartion) Is there a way to do this? Or create threads by hand? Regards, David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Possible to do async processing?
Sorry.. misunderstood your original when you asked if there was a way to create a Thread by hand No tricks/shortcuts. Are you saying each request will take a minute to process and is triggered a few times an hour? I suspect the client is anxiously awaiting a response like OK, I got it, but not patient enough for a The request was successful. I'm still thinking a messaging system, especially if you want to requests to be processed regardless of the time the message was delivered, like, when maybe many requests hit near the same time. A quick hack on a messaging system is to simply have the servlet throw a record into a DB, file or something used as a messaging queue. Then, a program external to Tomcat simply monitors the queue, picks up any existing requests, handles them, and starts monitoring again. This way, Tomcat could go down without affecting if the messages are processed, or the monitor could be down without affecting if Tomcat can push in new requests. The only thing that can't go down is the queue. Joe -Original Message- From: David Balažic [mailto:xerc...@gmail.com] Sent: Monday, November 16, 2009 12:05 PM To: Tomcat Users List Subject: Re: Possible to do async processing? 2009/11/16 Joseph Morgan joseph.mor...@ignitesales.com: Yes, there is a way, and I suspect you're doing fire-and-forget processing, but, could you give us a better idea as to what you are trying to do? Tomcat will handle servlet requests in multiple threads if needed, anyway. So it may not be necessary. I'm thinking you might want to investigate a messaging system, such as OpenMQ. BTW: To create a thread by hand, look at the Java docs for the Thread class and the Runnable interface. Keep in mind, this could get really out of hand if there are a lot of requests and you don't understand how to properly manage threads in this environment. Yes, that is why I ask. (I know how to create threads). So Tomcat has nothing like this in itself? Any trick , shortcut? It will be something triggered like a few times in an hour and would take less than a minute to process, to there should be no overload problems (famous last words...) Regards, David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Multiple war files for the same application context.
Are you trying to deploy elements of a larger applications separately? It seems you just need different JAR files for the application, and, though those can be deployed to the same web app separately, you're not really gaining anything, since the app will have to be restarted anyway, and you might as well stick with the WAR file. Joe -Original Message- From: Ziggy [mailto:zigg...@gmail.com] Sent: Monday, November 16, 2009 12:35 PM To: Tomcat Users List Subject: Multiple war files for the same application context. Hi guys, Is it possible to deploy multiple war files for the same application? for example if i have an application that is accessed via http:/// www.test.com/myapp, i would usually have a single war file called myapp.war and deploy everthing in that one file. is it possible to deploy myapp1ArticleManager.war, myapp1Forum.war etc and have them all be as part of the one myapp application? Any links or tutorials on how to do this would be very helpfull. And what is the term used for this kind of deployment? Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Token Security
John, Just curious, but have you looked into existing token-based security mechanisms such as LTPA (if you're predominantly an IBM shop) or SAML? -Original Message- From: John Morrison [mailto:morr...@gmail.com] Sent: Wednesday, November 11, 2009 1:12 PM To: users@tomcat.apache.org Subject: Token Security Hi, I've been asked to put some security in place for a website, at the moment there are two requirements with a possible extension; 1) The referer must be XXX (configurable) 2) There must be a token passed either GET or POST in the URL which matches some internally generated code. The possible extension would be the token passed in would be sent to (another) webserver for validation. I've been looking at this, and I *think* that I need to add a JAAS realm, but I can't work out how to not have a login page. The security must deny access unless the above is matched. I've seen reference to where auth-method can be NONE which I assume is right (since none of the others are) but am at a loss as to how to get this to work. Thanks for any advice or pointers to documentation. Regards, John. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Token Security
Correct, at the moment there is no requirement to actually authenticate the user. However, I've been told to ensure that, if the client wishes (and pays) that the solution could be expanded to do so. I may have missed something, but are you simply trying to ensure secondary requests to web pages/resources/objects/whatever came through a singular entry point? That is, someone comes in to your web world but needs to visit Page A before requesting other pages/resources on the site? Is this something like you are thinking; If the user has a session; let them access what they want else if the requested url has a param/value of [insert hash algor] set the user up with a session and let them access what they want else return Access Forbidden Is this possible in a filter? (My knowledge of them is currently 0; I'll read up on them in depth tomorrow) There is no security in this approach, even if you do authenticate the user up front (as guest or otherwise), unless this token is flying around across a secured protocol. A man in the middle can intercept the token and start issuing requests as the original user. The answer is, yes, a filter can be made to ensure the token is there and reject if not, but will the initial request (the one that issues the token) and subsequent requests be exchanged via SSL?
RE: Token Security
And let me guess... the day a costly security breach occurs, they'll be escorting you out??? -Original Message- From: John Morrison [mailto:morr...@gmail.com] Sent: Thursday, November 12, 2009 8:18 AM To: users@tomcat.apache.org Subject: RE: Token Security On Thu, November 12, 2009 1:33 pm, Joseph Morgan wrote: John, Just curious, but have you looked into existing token-based security mechanisms such as LTPA (if you're predominantly an IBM shop) or SAML? Hi Joseph I haven't to be honest; this isn't a java shop. MS is 99% of what we use but a tool was dictated which requires java so... To be honest, the managers know what they'll get isn't really secure, I've made it plain enough. But it's all they are willing to give us time to implement. J. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Token Security
SAML doesn't require JAVA, and is XML (a place where MS is strong)... but since it is XML, can be handled well by Java -Original Message- From: John Morrison [mailto:morr...@gmail.com] Sent: Thursday, November 12, 2009 8:18 AM To: users@tomcat.apache.org Subject: RE: Token Security On Thu, November 12, 2009 1:33 pm, Joseph Morgan wrote: John, Just curious, but have you looked into existing token-based security mechanisms such as LTPA (if you're predominantly an IBM shop) or SAML? Hi Joseph I haven't to be honest; this isn't a java shop. MS is 99% of what we use but a tool was dictated which requires java so... To be honest, the managers know what they'll get isn't really secure, I've made it plain enough. But it's all they are willing to give us time to implement. J. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Token Security
Ahh Mr. Morrison... you disappoint me! After the trial and as they're walking you out, they'll be so nicely explaining to you how you should've done more to protect the interests of the company -Original Message- From: John Morrison [mailto:morr...@gmail.com] Sent: Thursday, November 12, 2009 8:43 AM To: Tomcat Users List Subject: RE: Token Security Nope. I've made it clear (and I've the email trail to prove) that I'm doing this this way solely at the order of the powers that be. On Thu, November 12, 2009 2:31 pm, Joseph Morgan wrote: And let me guess... the day a costly security breach occurs, they'll be escorting you out??? -Original Message- From: John Morrison [mailto:morr...@gmail.com] Sent: Thursday, November 12, 2009 8:18 AM To: users@tomcat.apache.org Subject: RE: Token Security On Thu, November 12, 2009 1:33 pm, Joseph Morgan wrote: John, Just curious, but have you looked into existing token-based security mechanisms such as LTPA (if you're predominantly an IBM shop) or SAML? Hi Joseph I haven't to be honest; this isn't a java shop. MS is 99% of what we use but a tool was dictated which requires java so... To be honest, the managers know what they'll get isn't really secure, I've made it plain enough. But it's all they are willing to give us time to implement. J. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Token Security
Did I just hear... D--- the torpedos! -Original Message- From: John Morrison [mailto:morr...@gmail.com] Sent: Thursday, November 12, 2009 9:04 AM To: users@tomcat.apache.org Subject: RE: Token Security Thanks guys, I've got what I needed working. Most appreciated. Regards, John. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to cancel a servlet startup?
Dan, Pardon my advice, but... this sounds like a programming/config/illegal state error that shouldn't make it to production. Of course, you could simply add instrumentation to the system to detect that this servlet didn't do its thing, and route every request to a holding page. Joe -Original Message- From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Sent: Thursday, November 12, 2009 10:48 AM To: Tomcat Users List Subject: How to cancel a servlet startup? If I have a servlet which fails during init() for whatever reason - the example below takes a null pointer public class MyServlet extends HttpServlet { private static final long serialVersionUID = 7997991143724219371L; @Override public void destroy() { //do stuff super.destroy(); } @Override public void init() throws ServletException { try { String a = null; a.toString(); } catch (Exception e) { System.err.println(Startup error - cancelling startup. + e); try { destroy(); } catch (Exception e1) { //noop } throw new ServletException(Startup failing due to unexpected error: + e); } } } How can I make tomcat cancel the deployment of the entire war file that this servlet was distributed with? I thought that throwing a ServletException back up to Tomcat would make the webapp unavailable - but Tomcat continues to serve pages from this webapp even though the startup failed. That doesn't seem like correct behavior... am I missing a setting somewhere? Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to cancel a servlet startup?
OK... now you're asking for miracles! You need to write us...@miracleworkers.com har de har! -Original Message- From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Sent: Thursday, November 12, 2009 12:08 PM To: Tomcat Users List Subject: Re: How to cancel a servlet startup? I'll tell you what, if you can tell me how to prevent my users (who have full control over the application / installation / hardware where this is running) from being able to shoot themselves in the foot and do something that causes my app to fail - I'll buy you a case of beer and not worry about this. Until then, my servlet needs to do system checks - and if something is wrong, it needs to not deploy. Thats the bit I haven't yet figured out... How do I get tomcat to disable the entire context, when I detect that something is broken during startup? And ideally, redirect the users to an error screen that tells them that it's broken.. Thanks, Dan On Thu, Nov 12, 2009 at 11:42 AM, Joseph Morgan joseph.mor...@ignitesales.com wrote: Dan, Pardon my advice, but... this sounds like a programming/config/illegal state error that shouldn't make it to production. Of course, you could simply add instrumentation to the system to detect that this servlet didn't do its thing, and route every request to a holding page. Joe -Original Message- From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Sent: Thursday, November 12, 2009 10:48 AM To: Tomcat Users List Subject: How to cancel a servlet startup? If I have a servlet which fails during init() for whatever reason - the example below takes a null pointer public class MyServlet extends HttpServlet { private static final long serialVersionUID = 7997991143724219371L; �...@override public void destroy() { //do stuff super.destroy(); } �...@override public void init() throws ServletException { try { String a = null; a.toString(); } catch (Exception e) { System.err.println(Startup error - cancelling startup. + e); try { destroy(); } catch (Exception e1) { //noop } throw new ServletException(Startup failing due to unexpected error: + e); } } } How can I make tomcat cancel the deployment of the entire war file that this servlet was distributed with? I thought that throwing a ServletException back up to Tomcat would make the webapp unavailable - but Tomcat continues to serve pages from this webapp even though the startup failed. That doesn't seem like correct behavior... am I missing a setting somewhere? Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: webapps question
Michele, It looks like all of the jar files you mention can safely be deployed in Tomcat's common lib area. Another question, though, to ask yourself and your developers is, do you really need 100 individual web apps to support the web services you have? In other words, there is no requirement to have a 1 to 1 correlation between applications and web services. Joe -Original Message- From: Michele Mase' [mailto:michele.m...@gmail.com] Sent: Wednesday, November 04, 2009 4:56 AM To: Tomcat Users List Subject: Re: webapps question Thanx 4 you answer; ps: there are 100 webservices, not webapps Pls, help me: I'm not a developer ... and I don't understand the disadvantages of static classes/fields loaded from common classloader will be shared among all webapps, Could you be a little more specific about the disadvantages? Your suggestion is to split the apps into vitualhost like, context.xml ecc..? I use the oracle odbc thin; which problem should I have putting the jdbc driver int the commos/lib ? For reference, those are the jars userd in all webservices: classes12.jar ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar activation.jar axis-ant.jar axis.jar commons-discovery-0.2.jar commons-logging-1.0.4.jar jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar wsdl4j-1.5.1.jar xmlsec-1.4.0.jar Michele On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewski m...@ceti.pl wrote: Michele Mase' wrote: I've 100 webapps on one single tomcat instance. Every webapps has in his WEB-INF/lib the same jars I've some permgen memory problems too Moving all the shared libs in tomcat's root/common/lib should help me reducing the perm gen memory usage? Should it be a good pratics It will solve one problem, but will cause others, difficult to trace. E.g. static classes/fields loaded from common classloader will be shared among all webapps. You should rather refactor your webapp to be able to change its 'work context' depending on URI/domain name. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: webapps question
I think you're right: http://stackoverflow.com/questions/217929/problem-with-commons-logging-l og4j-setup-in-spring-webapp-with-tomcat-6 So commons-logging is not safe in common lib area. -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Wednesday, November 04, 2009 7:23 AM To: Tomcat Users List Subject: Re: webapps question On 04/11/2009 13:17, Joseph Morgan wrote: Michele, It looks like all of the jar files you mention can safely be deployed in Tomcat's common lib area. I'm not sure that's true of commons-logging or log4j. Someone else might have a better memory than me, but I've a feeling that they hold onto classloader references, which may cause a memory leak during redeployments. p Another question, though, to ask yourself and your developers is, do you really need 100 individual web apps to support the web services you have? In other words, there is no requirement to have a 1 to 1 correlation between applications and web services. Joe -Original Message- From: Michele Mase' [mailto:michele.m...@gmail.com] Sent: Wednesday, November 04, 2009 4:56 AM To: Tomcat Users List Subject: Re: webapps question Thanx 4 you answer; ps: there are 100 webservices, not webapps Pls, help me: I'm not a developer ... and I don't understand the disadvantages of static classes/fields loaded from common classloader will be shared among all webapps, Could you be a little more specific about the disadvantages? Your suggestion is to split the apps into vitualhost like, context.xml ecc..? I use the oracle odbc thin; which problem should I have putting the jdbc driver int the commos/lib ? For reference, those are the jars userd in all webservices: classes12.jar ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar activation.jar axis-ant.jar axis.jar commons-discovery-0.2.jar commons-logging-1.0.4.jar jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar wsdl4j-1.5.1.jar xmlsec-1.4.0.jar Michele On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewskim...@ceti.pl wrote: Michele Mase' wrote: I've 100 webapps on one single tomcat instance. Every webapps has in his WEB-INF/lib the same jars I've some permgen memory problems too Moving all the shared libs in tomcat's root/common/lib should help me reducing the perm gen memory usage? Should it be a good pratics It will solve one problem, but will cause others, difficult to trace. E.g. static classes/fields loaded from common classloader will be shared among all webapps. You should rather refactor your webapp to be able to change its 'work context' depending on URI/domain name. -- Mikolaj Rydzewskim...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Memory and Garbage Collection questions...
I hope Mr. Caldarale answered your question, because you may otherwise be looking at the 800lb Gorilla in the room. Memory problems within Tomcat could be a number of very hard to see things, but some quick candidates are: * Programmers caching too much data from the DB (or file system) into context attributes * Programmers using context attributes to store session data * Programmers pushing too much data into session attributes * Session timeout is set too high and sessions aren't timing out -Original Message- From: Johnson, Trevin (Contractor) [mailto:trevin.john...@occ.treas.gov] Sent: Monday, November 02, 2009 2:53 PM To: 'users@tomcat.apache.org' Subject: Tomcat Memory and Garbage Collection questions... Hello OS Version: Windows 2000 Tomcat version:5.5.17 Initial Memory Pool: 768 Maximum Memory Pool:1024 Java Version: Java\jdk1.5.0_14 When we restart the tomcat service our tomcat memory is about 120Mb. It keeps going up over the next few days util it reaches 700Mb and we have to reboot the server. We do not see any errors just yet but the server gets close to maxing out I have questions around garbage collection for tomcat Questions: 1.We do not see the memory going down for the tomcat service. Shouldn't the memory go down as well as up over this timespan 2.Should the memory get to maximum 768Mb and then go back down or get recycled? 3.Is this a bug or what is normal behavior for the tomcat memory? 4.. How do we implement garbage collection for our windows server(-Xincgc)? I am very new to Tomcat and trying to manage/decrease the memory footprint used by Tomcat? Your help is most appreciated... Thanks trevin.john...@occ.treas.gov - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: File /customTagLibs not found
Well, I'm trying to contain common tag libraries in a single, common, easily deployable space so I only have to deploy them once for all apps, and not into every app in existence (though there are arguments to be made for each app having its own independent stuff, even if it is the exact same stuff). That path taglib-location/lib/tld/c.tld/taglib-location works just fine with the JSTL tags, but not my custom tags. It is easy enough to put my TLD declaration in the META-INF/web.xml. It is now becoming a matter of wtf However, my Tomcat is not responding as you suggest. The Tag libs are not relative to the JSP, but to the context root, always. That is, at my context root, I have my JSP: === %@ page contentType=text/html; charset=iso-8859-1 language=java errorPage=/error.jsp% %@ taglib uri=http://java.sun.com/jstl/core; prefix=c% %@ taglib uri=jmorganTags prefix=jm% c:set var=coreVar scope=page value=King Kong/ jm:setIf var=testVar test=${param.p == null} trueValue=null falseValue=${param.p}scope=page/ html body pHello from mm/test.jsp/p img src=/images/test.gif/ pJM Taglib Var Set: ${testVar}/p pCore Taglib Var Set: ${coreVar}/p /body /html === And... under {context-root}/secondLevel, I have another, almost identical JSP (just different text to ID the difference): === %@ page contentType=text/html; charset=iso-8859-1 language=java errorPage=/error.jsp% %@ taglib uri=http://java.sun.com/jstl/core; prefix=c% %@ taglib uri=jmorganTags prefix=jm% c:set var=coreVar scope=page value=Second Level - King Kong/ jm:setIf var=testVar test=${param.p == null} trueValue=Second Level - null falseValue=${param.p}scope=page/ html body pHello from mm/test.jsp/p img src=/images/test.gif/ pJM Taglib Var Set: ${testVar}/p pCore Taglib Var Set: ${coreVar}/p /body /html === Note the taglib references are identical between the two. The CORE jstl tags are (now) referenced in my {catalinahome}/conf/web.xml as: === taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/lib/tld/c.tld/taglib-location /taglib === And my custom tags are in my {contextRoot}/META-INF/web.xml as: === taglib taglib-uricustomTags/taglib-uri taglib-location/../../lib/tld/custom.tld/taglib-location /taglib === And BOTH work for BOTH the JSPs regardless of their location relative to the context root. However, if I simply move the custom tag reference from the {contextRoot}/META-INF/web.xml into the {catalinahome}/conf/web.xml, the custom tags stop working. It is as if JSTL is built into Tomcat... Because the JSTL stuff seems to be able to be referenced either way; by my ugly relative path and by the cleaner /lib/tld/c.tld version. However, my custom tags ONLY work when referenced within the {contextRoot}/META-INF/web.xml with /../../lib/tld/custom.tld -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, October 26, 2009 10:40 AM To: Tomcat Users List Subject: Re: File /customTagLibs not found -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joseph, On 10/23/2009 8:02 AM, Joseph Morgan wrote: taglib-location../../../lib/tld/customTagLibs.tld/taglib-location Yikes! Why not use a context-relative path like: taglib-location/lib/tld/customTagLibs.tld/taglib-location This assumes that /lib is in the root of your webapp. Perhaps all the ..s are getting things confused. I try never to use .. in any path. Most paths starting with / are guaranteed to be relative to the context root by either the servlet or JSP specifications. This particular one is covered in section 1.2.1 of the JSP 2.0 spec. Here is the interesting thing. If I remove just the custom tag lib entry from tomcat's conf/web.xml and put it in any apps WEB-INF/web.xml, it works! Aah, I think relative references are the problem here. The path is relative to the JSP itself, so if you have JSPs are multiple levels, the ..s will screw things up. If you are looking at /index.jsp, then the tab library is expected to be in [webapp root]/../../../lib/. which is almost certainly incorrect. That is, all my other common tag lib declarations are still in conf/web.xml, but the custom tag lib declaration is all by itself within the WEB-INF/web.xml file. Everything else is exactly in the same place, under {catalinahome}/lib Oh, you need these files in catalina's lib directory? Why not deploy them alongside your webapp (or each webapp that needs them)? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrlwrgACgkQ9CaO5/Lv0PAvwACfb+3wYyjHhcCUfnC4sTZv3GAW A4YAoJFzgKlyxSFa7mjIOMvIzX
RE: File /customTagLibs not found
OK... interesting results. Your muck-it-up idea came to me while waiting for a response. I changed the taglib location for JSTL to /KingKong and /GodZilla, and it still worked... and then removed the references to JSTL completely... and it still worked!!! ...suggesting for a moment we were both onto something. Interesting. Tomcat must be doing a you know what I mean resolution of the resource based upon the fact that the definition is being provided in conf/web.xml for the server instead of WEB-INF/web.xml for your webapp (right?). So as I walked away utterly convinced the JSTL was magical (or built in) to Tomcat, I removed the jstl.jar and standard.jar. Boom! It stopped working. So, I figured I'd open up the jar files and take a look, and found their TLDs within a META-INF within standard.jar, which was located, of course, in {catalinahome}/lib. This, then, must be the magic. I checked my customTags.jar and discovered I had not added the META-INF/customTags.tld. So, I put it in, removed all references to tags from BOTH web.xml files, and everything works! It turns out, if you simply add the TLDs within the JAR, in Tomcat at least, and put the jar files in a shared loader location (I use /lib because it's configured already), custom tags become as magical as are JSTL. So, I have the solution... and have been over-configuring Tomcat for... well.. years now! I just lucked out with JSTL the first time, putting it in /lib and the taglib references within /conf/web.xml .. and, since it worked that way, I patted myself on the back for a job well-done, and continued on that way till today! Now I've got to go un-configure all those web.xml's *...@!#!! Thanks! -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, October 26, 2009 11:33 AM To: Tomcat Users List Subject: Re: File /customTagLibs not found -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joseph, On 10/26/2009 12:15 PM, Joseph Morgan wrote: Well, I'm trying to contain common tag libraries in a single, common, easily deployable space so I only have to deploy them once for all apps, and not into every app in existence (though there are arguments to be made for each app having its own independent stuff, even if it is the exact same stuff). That path taglib-location/lib/tld/c.tld/taglib-location works just fine with the JSTL tags, but not my custom tags. It is easy enough to put my TLD declaration in the META-INF/web.xml. It is now becoming a matter of wtf I suspect that Tomcat treats the JSTL declaration specially based upon its taglib-uri: they don't want you to break the JSTL by incorrectly specifying its location, so they ignore your taglib-location. Try this: set the taglib-location to something that is obviously wrong like /does-not-exist or something. If it works, you can convince yourself that some trickery is being performed by Tomcat for the standard libraries. This same technique is used with XML schemas for things like webapp deployment descriptors so that Internet access is not required to verify web.xml and other documents (not to mention avoiding the the roundtrip time to fetch the schema or DTD, etc.). However, my Tomcat is not responding as you suggest. The Tag libs are not relative to the JSP, but to the context root, always. That is, at my context root, I have my JSP: [snip] Note the taglib references are identical between the two. The CORE jstl tags are (now) referenced in my {catalinahome}/conf/web.xml as: === taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/lib/tld/c.tld/taglib-location /taglib === And my custom tags are in my {contextRoot}/META-INF/web.xml as: === taglib taglib-uricustomTags/taglib-uri taglib-location/../../lib/tld/custom.tld/taglib-location /taglib === And BOTH work for BOTH the JSPs regardless of their location relative to the context root. Interesting. Tomcat must be doing a you know what I mean resolution of the resource based upon the fact that the definition is being provided in conf/web.xml for the server instead of WEB-INF/web.xml for your webapp (right?). However, if I simply move the custom tag reference from the {contextRoot}/META-INF/web.xml into the {catalinahome}/conf/web.xml, the custom tags stop working. Oh, so I have it exactly wrong: it works when specified in your webapp's web.xml but not in Tomcat's web.xml. Hmm. Try using /lib/tld/custom.tld in conf/web.xml and see what happens? It is as if JSTL is built into Tomcat... Because the JSTL stuff seems to be able to be referenced either way; by my ugly relative path and by the cleaner /lib/tld/c.tld version. However, my custom tags ONLY work when referenced within the {contextRoot}/META-INF/web.xml with /../../lib/tld/custom.tld Sounds
File /customTagLibs not found
Sorry for the repeat... I originally sent this before my subscription was confirmed and didn't catch the replies... I have an interesting situation where I have configured all my common taglibs (jstl, etc) within Tomcat's conf/web.xml. We are now incorporating a custom tag library and added that to the jsp-config entries: taglib taglib-uricustomTagLibs/taglib-uri taglib-location../../../lib/tld/customTagLibs.tld/taglib-location /taglib For some reason, we cannot get the thing to identify this custom tag library. Here is the entry for the core jstl libraries in the exact same web.xml file: taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri http://java.sun.com/jstl/core%3c/taglib-uri taglib-location../../../lib/tld/c.tld/taglib-location /taglib The jar file is in the exact same directory as the jstl.jar and standard.jar. The TLD is in the exact same directory as the c.tld. Here is the testing page (because we wanted to reduce testing to the bare minimum when things stopped working): %@ page contentType=text/html; charset=iso-8859-1 language=java errorPage=/error.jsp% %@ taglib uri=http://java.sun.com/jstl/core; prefix=c% %@ taglib uri=customTagLibs prefix=jm% c:set var=coreVar scope=page value=Core Value Set/ jm:setIf var=testVar test=${param.p == null} trueValue=null falseValue=${param.p}scope=page/ html body pHello from mm/test.jsp/p img src=/images/test.gif/ pJM Taglib Var Set: ${testVar}/p pCore Taglib Var Set: ${coreVar}/p /body /html Here is the interesting thing. If I remove just the custom tag lib entry from tomcat's conf/web.xml and put it in any apps WEB-INF/web.xml, it works!That is, all my other common tag lib declarations are still in conf/web.xml, but the custom tag lib declaration is all by itself within the WEB-INF/web.xml file. Everything else is exactly in the same place, under {catalinahome}/lib What is the difference? What is special about jstl that allows it to work there, but not our custom lib coded and referenced in virtually identical way? Also, we tried at least a dozen variations of the URI, all to no avail. It ONLY works when I configure the custom tag lib within each app's WEB-INF/web.xml. Any ideas?
RE: File /customTagLibs not found
Tomcat 6 (currently on Windows for Dev, production is Linux) -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Friday, October 23, 2009 7:06 AM To: Tomcat Users List Subject: Re: File /customTagLibs not found Joseph Morgan wrote: Any ideas? Tomcat version? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: File /customTagLibs not found
Tomcat version 6.0.20 -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, October 23, 2009 9:04 AM To: Tomcat Users List Subject: RE: File /customTagLibs not found From: Joseph Morgan [mailto:joseph.mor...@ignitesales.com] Subject: RE: File /customTagLibs not found Tomcat 6 (currently on Windows for Dev, production is Linux) Tomcat 6.0.what? Precision counts. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org