RE: Multi user setup in a non root environnement
> From: François Conil [mailto:[EMAIL PROTECTED] > 2) I created a tomcat user and tomcat group, chowned the whole tomcat > directory to tomcat:tomcat and launched the tomcat server without any > particular switch after having su-ed to the tomcat user. > > The www.site.com:8080/ default page works great, but trying to get to > www.site.com/~user/test.jsp or > www.site.com:8080/~user/test.jsp issues a > 404 error from tomcat. Can Tomcat read ~user/test.jsp as the non-root user? Presumably that file and its containing directory would need world read access. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Does Tomcat provide support for PHP scripts
> From: Ikonne, Ike [mailto:[EMAIL PROTECTED] > Does Tomcat provide support for php scripting language? Yes, you could build PHP as a CGI program and run it using Tomcat's CGI support, but this would be pretty slow. There is no facility that I know of to integrate PHP with Tomcat. Otherwise, as Markus suggests, run Apache, run PHP inside Apache and use a connector to link Apache and Tomcat. Be aware that connecting Apache and Tomcat seems to be a somewhat fraught operation! - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Managing sessions - Object destruction
> From: David Kerber [mailto:[EMAIL PROTECTED] > I don't know javascript hardly at all, but would it work to write a > little script and use an onClose event to trigger a logout request? Yes, unless the browser crashes, the user disconnects from the internet before closing the browser, or the browser doesn't support Javascript. The first should(!) be rare, the second and third more common. In any event, it's not reliable behaviour. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Managing sessions - Object destruction
> From: Victor Hugo Germano [mailto:[EMAIL PROTECTED] > The problems is, when do i have to kill the session?? Even when the > browser is closed, the session continues at the memory... Remember that HTTP is a stateless protocol. Tomcat does not (and cannot) know that the browser has been closed. All it knows is when it last saw a request. After some time (which varies between applications), a Web server may make the assumption that the session is unlikely to be used again and may tear it down. Are you expecting a session to end at the instant a user closes their browser? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Site Not Getting Spidered or Indexed
> From: Scott Purcell [mailto:[EMAIL PROTECTED] > Actually Peter, > > I have no javascript links on my page. The site is a struts site, and > all links are regular links with no odd, or peculiar issues. OK. I'd be able to make better guesses if I could see the site - apologies if I've missed a URL that you've already handed out. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Site Not Getting Spidered or Indexed
> From: Scott Purcell [mailto:[EMAIL PROTECTED] > When I submitted the site to google, this is the page I submitted. Why > wouldn't my site get spidered? - Google can't read the links because they're embedded in a nice pretty dynamic Javascript-y menu system; - You're returning an odd encoding and the spider can't extract the information (happened to me with MSN, not Google); - Probably a bazillion other things. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.16 Bug? messes up when a class has the same name as a package
> From: Allistair Crossley [mailto:[EMAIL PROTECTED] > Tomcat is just adhering to the Sun Java specification naming > conventions. Packages should be lowercase. The OP's described package names *are* all lower-case, and the class names are uppercase. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Better Linux Distribution for production environment
> From: korbben [mailto:[EMAIL PROTECTED] > Which Linux distribution can i choose for production > environment ? My recommendation would be 'the one you already have most experience with or where you know the most people who can support you'. Distro wars are common; but I've not yet found any distribution to be *significantly* better than any other for production use. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NT Service and JRockit
> From: Pitre, Russell [mailto:[EMAIL PROTECTED] > "Please select > the path of a J2SE 5.0 JRE installed on your system:", I then chose > "C:\JAVA\jrockit-R26.0.0-jdk1.5.0_04\jre\bin\jrockit" as the path. Thinking aloud here, but wouldn't the path be just to c:\...\jre ? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Are filters restricted to be within contexts?
> From: David Kerber [mailto:[EMAIL PROTECTED] > Basically, I'd like to know if a filter can be used to change > a context > path, or are they restricted to acting within a given context? Filters are spec-compliant and per-context. Valves are Tomcat-specific and can be per-instance. You could probably get the effect you want with a valve - give us more information and you might get more specific pointers :-). - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupPrinterService problem
> From: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] > Starting the Tomcat as Windows Service it cannot find > printers What user is the service running as? Also note that profiles are never loaded for processes running as Windows services, so any profile information that may be set for a given user (including the printer information) won't be accessible to the service anyway. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Question about licensing
> From: Leon Rosenberg [mailto:[EMAIL PROTECTED] > For process reasons the source code of > the libs will not be available Then LGPL is unsuitable. > The jars would be free for copy, modification, usage, all the gpl > stuff, but not available in sourcecode. Apache and LGPL are often unnecessarily complex. (L)GPL in particular is more a weapon of IP warfare than a software license in my opinion. Why not a BSD or MIT license? Do you need any further restrictions on distribution of the libraries than those provide? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I set tomcat NOT Case Sensitive
> From: David Kerber [mailto:[EMAIL PROTECTED] > Ok, I see that, and it's kind of scary! That seems like a > pretty poor > design for the compiler not to handle that kind of change. It ain't the compiler - the JSP compiler never gets invoked because the mapping is case-sensitive, and the mapping is case-sensitive because the servlet spec states that it is - and as Tomcat is the reference implementation of the servlet spec, it adheres to the spec even where the spec is poor. You could get round the problem by putting multiple mappings into web.xml, so that jsp, JSP, Jsp, jSp and all the other permutations get mapped to the compiler. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I set tomcat NOT Case Sensitive
> From: Tim Lucia [mailto:[EMAIL PROTECTED] > If you ask for /path/to/some.JSP, you will see the source > code of the jsp, > since the jsp compiler is mapped to *.jsp (and not *.JSP). Presumably [I haven't tested this] detection of accesses to WEB-INF and META-INF will also fail, exposing the webapp's configuration files to scrutiny. These can include database connection details, passwords, and similar, even if those are not present in the JSPs. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat and websphere compatibility
> From: Long [mailto:[EMAIL PROTECTED] > Has anyone develop in Tomcat and deploy to Websphere? Bodington (http://sf.net/projects/bodington) is developed and tested on Tomcat (4.x, 5.0.x and 5.5.x - we have a mixed development team). We deploy on a variety of containers; I believe at least one institution has deployed it on WebSphere with no issues. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question
> From: Andrew English [mailto:[EMAIL PROTECTED] > Were do I need to look to figure out what SQL server > tomcat/jboss 2.4 is pointing at? Could be anywhere. A generic approach that will probably get you quite a long way is to run: netstat -an | find "1433" And seeing what the far-end IP address is for the established connections. A network sniffer will also tell you which database is being used if you can't deduce it any other way (it's buried in the byte stream in cleartext). - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: javaservice.exe
> From: Andrew English [mailto:[EMAIL PROTECTED] > Is there anyway to force close the javaservice.exe on > windows? When I tried to do it under Taskmanager (as > Administrator) it tells me "could not be completed.. access denied". If it's running as LocalSystem, not to my knowledge - you don't have the privilege. But of course you ran it as some lower-privilege account than LocalSystem didn't you? ;-) - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sad: Tomcat 5.5.x crashes almost every single day.
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Tomasz Nowak > Probably important: > === [lots of technical details about kit and container config] Very important == Your application. Have you profiled it for memory leaks that would cause a OOME? Have you tested it for deadlocks that would cause hangs? Has it worked correctly for an extended period of time under another servlet container? > The pain: crashing Tomcat > == > > Everything works right until Tomcat suddenly crashes, > what happens almost every single day. Sometimes it crashes > with OOME / out of heap (heh, is 1GB not enought!?) Depends on your application. Cocoon can be quite heavyweight. > Any ideas before abandoning Java technology? ;) Profile your application. What's eating memory? Get a thread dump when your application hangs. Is anything deadlocked? What? Where? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to separate tomcat instances?
> From: lk [mailto:[EMAIL PROTECTED] > I'm not sure my solutions is correct: I have 3 different > directory, and > each directory contains a complete binary distribution of tomcat. > And I have to startup each tomcat instance. > Is it the good way? It's not a *bad* way, as you can upgrade each one independently if required. You could save a little disk space by merging the installations, but only a few megabytes. Yes, you'll have to start each instance - each is a separate process. You could write a script to automate this. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to separate tomcat instances?
> From: lk [mailto:[EMAIL PROTECTED] > I would like to know if it is possible to run multiple > instances of tomcat. > I've read the documentation and I found out that I can configure > multiple workers to serve multiple instances of Tomcat. > But I haven't understood if in this way the contexts served > by a worker > are protected against a failure of the others workers? Each instance of Tomcat runs in its own Java virtual machine (JVM). Each JVM is isolated from other JVMs - so if one crashes, the others are OK. > Furthermore I would like to know if it is possible to run tomcat5 and > tomcat4 on the same server? Yes. I do it regularly on this server when I'm testing compatibility of one webapp. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat IP and Session ID's
> From: Paul Roberts [mailto:[EMAIL PROTECTED] > I was wondering, over and above encrypting the communications > channel how does HTTPS help to prevent session ID hijacking? To my knowledge, it doesn't (better heads than me may wish to contradict me here). But keeping a randomly-generated session ID encrypted during communication is exactly as strong as keeping (say) your credit card information, or your bank account login and password encrypted across the wire. It's pretty clear that most organisations are willing to trust SSL for financial information; if you are doing something that requires higher security than that, you'll want to investigate additional mechanisms such as client certificates. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat IP and Session ID's
> From: Paul Roberts [mailto:[EMAIL PROTECTED] > I have a question regarding IP address and session ID's. > > If a user on IP Address 1 connects to the Tomcat server and is given > session ID A, what happens if that session ID is hijacked by > someone on > IP address 2 and then used for a further request. How would the > different version of Tomcat react to this, if at all. > Specifically does > Tomcat hold a relationship between IP address and session ID which is > checked on each subsequent request. No. In fact, Tomcat should not do so - some users access Web servers via a farm of proxy servers, and different servers in the farm (with different IP addresses) might make different requests for the same user, even when that user is loading (say) images on a single page. If you want to prevent hijacking of session IDs, the session must be over HTTPS, not HTTP. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Question
> From: Andrew English [mailto:[EMAIL PROTECTED] > Is there anyway to check this theory? > -Original Message- > From: Peter Crowther [mailto:[EMAIL PROTECTED] [...] > I suspect an operations issue. Has someone configured a revision > control system (such as CVS or Subversion) on the production server, FileMon on Windows or your preferred syscall tracing utility on your flavour of UNIX. I see from a later post that you plan to do this anyway. If you're on Windows, you could also enable file auditing on the server and turn on auditing for the directories that contain the HTML files - this feature is provided by default on NT-derived OSs, logs to the security event log, and means you won't get tons of irrelevant output from FileMon. However, I'd advise increasing the size of the security event log if you're going to do this. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Question
> From: Andrew English [mailto:[EMAIL PROTECTED] > I have looked for the filenames.* on all the servers > including the linux > ones and not come up with anything except for what's on the > two servers. I suspect an operations issue. Has someone configured a revision control system (such as CVS or Subversion) on the production server, such that it does nightly checkouts of the 'known good' content, to assist in staging content from the development to the production server? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Sessions per user
> From: Daniel Guggi [mailto:[EMAIL PROTECTED] > I ran into a session-issue with a webapp. There are situations when it > would be nice for a user (same browser/same machine/same > webapp) to have > the possibility to login twice and thus have two different > JSESSIONIDs. If you use cookies to store the JSESSIONID, they're common to each browser process (for in-memory) or across all browser processes (for on-disk) cookies. So one approach that I use when testing webapps is to start two processes and ensure the cookies are in-memory. Unless you're using multiple client processes, I'm not aware of any cookie-based approach that'll work. If you embed the JSESSIONID in the URL using URL rewriting, then you could arbitrarily elect to change the embedded JSESSIONID in a response that you returned to the user. However, you have all the usual fun issues of copy/paste URLs, favourites, and so on. A third approach would be to manage your sessions yourself, using custom code. There may be libraries out there that help with this, but I've not needed to do it and therefore don't know any. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problems running Tomcat
> From: Riccardo Roasio [mailto:[EMAIL PROTECTED] > it seems to start but if i try to see http://10.2.254.103 ( > the address > of the machine) from a browse it says impossible to connect... Try http://10.2.254.103:8080 - port 8080 is the default port on which Tomcat starts, not port 80. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Port 8443 won't become active
> From: Jeffery G. Summers [mailto:[EMAIL PROTECTED] > Our webserver is an IBM P615C AIX 5.2 box. Whose JVM and what version? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory Management between different webapps
> From: Roel De Nijs [mailto:[EMAIL PROTECTED] > I have a tomcat with ± 10 web-applications. Is there a > maximum or some guidance in the number of web-apps you can > put in one instance of Tomcat? Tomcat itself uses relatively little memory per-webapp (a few megabytes, depending on version). The major load comes from the number of simultaneous connections (and hence the size of the thread pool) and, even more, from how the webapps are written. You're in the best place to evaluate these. > And i start tomcat with the options -Xmx1024m -Xms1024m --> > is there some information or articles about how tomcat is > spreading all this memory over the web-apps? Is this > completely random, or first come first gets? What if a > web-app is called for the first time and all possible memory > is allocated to other web-apps? It's all one big object memory, shared between all the webapps. Roughly (there are many more nuances than this): whenever it gets full, the garbage-collector is run. If there's not enough space to allocate an object after the garbage collector has run, you get an OutOfMemoryError. So memory will be allocated as your webapps request it (and potentially returned to the Java VM's pool of free memory some unknown time after they stop using it); if a webapp is called for the first time and there's not enough space to allocate the memory required for its startup, you'll get an OOME. To my knowledge, there is no way of partitioning memory inside a single JVM such that the amount available to a given webapp can be restricted. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: From Java to C#, ASP.NET [Off Topic]
> From: Jess Holle [mailto:[EMAIL PROTECTED] > Nice terminology quandry that the app server marketeers have > dug for us. > > They've painted a world of "J2EE == EJB" and "J2EE == the only (good) > way to do Java in the enterprise" and transitively "EJB == the only > (good) way to do Java in the enterprise". EJB implies J2EE, but the reverse implication does not hold. That recognition is enough to defeat the marketing spin. - Peter P.S. So far to day, I've spent about half the day developing in C# and ASP.Net, and the other half developing in Java and JSP. I find them about as productive as each other, and neither as productive as one would ideally like. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting Tomcat
> From: Hooper, Paul [mailto:[EMAIL PROTECTED] > I am a new Tomcat user and am having some difficulties starting the > server [...] > Using JRE_HOME: /export/home/liondev/software/java_1.4.2_10 5.5 needs *either* a Java 1.5 VM *or* the JDK 1.4 Compatability Package available from the download links at http://tomcat.apache.org/download-55.cgi - this may be your problem. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: writing files with a web application
> From: SOA Work [mailto:[EMAIL PROTECTED] Check the Servlet Spec (version 2.4 is at http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ ) for questions of this kind. >From memory in both cases (so treat with caution): > 1.) am I allowed to call main methods or programms in my web > applicatio? If you wish to be spec-compliant, no. However, it should work depending on Tomcat's security settings. > 2.) am I allowed to write files on the disk from within an > web application? If I am, something went wrong while trieing ;-) > Can i write anywhere or have I to write to my application dir > or to temp dir or something. If you wish to be spec-compliant, you can only write to a temporary directory that you ask the context for. However, this may or may not be enforced depending on Tomcat's security settings. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Windows XP SP2 - design question
> From: Snow white [mailto:[EMAIL PROTECTED] > We use a > cookie to maintain the state that determines what is sent to the > client, and we update the cookie in every response of this URL > request. So, presumably, your app already breaks if a user uses the 'Refresh' button on the page, even pre-SP2? > This is an old application that has been working fine for many years, > so I would like to change it minimal. Let me know if anyone has any > thoughts to handle this. You'll have to modify your app. One approach would be to have one change of state going into the page that requires the control, and another once you know the control is active - but that's difficult to do if the control stays installed between sessions. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5 ssl w/multiple IPs
> From: Chris Pat [mailto:[EMAIL PROTECTED] > do I > really need to a dedicated NIC for each of the static > IPs I want run SSL sites on? No. The configuration mechanism depends on your OS, however. Windows boxes can have at least 20 IP addresses bound to one adapter. Get the adapter properties, double-click TCP/IP, click the Advanced button, and fill in pairs of IP address and subnet mask. Linux boxes can have multiple IP addresses bound to 'virtual' adapters eth0:0, eth0:1, eth0:2... up to (presumably) some kernel limit. These virtual adapters are then each configured separately. Haven't tried it on other OSs, so don't know the precise mechanism. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: concurrency of users on tomcat
> From: vishwas kharajge [mailto:[EMAIL PROTECTED] > Our requirement is to provide 200 concurrent hits per second > There are 300K users registration on the server > For this what is the requirement? Hiring someone who can do the calculations. > How much bandwidht it require for giving above concurrency? If you are serving (eg) the old homepage to www.purple.com, around 200 x 1kbyte/sec - call it 2Mbit/s. If you are serving (eg) large PDFs or images, very much more than that. It is *impossible* for anyone on this list to answer that question without detailed knowledge of your application. If you're not comfortable doing the calculation yourselves, hire someone who is. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat integegrated with Apache
> From: Rafal Zawadzki [mailto:[EMAIL PROTECTED] > Why not use squid? One view: Why go through another user-level process when you can simply redirect the socket connections via iptables for fewer CPU cycles and less RAM? Another view: squid may be faster at serving static content, so interposing it could be useful if you suspect that is a bottleneck. Recent Tomcats are faster than older Tomcats at serving static content. My view: It depends on your mix of content and your webapp. In general, it's not possible to know which is more efficient *in your environment* without benchmarking it. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to suppor 30000 concurrent users
> From: vishwas kharajge [mailto:[EMAIL PROTECTED] > howmany concurrent users does tomcat support? Depends very largely on your webapp. How efficient is it? How many operations per minute is each user making? Does it require session state, or can you get away without it? Can it be clustered? I strongly suspect that you'll make much more of a difference by careful construction of your application than you will with Tomcat's overhead. That said, http://www.theserverside.com/news/thread.tss?thread_id=38377 may be relevant - no doubt others will come up with better links! - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Tomcat 5.5 as a standalone web server
> From: George Sexton [mailto:[EMAIL PROTECTED] > I'm running around 700,000 pages a month on a pure tomcat > installation with no problems. Just for interest, George, is that on similar hardware / software to your benchmark at http://www.mhsoftware.com/caldemo/manual/en/pageFinder.html?page=622.htm ? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 5.0.28 and 64 bit and Libc
> From: Shawn Snodgrass [mailto:[EMAIL PROTECTED] > Having weird install problems need a quick sanity check, > version 5.0.28 will > run on 64 bit architecture right? > > Tomcat Version = 5.0.28 > > Architecture = AMD64 > > OS = Linux ES 3.0 > > Libraries = All 64 bit What JVM are you using? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Top posting (was RE: question)
> From: George Sexton [mailto:[EMAIL PROTECTED] > Since most people use threaded mail readers that go from oldest to newest, > this isn't much of a problem for most people. ... I'm sorry? Which 'this' were you referring to here? It wasn't in context, so I'm afraid I can't tell for sure. I'll have to guess - another issue with top posting. [scrolls down, reads his entire earlier message] Ah. After some research, I assume it was: > > that context may jump about as different posters > > respond to different parts of a thread at different times. It would appear that 'most people' have better memories than I do, then - which is fair enough. > You should look for a better mail reader. I've used plenty of different mail and news readers over the years. I've not yet found one that reminds me of the context when I have jumped back (say) five messages in a thread, rather than (say) eight. As always, I'd welcome any recommendations! - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Top posting (was RE: question)
> From: Carl Olivier [mailto:[EMAIL PROTECTED] > A lot of people on this forum Top Post. > > Is this really such a big issue? I can sum it up with the following quote: -- snip -- A: Top posting. Q: What's the most confusing thing about mailing list messages? -- snip -- If I'm reading through list traffic, I cannot remember the context of each thread, and that context may jump about as different posters respond to different parts of a thread at different times. *Carefully trimmed* context, followed by a response, helps me get up to speed and respond more quickly and possibly more accurately than I otherwise would. However, speaking personally, I'd rather somebody top-posted than left ten pages of mangled context in place and added a line at the bottom. A message to a mailing list will get read many more times than it is written. Overall, time is saved if the poster makes the effort to create a clear, communicative message. However, the poster's time is typically saved by not doing so, and an individual will usually only do something if it is worthwhile to *them* rather than to the community at large. That's life. I'd like to think that if I reliably construct clear messages, regulars on the list may choose to respond to me where they wouldn't choose to respond to a messy, mangled message*. However, I've not seen or done any studies to check whether this might be the case. - Peter * Interested parties may wish to check the game theory literature for repeated rounds in games, of which the most famous is probably the repeated Prisoner's Dilemma. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: UnsupportedClassVersionError
> -Original Message- > From: e-Denton Subscriber [mailto:[EMAIL PROTECTED] [...] > java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main > (Unsupported major.minor version 49.0) I suspect the tools.jar in your classpath is from Java 1.5, not Java 1.4. Certainly *something* you're trying to load has been compiled using 1.5. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Howto delete a file with a servlet???
> From: Carl Olivier [mailto:[EMAIL PROTECTED] [...] > if (!toDel.delete()) { > Thread.sleep(1000); //try get around file lock/release > issue? (? Stab in the dark maybe!) [...] Heh. Is someone working on Windows here? There's a known issue that the JVM holds onto file handles until a garbage collection, which prevents deletion if the file has recently been used. Instead of sleeping, you may want to hint to the JVM about a garbage collection, then retry. Not an issue on UNIX as unlink() works with outstanding file descriptors referencing the file, by design. This recently cost me half a day of debugging effort. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is TC 5.0.28 forward compatible with Java 5
> From: Satish MG [mailto:[EMAIL PROTECTED] > I am using Tomcat 5.0.28. Now I have to port the Tomcat to > Java 5.0. Even though Tomcat 5.5.X is Java 5 compatible with Java 5, > I wanted Tomcat 5.0.28 on Java 5. So I wanted to Know whether Tomcat > 5.0.28 is compatible with Java 5. If not Which version Of > Tomcat 5.0.X is compatibl?. I've been running a small Tomcat 5.0.28 installation on Windows, first on various flavours of 1.4.2 and now on 1.5. I've not seen any problems running Tomcat 5.0.28 on Java 5, but - to be clear - it's a small installation and is not heavily loaded. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: heap size problems (speed) [2]
> From: Cristian S [mailto:[EMAIL PROTECTED] > Frankly I have no ideea what's the point of loading almost > 400M of data in memory in a HashMap. > Maybe this very approach has a design flaw when it comes to JAVA. If it's expensive to generate / load that data and the app has tight response time restrictions, and if there's enough RAM to keep the data in main memory without paging, and if the heap is large enough to allow other processing to take place, and if the map is set up so that there are few collisions, then the map is a very sensible approach. That's a lot of ifs. I'd try the following: - Check for paging traffic on your server. Are other apps causing Tomcat to be paged out, leading to expensive disk I/O when the map is accessed? - Follow Chuck's suggestion to check for garbage collection activity. If possible, try increasing the Java heap size (and check for paging activity on the server). - Talk to your dev team to find out how well or badly the map is keyed. A HashMap with a lot of entries can be slow if the hash for the key is poor. I'd expect to see high CPU usage *or* high paging activity if this was the case, as the server will either spend a lot of its time hashing or have to load a lot of pages from backing store to examine them for hash keys. Neither is pleasant. Java HashMaps aren't inherently slow; something's poorly configured. Those are a few guesses, no more than that. I also suspect it's *not* your CPU cache size. Yes, going to RAM is slower than loading from a processor cache line, but it's still a *lot* faster than retrieving a row from the database. I'd be looking elsewhere. Intel have spent a lot of money making people think that the CPU is the only contributor to overall system speed; RAM and disk I/O speeds play a much larger part these days. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Package naming
> From: Ajay Arjandas Daryanani [mailto:[EMAIL PROTECTED] > i've written a authorization filter for Tomcat. The question is: is > there any convention about package naming? Can I use, for example, > 'package es.mydomain.myname;'? Or it's better to use 'package > filters;'? The conventional Java approach of using your domain name to ensure the uniqueness of package names applies just as much in Tomcat as everywhere else. I've only needed to break that once, when I was hacking at some Tomcat internals and needed access to some classes that only had package access. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: stress test on tomcat
> From: William Mok [mailto:[EMAIL PROTECTED] > java.net.SocketException: Too many open files What operating system? Naively, that looks like the good ol' UNIX limit on the number of file descriptors available to a process - if so, read up on how to change the descriptor table size for your kernel. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: advice on auto logout servlet
> From: Mark [mailto:[EMAIL PROTECTED] > So there is no way to provide this functionality using just > servlets :( You could sort-of hack something together using meta-refresh directives on the pages so that the browser knew to refresh the page just as the server timed out the session, but you need to tell the browser *something* in order for it even to request the page from the server. HTTP is a pull technology, not a push technology; a browser has to ask for content. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and linux system users
> From: Kosarev A.V. [mailto:[EMAIL PROTECTED] > Whether I can configure tomcat so that for each context worked on > behalf of various linux system users? Tomcat runs in a single Java virtual machine, and that entire JVM process runs under a single user ID. To my knowledge (I'm sure others will correct me if I'm wrong), there is no way to change the user ID depending on the context in which a request is processed. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maintain separate sessions for each browser tab/window
From: John Cartwright [mailto:[EMAIL PROTECTED] Does anyone have a suggestion on how to maintain a separate session for each browser tab and window? Currently the same session is shared for each frame, window, tab of a given brower instance and context. I only wish this were possible - it would make life a lot easier for a number of the apps I work on. Unfortunately, it's not. Cookie state is maintained client-side, as is window state. On current browsers (and in the spec), all windows to the same site share the same cookie state, so using cookies is out. If it were possible to detect opening a new window using Javascript in a portable way, you might be able to do something there using an extra GET parameter to indicate a newly-opened window; but, to my knowledge, it isn't possible to do this in a way that is either portable* or works with all combinations of back and forward buttons plus new window opens at arbitrary points. - Peter * Non-portable solutions include browser plug-ins for IE and Netscape-derived browsers; these *can* spot new windows as they open and *can* cause the DOM in those windows to be amended. May not get you very far with Lynx, though... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SSL on tomcat + jk2 + apache2 + RedHat
> From: Gangaa D [mailto:[EMAIL PROTECTED] > So How do I get Trusted Root Certification > Authorities? If you have control over all the browsers that will be accessing your application: put your self-signed certificate into each of their trusted stores. If you don't have control over some of them: Pay money to an issuer who *is* in there to issue you a valid certificate, and install that in your keystore. I tend to use Thawte, mainly because I know some of the staff there; I've had good service thus far, but your mileage may vary. I've not had to do this on a Tomcat system; check that the issuer will issue the cert in a format that is appropriate for Tomcat before you pay money. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SSO question
> From: Klotz Jr, Dennis [mailto:[EMAIL PROTECTED] > Is it possible using LDAP, whether it is using custom JAAS code or a > third party product such as Vintela's VSJ > (http://www.vintela.com/products/vsj/), to do the following: > > "... prevent, control or limit the simultaneous active usage > of the same > user id. The number of simultaneous active sessions shall be settable > per user id." > > The show stopper for me is whether I can inform the LDAP > server when the > user has logged out. The default JNDIRealm does not, to my knowledge, > provide that ability. JNDIRealm is just for authenticating and role > retrieval. You *could* do something like this by storing a custom attribute in LDAP and incrementing/decrementing that when a user logs in/out. I'm not sure where it'd get you, though, given users' distressing habits of closing browsers without logging out of an app and hence leaving the session open for a period. That sounds like it's come straight out of a requirements doc. I'd ask who wrote the requirements doc, what's the business reason behind that requirement, and can it be accomplished another way? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to remove port number from URL
> From: Goay Zee Ling (ACM/MIS) [mailto:[EMAIL PROTECTED] > I just tried using the tomcat connector > and faced some problem too. I have posted a question "tomcat connector > isapi_redirect.dll not available" to this list. > > Do you have any idea on this? I don't - I use separate IP addresses and sort it out at the firewall, so have never set up JK. Sorry. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to remove port number from URL
> From: Goay Zee Ling (ACM/MIS) [mailto:[EMAIL PROTECTED] > Hi. I have a simple question. ... But not a simple answer given your configuration. > On the server, I have both IIS 5.1 and tomcat 5.0. > With both running respective application, is it possible to remove the > port number for calling tomcat application? Only one process can listen on a given port and IP address combination - this is a basic restriction of the socket model. IIS and Tomcat are different processes so must listen on different port+IP address combinations. However, you may be able to try one or more of the following: - Assign two IP addresses to the computer. Set IIS to listen on port 80 on one IP address, Tomcat on port 80 on the other IP address. - Use IIS to listen to port 80, set up a JK connector in Tomcat, and use the JK connector to forward requests from one or more Web sites in IIS to be processed by Tomcat. http://tomcat.apache.org/connectors-doc/index.html is a useful page. Use JK, *not* JK2. JK2 is no longer supported. - Use Squid or a similar reverse proxy to listen on port 80, set up IIS and Tomcat so that both listen on different ports, and forward requests to one or the other using Squid. There may be other solutions. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Google Map of active users on this list
> From: Luis Torres [mailto:[EMAIL PROTECTED] > Very nice work. Any plans to release details on how you did > it? One could do something similar by: - Subscribe to the list. - Archive the messages in (say) mbox format. - Write yourself a little script that pulls out message headers, in particular the From: and Received: headers for each message (don't forget to recombine multi-line headers before you do this). - In each of the Received: headers, look for IP addresses or hostnames (a couple of regular expressions should do 99% of cases). Discard any lines where this fails. - Where you have hostnames, try to resolve to IP addresses. Discard any you can't resolve. - Using one of the location services, for each message, in order of first Received header to last, pass in the IP address and see if you get a match back. If you do, that's the location. If not, keep trying until you run out of header lines or find a match. If you want to be flash about this, maintain a 'stop list' of IP addresses of known mail gateways that are just too general to be useful. - Extract the sender's mail address and name (if present) from the From: line and add a record to your database with name, email address, and location. There are refinements, but I suspect that would work. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Google Map of active users on this list
> From: Allistair Crossley [mailto:[EMAIL PROTECTED] > yes this is very very cool. i'm in london though - on the map > i'm in cambridge .. i think are corporate ISP is there though ;) It appears to be analysing the 'Received from' headers in the email and finding the one closest to the head of the message with a hostname that can be resolved to an IP, then using one of the IP range to location databases - not sure which one - to find a location. This puts me in Rochdale, again because our ISP is based there. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat - OutOfMemoryError
> > From: Anna Seekamp [mailto:[EMAIL PROTECTED] > > The jvm (1.4.2 Suse-Linux) starts with: > > -server -Xmx1500m -Xms1500ms > > > > We have 9 webapps. > > One webapp has 50% load. > > The other share the rest. > > If we put 7 webapps online, we > > ran into problems. After a few hours we get OutOfMemoryErrors. The > > tomcat crashes an we get no response. But there isn't a > heavy load (< > > 1). There isn't OutOfMemory (the last Runtime.freeMemory(): > 1,3 GB) The > > Thread-Dump of the crashed server is unspecific. Most threads are > > waiting on findBundle in CoyoteConnector.createRequest(). > > > > Are there any suggestions. Everything is welcome! > > I don't know where to look. Threads, Sockets, Memory (is > there a problem > > with Runtime.freeMemory) 1. Check the PermGen usage - are you slowly loading more classes in until the default (64M I think) PermGen is exhausted? Runtime.freeMemory doesn't take into account the separation between PermGen and the other generations. 2. Java has a distressing habit of throwing out of memory errors when it runs out of any resources, including file descriptors or sockets. You'll have one heck of a log file to analyse, but as a last ditch effort I'd try running a system call tracer on the process and look for failed calls. However, I'm a novice in these areas. I've no doubt you'll get better advice from those more experienced with large production apps. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URGENT: Running Tomcat 5.0 as a Windows service using a specific user
> From: Jan Andersson [mailto:[EMAIL PROTECTED] > I'll try again: How do I do to run Tomcat 5.0 as a Windows > service using a > specific user? I've tried using the Configure Tomcat > application, tab Log > On, but Tomcat is anyway started with "SYSTEM" as user. Jan, have you tried using the standard Administrative Tools>Services console, and changing the service's login there? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Character Encoding -ISo-8859-1 Vs UTF-8 Vs GBK
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > I don't think it's true > that UTF-8 can handle ALL european character very well. If it can't, the Unicode consortium (http://www.unicode.org/) will be pretty worried, as UTF-8 is an encoding of Unicode... - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]