AW: Where should I store my static content in a clustered environment
Ok, but then tell me how do I effectively protect each single chunck of data using the servlet security mechanism if the data is not served by tomcat? The problem is that my customer wants every single image, html, pdf and what so ever be directly protected. In other words if someone directly enters a specific url to a pdf for example he should be redirected to a login page (using form based login) unless he is already logged in. Bjoern -Ursprüngliche Nachricht- Von: Duan, Nick [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 23. November 2005 21:22 An: Tomcat Users List Betreff: RE: Where should I store my static content in a clustered environment A simple solution would be to have all static pages hosted on an Apache httpd server in front of tomcat clusters. If you need more performance, just cluster the httpds. Tomcat is not really designed to server static pages. Apache httpd can also serve as a LB. In this case, certainly you have to treat static pages separately from dynamic webapps. In other words, you can't bundle static pages with your war files. ND -Original Message- From: Eickvonder Bjoern [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 23, 2005 4:23 AM To: users@tomcat.apache.org Subject: Where should I store my static content in a clustered environment Hi, lets start with describing my current task where I would appreciate any advice from you. I have to construct a clustered system (with lots of webservers) that has few dynamic pages but a lot of static ones, whereby all resources have to be protected by security-constraints of a webapp (so letting Apache deliver this content won't work). Moreover there should be the possibility to upload/delete static components via a web form. My main problem is now where should I store the static data (mainly html pages, images, ...; but over 4 GB(!) large in total)? As far as now I'm considering the following solutions: 1.) Storing the content within the webapp of each webserver. This would include that the servers know each other as the upload/delete operations must be propagated from one server to all the others. Moreover the update of the dynamic parts would not be as easy any more as just uploading a new war-file as this requires deleting the old webapp directory (that contains the content is this case as well). 2.) Storing the content in a separate directory but still on each webserver. This would still include that servers must know each other, but updating the dynamic part would be easier. The downside is that I would have to write a servlet that delivers all static content with all the problems of mime-types, character encoding and so on which I would have to handle myself. 3.) Storing the content in a database on a separate server. The advantage would be that webservers only need to know their database server and updating the webapps would be easy (just uploading new war-files). The downside here is that I need a servlet too and I think it's maybe not the fastest solution as all requests of all servers to each single chuck of static content would require a connection to the database server. 4.) As 3.) but storing data on a single separate server in the filesystem. The advantages/disadvantages should be similar to 3.) whereby I do not know which solution might be faster. 5.) As 3.)/4.) but additionally implementing a caching-mechanism on the webservers. This means if a webserver gets a request for a specific page for the first time he connects the database server to retrieve that page, then stores it in its webapp directory and then let tomcat deliver that page. On the second request it is just checked if that page is already there and if so it is delivered directly. Of course I must implement some mechanism such that the webservers get to know if their cached data is outdated but so far this seems to me the best solution. Anyone ever faced this kind of problem? Any kind of remark to my possible solutions or any other possibilities you might know of are appreciated. Thanks you in advance for your help. Bjoern - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DataSources created as resources in context.xml
I have a query about how tomcat stores DataSources that are created as part of the Resource element in the context.xml file. If the file is stored within the webapp's META-INF directory (as recommended), will any defined DataSources be made available to other webapp modules by binding them to the global JNDI tree or does tomcat store the reference by a more secure, webapp specific means? From reading the tomcat documentation, it appears to bind them to the global jndi tree but surely this creates the possibility that an other web application could maliciously access datasource, specifically in shared server web hosting environments? Thanks in advance. Nigel
Re: JAASRealm-based Login Fails After Upgrade from 5.0 to 5.5
Shaw, David \(David\) [EMAIL PROTECTED] writes: I have a stable, working, Struts-based web application running under Tomcat 5.0.28 that uses HTTP BASIC authentication and a JAASRealm (with a home grown LoginModule and user and role principals) over SSL. The authentication / security has been working with no issues for several releases. I am now trying to upgrade Tomcat from 5.0.28 to 5.5.12. I've rebuilt the web application using JDK 1.5.0_05. JAASRealm-based logins aren't working since 5.5.10, but the bug is fixed in CVS. regards Markus PS: If you want to see details take a look at the devel archives. I posted an email there last week IIRC. There must be an entry in the bug database, too, but I don't know which. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Slow and incomplete dynamic content generation after enabling native connector support in 5.5.12
After adding the APR library to the java.library.path [as described in http://tomcat.apache.org/tomcat-5.5-doc/apr.html], certain JSPs that produce a lot of output (but used to be served in under a second) are now very slow and produce incomplete output. The header appears only after a few kilobytes of output, at which point the output is cut off... ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; ... Server: Apache-Coyote/1.1 X-Total-Results: 389 Content-Type: text/html;charset=UTF-8 Content-Language: en-US Content-Length: 22858 Date: Thu, 24 Nov 2005 08:41:56 GMT Any ideas what is going on here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Slow and incomplete dynamic content generation after enabling native connector support in 5.5.12
On 11/24/05, Eric Jain [EMAIL PROTECTED] wrote: After adding the APR library to the java.library.path [as described in http://tomcat.apache.org/tomcat-5.5-doc/apr.html], certain JSPs that produce a lot of output (but used to be served in under a second) are now very slow and produce incomplete output. The header appears only after a few kilobytes of output, at which point the output is cut off... Sure. File a bug with a test WAR. Of course, it will likely end up as INVALID, since I expect this to work. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Net Disk Failure in JSP with Tomcat 5.5.9( or 5.5.X)
Dear Chuck My situation is exactly as you suspect running 5.0.18 from a command prompt, and 5.5.x as a windows service. It seem Net disk can only be available with command prompt instead of windows service for Tomcat Startup. Thanks NanFei - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, November 24, 2005 3:33 PM Subject: RE: Net Disk Failure in JSP with Tomcat 5.5.9( or 5.5.X) From: NanFei Wang [mailto:[EMAIL PROTECTED] Subject: Re: Net Disk Failure in JSP with Tomcat 5.5.9( or 5.5.X) I made a Net Disk named P:\ I got the following result when I use Apache Tomcat 5.5.9( or 5.5.X) Server: P:\ exist = false P:\ is Directory = false * But I got the following when I use Tomcat 5.0.18 : `` P:\ exist = true P:\ is Directory = true `` I suspect you were running 5.0.28 from a command prompt, and 5.5.x as a Windows service. As far as I can tell, network drive mappings are not visible to a service, even when the service is run under an account that has persistent network connections. By using the .bat files to run 5.5.x, you should be able to do what you want. Note that the .bat files are only included in the .zip Tomcat download, not the .exe one (seems silly, but that's the way it is). - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Slow and incomplete dynamic content generation after enabling native connector support in 5.5.12
Remy Maucherat wrote: Sure. File a bug with a test WAR. Of course, it will likely end up as INVALID, since I expect this to work. Well, I also expected this to work, but alas, it didn't :-) http://issues.apache.org/bugzilla/show_bug.cgi?id=37627 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Issues When Restarting Tomcat
Hi, I have the following problem and I was wondering if anyone else had a similar issue which they managed to resolve. I have a web application which is installed on 2 tomcat instances (version 4.1.30 using jdk 1.4.2_05), each on separate boxes. I have 2 apache (version 2) instances, also on separate boxes, which are configured to pass requests to the tomcat instances via the mod_jk plugin. The configuration works as expected and the requests from apache are equally balanced between the two tomcat instances. The issue I have is that the web application installed on tomcat seems to have a memory leak and if it is left to run for a prolonged period the tomcat processes begin to hog the CPU. To counter this I have set up a cron job which restarts the tomcat instances every morning, the restarts are staggered so that the first instance is restarted at 07:00 and the second at 07:20. However after the restarts I can see from the apache logs that a number of HTTP requests are taking 190 seconds to process. From the logging I have determined that the hold up occurs when the request is passed to tomcat. I see this issue for approximately 3 hours and then it clears itself up until the following day when we restart the tomcat instances again. Does anyone know why this is occuring? Should I be restarting the apache instances after I have restarted the tomcat instances? Is there anyway I can clear down the CPU usage without restarting tomcat? If anyone can help me with this issue I would be very grateful. Thanks in advance Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TryNo2: path attribute for Context element in tomcat 5.5
From: Akoulov, Alexandre [IT] [mailto:[EMAIL PROTECTED] Subject: TryNo2: path attribute for Context element in tomcat 5.5 I am just wondering if you have any comments on the following email: What kind of comments are you looking for? The OP encountered a problem, read the doc, corrected his configuration, and resolved the problem. Other than perhaps reading the doc first (difficult to know where to read, of course), it looks like he did everything right. - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TryNo2: path attribute for Context element in tomcat 5.5
Akoulov, Alexandre [IT] wrote: I am just wondering if you have any comments on the following email: Is it a right way to configure a context ? You configured it one way and it didn't work. You configured it *per the documentation* and it *did* work. What kind of comment would seem to be necessary? :-) -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] maven-tomcat-plugin 1.2.1
Hi, The codeczar team is pleased to announce a bugfix release of the maven-tomcat-plugin http://www.codeczar.com/products/maven-tomcat-plugin/ This build fixes two issues. 1) plugin now compatible with jdk 1.4 2) missing jar resources copied into target directory prior to jspc. maven -DartifactId=maven-tomcat-plugin -DgroupId=codeczar-tomcat -Dversion=1.2.1 plugin:download This plugin requires a minimum of Maven 1.1.X. cheers Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 error during startup - 2nd connector doesn't work
Hi people. I'm using tomcat5 to host a commercial web site, and due to some integration issues we are using a single service with two CoyoteConnectors - one on port 8080 and one on port 8081. Here is the relevant configuration: Service name=Catalina Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Connector port=8081 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / I've noticed that some times, when catalina is starting, I get this error in the logs: Nov 24, 2005 4:28:30 PM org.apache.coyote.tomcat5.MapperListener init WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$EntryIterator.next(HashMap.java:824) at java.util.HashMap.putAllForCreate(HashMap.java:424) at java.util.HashMap.clone(HashMap.java:656) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1537) at org.apache.catalina.core.StandardService.start(StandardService.java:489) When that happens, HTTP requests to the second connector (port 8081) return with error 400 - no host matches, while requests to the first connector are handled just fine. It looks to me like a race condition where something (possibly MBeanServerImpl) isn't locking a shared resource (or isn't locking it properly) and an contained HashMap gets modifier concurrently. I though initially about writing to the dev list, but I don't have any idea what is that mx4j so I'm not sure if its the correct place to ask. BTW - I'm using tomcat 5.0.28. TIA -- Oded Arbel m-Wise mobile solutions [EMAIL PROTECTED] +972-9-9611212 (204) +972-54-7340014 ::.. Who the fuck is General Failure? And why is he reading my harddisk? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: tomcat
HI Dirk, I was using tomcat 5.5.9 and couldn't change the working folder through tomcat5 //US or tomcat5w interface to change the '--StartPath'. Then I updated to 5.5.12 and I could play with this parameters. Samit Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, November 24, 2005 10:26 AM To: [EMAIL PROTECTED] Subject: tomcat Hi Samit, I've found your message in a forum, but there was no direct way to submit a massage to you. So I write directly to you. I have the same problem with the tomcat service unter windows 2003. Have you found a solution for this problem? Thank you for your help. Dirk. Samit Paul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, How do I set tomcat-5's working directory to something other than C:\Windows\System32 when it is run as windows (XP) service . Even if I set CATALINA_HOME to point to the tomcat installation directory it doesn't take it. Everything works great if I run tomcat from the command line using tomcat's startup.bat file. Any help would be appreciated. ~Samit Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TryNo2: path attribute for Context element in tomcat 5.5
thanks a lot, Hassan and Chuck, for your replies. Context element description (http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) : path... The context path of this web application...The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase. I just find it a bit strange that tomcat5 derives the Context path from the actual filename. Was not the tomcat3 way of setting the context path in the 'path' attribute better? Does anyone know the story behind this change? Kind regards, Alex. -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Friday, 25 November 2005 2:47 AM To: Tomcat Users List Subject: Re: TryNo2: path attribute for Context element in tomcat 5.5 Akoulov, Alexandre [IT] wrote: I am just wondering if you have any comments on the following email: Is it a right way to configure a context ? You configured it one way and it didn't work. You configured it *per the documentation* and it *did* work. What kind of comment would seem to be necessary? :-) -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: path attribute for Context element in tomcat 5.5
I'd greatly appreciate if you could give me the feedback on the following email: -Original Message- From: Akoulov, Alexandre [IT] Sent: Wednesday, 23 November 2005 12:16 PM To: Tomcat Users List Subject: path attribute for Context element in tomcat 5.5 Hi all, I am in the process of upgrading from tomcat-3.3 to tomcat-5.5.12. One of the changes in tomcat 5.5 is the configuration of contexts (ie web apps) is now being done in individual files (with a .xml extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory ( rather than in $CATALINA_HOME/conf/server.xml, which is a tomcat-3.3 way). To test this new configuration I've created the $CATALINA_HOME/conf/Catalina/localhost/test.xml with the following content: - ?xml version='1.0' encoding='utf-8'? Contextpath=/testProjYY docBase=/home/alex/release/TestProj/war reloadable=true crossContext=true allowLinking=true Logger className=org.apache.catalina.logger.FileLogger directory=/home/alex/release/tomcat-5.5/logs prefix=localhost_log_TestProj. suffix=.txt timestamp=true/ /Context - As you can see the 'path' attribute is '/testProjYY' and in order to access this app I tried to hit http://sydap42d.aus.nsroot.net:8080/testProjYY/TestServlet url and I got 404 (The requested resource (/testProjYY/TestServlet) is not available.) error. So I went to Context element description (http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) and found the following : path... The context path of this web application...The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase. Last sentence indicates that the 'path' attribute value is ignored, unless Context element is defined in server.xml (which is not encouraged in tomcat-5.5), and .xml file name is used as a context path instead. Therefore I've modified $CATALINA_HOME/conf/Catalina/localhost/test.xml (got rid of the 'path' tag): - Context docBase=/home/alex/release/TestProj/war reloadable=true crossContext=true allowLinking=true Logger className=org.apache.catalina.logger.FileLogger directory=/home/alex/release/tomcat-5.5/logs prefix=localhost_log_TestProj. suffix=.txt timestamp=true/ /Context - Then I hit http://sydap42d.aus.nsroot.net:8080/test/TestServlet (/test context path is derived from $CATALINA_HOME/conf/Catalina/localhost/test.xml filename) and got the html generated by TestServlet. Is it a right way to configure a context ? It just seems a bit strange that the 'path' attribute is completely ignored and instead the filename is used as a context path. Thanks a lot for your time and assistance on this matter. Kind regards, Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: path attribute for Context element in tomcat 5.5
woops, sent it by mistake, just ignore please :) -Original Message- From: Akoulov, Alexandre [IT] Sent: Thursday, 24 November 2005 5:51 PM To: Tomcat Users List Subject: RE: path attribute for Context element in tomcat 5.5 I'd greatly appreciate if you could give me the feedback on the following email: -Original Message- From: Akoulov, Alexandre [IT] Sent: Wednesday, 23 November 2005 12:16 PM To: Tomcat Users List Subject: path attribute for Context element in tomcat 5.5 Hi all, I am in the process of upgrading from tomcat-3.3 to tomcat-5.5.12. One of the changes in tomcat 5.5 is the configuration of contexts (ie web apps) is now being done in individual files (with a .xml extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory ( rather than in $CATALINA_HOME/conf/server.xml, which is a tomcat-3.3 way). To test this new configuration I've created the $CATALINA_HOME/conf/Catalina/localhost/test.xml with the following content: - ?xml version='1.0' encoding='utf-8'? Contextpath=/testProjYY docBase=/home/alex/release/TestProj/war reloadable=true crossContext=true allowLinking=true Logger className=org.apache.catalina.logger.FileLogger directory=/home/alex/release/tomcat-5.5/logs prefix=localhost_log_TestProj. suffix=.txt timestamp=true/ /Context - As you can see the 'path' attribute is '/testProjYY' and in order to access this app I tried to hit http://sydap42d.aus.nsroot.net:8080/testProjYY/TestServlet url and I got 404 (The requested resource (/testProjYY/TestServlet) is not available.) error. So I went to Context element description (http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) and found the following : path... The context path of this web application...The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase. Last sentence indicates that the 'path' attribute value is ignored, unless Context element is defined in server.xml (which is not encouraged in tomcat-5.5), and .xml file name is used as a context path instead. Therefore I've modified $CATALINA_HOME/conf/Catalina/localhost/test.xml (got rid of the 'path' tag): - Context docBase=/home/alex/release/TestProj/war reloadable=true crossContext=true allowLinking=true Logger className=org.apache.catalina.logger.FileLogger directory=/home/alex/release/tomcat-5.5/logs prefix=localhost_log_TestProj. suffix=.txt timestamp=true/ /Context - Then I hit http://sydap42d.aus.nsroot.net:8080/test/TestServlet (/test context path is derived from $CATALINA_HOME/conf/Catalina/localhost/test.xml filename) and got the html generated by TestServlet. Is it a right way to configure a context ? It just seems a bit strange that the 'path' attribute is completely ignored and instead the filename is used as a context path. Thanks a lot for your time and assistance on this matter. Kind regards, Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Server push
Can somebody tell me server push? -- [EMAIL PROTECTED]