RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
From: André Warnier [mailto:a...@ice-sa.com] X is not something I use regularly, so when Chris mentioned X, I thought he was talking about the secondary connection/port that the JVM/Jconsole agree on, not about X-terminal and so. So thanks for the tip, but could you expand even more ? I realise this isn't really a Tomcat matter, but maybe this can help someone else in a similar situation. At which level would X11 kick in ? It ships the stream of commands to display JConsole on your local desktop. Rough sequence of events: - Start an X11 server on your workstation. Find out its DISPLAY variable. - If using PuTTY, tell it about your X11 DISPLAY variable. It can't guess! - Use ssh/PuTTY with X11 tunnelling enabled to remote to your Tomcat host. - echo $DISPLAY to make sure it's come across OK. - Start Jconsole on the Tomcat host. It will display on your local desktop, via the ssh tunnel. The network part of this is no more complex than you already have. Layout is as follows : Office A : workstation (me) -- firewall/router - internet modem -- internet Office B : internet - internet modem - firewall/router - Tomcat host There is no VPN setup between A and B. My workstation is a Windows laptop. I don't presently have an X emulator on it. It has Java JDK 6, an SSH terminal-like program (putty), WinSCP, etc.. I'd rather avoid installing Cygwin on the laptop, because it interferes with other Unix-like things I have on it. OK. If you don't want to put Cygwin on - which is certainly the easiest+cheapest way of getting an X11 display on your laptop - then you still have options. You could, for example, install something like VMware (Server is free, which would be plenty for this job). You could then run, say, Ubuntu on the VM and ssh across from Ubuntu. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
From: André Warnier [mailto:a...@ice-sa.com] using XMing as the X11 server (client?, I can never remember..). Yeah, X's terminology is very counter-intuitive - I get comments of you're kidding every time I teach it. An X server serves out the keyboard, mouse and display. X11 clients connect to the X11 display server in order to display their output and get their input. All of which means that you often use an X server running on your workstation or thin client to connect to X client programs running on your application/web/... server. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
From: Gregor Schneider [mailto:rc4...@googlemail.com] http://sourceforge.net/projects/xming Just a simple install, very small, convinient and works like charm. Thanks Gregor, I wasn't aware of that one. Think I may just have a new preferred X server :-). - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: comet loop after webapp re-start
Thanks for the pointer. That bug does look related, as does this one: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403933 -- fixed against java 7. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
From: André Warnier [mailto:a...@ice-sa.com] Christopher Schultz wrote: What about forwarding X through the tunnel instead? You can't, because it is variable. It is the result of some internal negotiation between Jconsole and the remote JVM. Apparently, anyway. I haven't managed to make it work so far. To expand Chris' suggestion: What about forwarding the X11 protocol through the tunnel instead, such that you can run Jconsole on the same machine as the JVM? X11 has a fixed port number, and ssh has support for this. I've used this trick when needing to do something graphical on a box with ssh-only access; works a treat. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
comet loop after webapp re-start
I'm running tomcat 6.0.18 on Ubuntu 8.10. I have a comet application that maintains an open connection with tomcat. If I re-start my webapp and then close the client connection, tomcat goes into a loop and chews up all cpu. This server is not live and only has my single client. The ClientPoller thread consumes most of the cpu running through the following stack over and over. Daemon Thread [http-80-ClientPoller] (Suspended (breakpoint at line 654 in ThreadPoolExecutor)) ThreadPoolExecutor.execute(Runnable) line: 654 NioEndpoint.processSocket(NioChannel, SocketStatus, boolean) line: 1161 NioEndpoint.processSocket(NioChannel, SocketStatus) line: 1148 NioEndpoint$Poller.processKey(SelectionKey, NioEndpoint$KeyAttachment) line: 1555 NioEndpoint$Poller.run() line: 1508 Thread.run() line: 619 This is not a problem with my CometProcessor not handling the comet events; the END event when the client connection is closed is never delivered to my CometProcessor, understandably since I just re-started the webapp and there is now a new CometProcessor instance. I believe what is happening is that the NIO connector is trying to deliver the END event to a CometProcessor that no longer exists and just keeps trying. Should the NIO connector recognize that the event is undeliverable and give up? Or is there something I need to do in webapp shutdown code to tell the NIO processor to disregard any open connections? The workaround is to always re-start the tomcat instead of just the webapp. This is possible for me since my server is only serving a single webapp. Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: comet loop after webapp re-start
What JVM are you using? The stack trace doesn't look like anything that a HotSpot JVM would produce. It's Sun Java 1.6.0_10-b33. I grabbed the trace from my eclipse debugger. And I see the loop when running both with and without vm debug flags. Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: running tomcat with root user
From: epicwin...@hotmail.com [mailto:epicwin...@hotmail.com] I have the latest tomcat 6 installed under centos 5.2. The problem I am having is that it appears that I have to run tomcat as root user, because the spring app that tomcat starts needs to write files to other users' home directories. The tomcat user doesn't have access to these directories. I tried making these users part of a shared group, but to complicate the problem the users are jailed using jailkit. So it doesn't appear that jailkit lets me add group write privileges to the home directories and maintain a working jail. Can anyone suggest another alternative? I am not linux user expert so maybe there is an obvious solution i am missing? Beyond Andre's solution of ACLs, there's another one that's more complex but might be more secure. It requires a slight shift in architecture. 1) Run Tomcat as the tomcat user. Change the way it writes files, so that instead of writing to the user directory it writes the details to a queue that you have control over. That could be a database, or a chunk of filestore. 2) Write a second daemon that runs as root, that reads the queue, does whatever checks you require so that it believes the queued requests are genuine, then writes the queued items to the users' directories. This reduces the attack surface of the system, in that tomcat's not running as root. You'd have to be careful with the security of the daemon and the queue but, if well-designed, the overall security may be better than running Tomcat as root. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: running tomcat with root user
From: Brian Millett [mailto:bmill...@gmail.com] On Sat, 2009-01-31 at 19:25 -0800, epicwin...@hotmail.com wrote: I have the latest tomcat 6 installed under centos 5.2. The problem I am having is that it appears that I have to run tomcat as root user, because the spring app that tomcat starts needs to write files to other users' home directories. The tomcat user doesn't have access to these directories. I tried making these users part of a shared group, but to complicate the problem the users are jailed using jailkit. So it doesn't appear that jailkit lets me add group write privileges to the home directories and maintain a working jail. Can anyone suggest another alternative? I am not linux user expert so maybe there is an obvious solution i am missing? thanks http://commons.apache.org/daemon/jsvc.html Brian, how does this help the OP with their problem that the *application* needs to write to user directories? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Shared Library Issue using JVM ext
From: Ishtiaq Ahmed [mailto:ishtiaq.ah...@ooober.com] I know this has been discussed many time but couldn't find the exact thing I am looking for. I am deploying several application over tomcat6. Each having its own libraries in WEB-INF/lib. Many of the applications are using the same libraries like hibernate3.jar so this is increasing the size of the deployment. What I want to do is to copy all those libraries in a single location something like /opt/java/jre/lib/ext and let all the application use that... Is the size of the deployment actually a problem for you, or are you trying to tidy up? Unless the size of the deployment is really, genuinely a problem, I'd keep the jars in each application. Yes, it costs a little disk space. Yet, it costs a little memory. It will save you many headaches when one application's library version changes - you will be able to redeploy that single application without worrying about versioning of the other libraries. If the size of the deployment is really a problem, read http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html and choose whether you want to put your jars in $CATALINA_HOME/lib. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Very OT: RE: Slightly OT: ApacheCon Europe 2009
From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com] usually the tomcat committers crowd at one table during the hackathon, so feel free to seek us out and join us at the table. if you wear a red rose in your hair, it will be easier to find you ... why do I now have visions of a room full of (mainly male) hackers, most of whom have red roses in their hair so that it's easier to find them? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Performance of APR
From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com] Well, actually when it comes to IO performance Java outperforms C, so I wouldn't place my money on old bets like C is faster because its C. It isn't. Specifics! Which platform(s), which compiler(s), which runtime(s), which algorithm(s), by what amount, using what measure. What is the source of the performance claim you are asserting? I also wouldn't place bets. I would measure instead. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat getting stopped automatically
From: Javed420 [mailto:javed.inam...@gmail.com] I am doing processing over data from xls file on perticular request. But Tomcat gets automatically stopped in middle of execution. If anybody know reply. Does any of your code contain System.exit() when it encounters an error? Don't laugh, it's one of the commonest causes of unexpected server stops! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6 vs Apache running as services
From: kareda [mailto:k...@digiplace.ch] oh yes, and there is also IIS running as service. now, I probably could run the php apps there also but I'd rather not as it's a production environment for another app. IIS6+PHP doesn't handle threading enormously well - hence Microsoft's trumpeting from the rooftops about IIS7 and PHP. I routinely run IIS6 and Tomcat (sometimes up to 3 Tomcats) side by side with no ill effects. Apart from the usual comments about making sure you don't run out of CPU, memory etc, I would not expect running Apache httpd and Apache Tomcat side by side as services to cause problems. I've not done it myself, so I'll wait for someone who has to comment :-). - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: PostgreSQL vs MySQL with Tomcat
From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Sure we can argue about which DBMS has the fastest JOINs but nonetheless it remains that JOIN queries will always be computationally expensive compared to single table queries. Depends what you do with the results of those single table queries :-). I saw one application (mid-1990s) that used SELECT * FROM table to bring two 10M row tables into memory, then did O(n^2) comparisons between the keys to obtain data from both. When asked, the developer said he didn't understand joins in the database so did it the easy way. I'd hope developers are aware of computational complexity, load on different components, and the reponse time and throughput constraints on the application, and that they code appropriately rather than following dogma of the form X will always be expensive compared to Y. I've been surprised (rather too many times) when the will always be has turned out to be false. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: PostgreSQL vs MySQL with Tomcat
when they hit this kind of problem they assume it's a limitation of the kind of tools they are using Exactly, mostly its a suboptimal implementation of these technologies Our core business is reporting with complex risk modeling, we do intensive risk calculations on raw data using complex joins on millions of rows of data using page long SQL queries at time, and they do just fine on Postgres (milliseconds to a few seconds at worst). Occasionally we use some C functions when speed is an issue, but SQL joins are *hardley a bottleneck. Peter - Original Message - From: Chris Wareham cware...@visitlondon.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, 23 January, 2009 12:45:58 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: PostgreSQL vs MySQL with Tomcat Jonathan Mast wrote: Perhaps the discussion should move back towards how Tomcat interacts with databases. It would be more on topic, but a well architected web application will have a data access layer that is not dependent on the Servlet API, both for testability and reusability. While a data source may be configured in Tomcat, the correct use of dependency injection would mean that the data access layer shouldn't be concerned where the data source comes from. To reiterate, database interaction is an architectural issue, not a web container one. This thread seems to be damning MySQL for not having super advanced features, some of which should perhaps not even be in the purview of the database layer, but more appropriately belong at the application layer (ie. Tomcat). No, many people damn MySQL for it's lack of standards conformance and idiosyncracies that make it harder to maintain data integrity. I am particularly wary of MySQL because of the way missing features have been disingenuously described as unnecessary, and broken features as the MySQL developers knowing better than everyone else. For example, I rewrote a report generator for my company. The existing generator, a PHP + MySQL setup, was insanely slow and difficult to maintain being that it consisted of 1 php page containing hundreds of lines of code. I rewrote it in jsp + POJO and the new version runs much faster, because it doesn't have a single query with a JOIN clause in it. The old generator had super complex queries that took forever to run and placed an enormous amount of load on the database server. I achieved that same result of a JOIN by pushing that functionality up to the Java layer. Sure we can argue about which DBMS has the fastest JOINs but nonetheless it remains that JOIN queries will always be computationally expensive compared to single table queries. Well thats my 2 cents :) By it's very definition (see Codd or Date), an RDBMS should be capable of performing joins with good performance. MySQL often struggles to do so thanks to the poor optimiser, so you had to implement what should be core functionality of an RDBMS in your application layer. Great. Did you try explaining those queries to find out if reordering the joins would give the performance you were looking for? Or is MySQL the only database you are familiar with? This is the problem with much of the LAMP crowd - they've never tried anything else, so when they hit this kind of problem they assume it's a limitation of the kind of tools they are using, not of the specific tools themselves. Chris -- Chris Wareham Senior Software Engineer Visit London Ltd 6th floor, 2 More London Riverside, London SE1 2RR Tel: +44 (0)20 7234 5848 Fax: +44 (0)20 7234 5753 www.visitlondon.com 'Visit London Limited' is registered in England under No.761149; Registered Office: Visit London, 2 More London Riverside, London SE1 2RR. Visit London is the official visitor organisation for London. Visit London is partly funded by Partnership, the Mayor's London Development Agency and London Councils. The information contained in this e-mail is confidential and intended for the named recipient(s) only. If you have received it in error, please notify the sender immediately and then delete the message. If you are not the intended recipient, you must not use, disclose, copy or distribute this email. The views expressed in this e-mail are those of the individual and not of Visit London. We reserve the right to read and monitor any email or attachment entering or leaving our systems without prior notice. Please don't print this e-mail unless you really need to. - 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: PostgreSQL vs MySQL with Tomcat
Leon, it's rare for me to disagree with you, but... From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com] For example if you need all orders by user with name Chris, you will ALWAYS be faster if you first retrieve the userid, and than the orders of the userid. ... I disagree and can produce at least one counterexample. Performing two queries from the application layer requires two parses, two optimise steps, at least two more context switches on a single-core machine, two sets of serialisation of query and results, potentially more network traffic and latency... all extra cycles and resource utilisation that are avoided if the combined query is sent to the DBMS and executed there. Against those, you have to balance more complex parse and optimise times for the single query, plus the extra time to locate the data (which may or may not be in cache at the server). Back in 1992, I had exactly this situation on a Sybase 4.2 server on a SPARCstation 1 running SunOS. I profiled both implementations, and the single query case came back about 30% faster (I was only concerned about wallclock time so didn't check memory or CPU). That was with Sybase's relatively primitive optimiser. With a good query optimiser plus query plan caching and data caching, a modern SQL Server can do better and can find the savings in more cases. I suggest losing the dogma and profiling it with *your* data in *your* environment :-). You might be surprised. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: problem regarding installation of APR -- make command shows fatal error ..
From: Pswami Vivekananda [mailto:pswami.vivekana...@tcs.com] i am trying to install tomcat-native-1.1.13 on my apache-tomcat-6.0.16 server. What OS? ld: fatal: relocations remain against allocatable but non-writable sections collect2: ld returned 1 exit status Nice error! It's going to be a little difficult to debug without knowing a more about your environment. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: PostgreSQL vs MySQL with Tomcat
I realize that SQL isn't exactly the most widely adhered to standard Perhaps! But then again before the new ANSI SQL standard (particularly the ANSI SQL/92 join syntax changes) this was far worse, MS-SQL 6.5 and Oracle (SQL/86 standard) were horrendous and migrating was not fun, these days though Microsoft's T-SQL, Postgres, and ORACLE all use a very similar dialect, the only really major difference I can think of is T-SQL stored procedures, which have no counterpart in Postgres. In my modest experience though I have noticed the MySQL SQL dialect appears to be less similar. Postgres, IMHO, was held back for many years by not having a windows release version, but its super competitive now and a really rock solid database. There is nothing substantial missing from Postgres that the big (or should I say expensive) guns have. Its enterprise scale and has great tools and extensions (like Slony replication). I personally would not pay for a database when there is Postgres for free. Cheers Peter - Original Message - From: Rusty Wright rusty.wri...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, 18 January, 2009 08:09:54 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: PostgreSQL vs MySQL with Tomcat It's a rewrite of an app I did awhile ago in php. I think the biggest gripe I've had with mysql is the problem where I was violating a unique constraint and it was giving me some generic (completely useless) error; HY001 I think. In various ways, which I can't articulate, MySQL just feels to me more amateurish compared to PostgreSQL. With MySQL things are changed on an apparently ad-hoc basis and I've heard that they've broken backwards compatibility more than once. I realize that SQL isn't exactly the most widely adhered to standard, but MySQL seems to be more divergent than [most of] the others. When I had that HYwhatever error, I was completely stumped, so in order to troubleshoot it I copied the database to an MS SQL Server that I'd been using for something else. I remember having read somewhere that SQL Server is reasonably close to the SQL standard and I was amazed at how much work it took to translate my ddl and sql from MySQL to SQL Server. (Apache DdlUtils and Hibernate could have helped with the ddl.) I can't remember all of the various problems I've had with MySQL but here's one that seems typical; I started using it back when it was (or at least it seemed to me) more typical to edit user permissions by updating the mysql.users table, rather than using the GRANT command. So I have these various sql files that insert stuff in the mysql.users, mysql.db, and mysql.hosts tables and they have lots of 'y' and 'n' entries. At some point they changed things and they had to be uppercase. Previously I think they converted them to Y and N, but suddenly a newer version accepted the lower case with no complaints but didn't convert them, and they didn't work (it was as if the ys were Ns); I could have been inserting any random letter or digit apparently. That took some head scratching to figure out. I had forgotten that Sun bought MySQL so it should be interesting to see how that plays out. I heard that they're doing a major rewrite, starting from scratch, but going to keep it backwards compatible. Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rusty, Rusty Wright wrote: I'm in the process of migrating a MySQL database to PostgrSQL. Is this to cool-off your DBA's ears? ;) Seriously, if you could explain why you've decided to switch, I think it would help a lot of readers understand some of the differences between these two RDBMSs. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklyBnIACgkQ9CaO5/Lv0PCuvgCfdZ9j+2Z5cGuk3aQsYFg7VaAO msIAnR8r+ZmyYeJz2T3Sbzbk9hCEDGlU =26DN -END PGP SIGNATURE- - 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: PostgreSQL vs MySQL with Tomcat
Sorry my bad, absolutely correct. PostgreSQL does have support for stored procedures, you can even choose from 4 languages out of the box and 3 more from addons: http://www.postgresql.org/download/products/4.html. - Original Message - From: Kees de Kooter kdekoo...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Monday, 19 January, 2009 13:24:54 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: PostgreSQL vs MySQL with Tomcat the only really major difference I can think of is T-SQL stored procedures, which have no counterpart in Postgres. PostgreSQL does have support for stored procedures, you can even choose from 4 languages out of the box and 3 more from addons: http://www.postgresql.org/download/products/4.html. PL/pgSQL is the closest to Oracle's PL/SQL and MS's T-SQL. - 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 upload fails
From: Alan Chaney [mailto:a...@compulsivecreative.com] I assume that as you are using MSIE then your dev. system is a PC? I develop on linux and don't know of any particular network monitor to recommend. Wireshark again - http://www.wireshark.org/download.html has Windows downloads. Lovely tool. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Delay / caching of resources?
From: Dennis Thrysøe [mailto:d...@geysirit.dk] However, when such HTML files are added or modified to the webapp (exploded directory) it takes something like 5 or 10 seconds before they can be served by tomcat. A wild stab in the dark based on something that happened to me... How are you adding the files to the webapp? In particular, are you referencing the folder via a network file system, and if so is there any clock skew between the server and the machine from which you're adding the files? This can cause odd timestamps on the new files, which may in turn lead to some applications not using them correctly if the timestamps are in the future as far as the server's concerned. If you're adding the files on the same machine, this doesn't apply and I'll crawl back under my rock ;-). - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Installation apache tomcat
From: Vida Luz Arista [mailto:vida.ari...@ideay.net.ni] I downloaded the version apache-tomcat-6.0.18-src, I follow step by step the instructions, when I executed ant download, the following erro occur BUILD FAILED /opt/apache-tomcat-6.0.18-src/build.xml:701: The following error occurred while executing this line: /opt/apache-tomcat-6.0.18-src/build.xml:771: Compile failed; see the compiler error output for details. OK... so what does the compiler error output say? Taking a step back, why are you compiling from source rather than downloading a binary? Tomcat is pure Java, so provided you're running a decent Java virtual machine (the Sun one - *don't* use gcj to run Tomcat) the binary should work on your platform. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Optimized memory Parameter in Tomcat.
From: kashif_tomcat [mailto:kas...@vopium.com] our Tomcat 6 server is running on a RHL machine with 4 GB Ram. 32-bit or 64-bit OS? JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m -XX:MaxPermSize=128m You probably want to make -Xms and -Xmx the same. There's no point fragmenting the heap if you don't need to. server is working fine with these parameters but i wnt to know that are these parameters fine with my application or i need to change them for better performance? You are the only person who can answer that question, by monitoring and profiling your application. Performance is often 1% Tomcat and 99% application. with these parameters most of time i get following stats when i execute free -m command on server in peak hours (or something like that). [r...@vopium ~]# free -m total used free shared buffers cached Mem: 4050 3622428 0 385 2335 Looks healthy enough. NOTE: only apache and tomcat is running on this machine. no other heavy service running on this server. Why are you running Apache httpd as well as Tomcat? Because the book told me to or because you have a real need for it? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat MySQL Server Configuration
From: Carl Crawford Someone gave me the attached configuration suggestions. Note that this list strips attachments. Could you host the image somewhere and post a link? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Weblogic Remote EJB from Tomcat
There are various posts, but among them I can't find an answer. I hope there is one. I am Trying to do a Weblogic EJB t3 lookup from a web app running in Tomcat 5.5. After deploying WL 10.3 jars in Tomcat's common/lib area, I can authenticate with WL's security Realm, but when I do an InitialContext.lookup, I get this: (Yes, the same web app deploys and runs properly in WL's own servlet container) weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:74) weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:439) weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:395) weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380) javax.naming.InitialContext.lookup(InitialContext.java:392) com.fasttrack.utilities.EJBUtilities.lookup(EJBUtilities.java:499) com.fasttrack.utilities.EJBUtilities.lookup(EJBUtilities.java:471) com.fasttrack.tspd.webnav.LoginBean.login(LoginBean.java:95) org.apache.jsp.Login_jsp._jspService(Login_jsp.java:69) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:619) By the way I already tried IIOP instead of T3 and got a NPE somewhere else deep down -- View this message in context: http://www.nabble.com/Weblogic-Remote-EJB-from-Tomcat-tp21003970p21003970.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: File system resource for static content
I had to do something like that myself. Here's a little method that creates a folderpath for each unique session. public File getTempDir(HttpSession hsess) { String path = hsess.getServletContext().getRealPath(/); // / context root of the application return new File(path, hsess.getId()); } Hope this gets you started. - Peter -- View this message in context: http://www.nabble.com/File-system-resource-for-static-content-tp20999639p21004662.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: [OT] JK Connector problem
From: André Warnier [mailto:[EMAIL PROTECTED] Folder/directory/file names with spaces in them are evil, and should be forbidden in any new OS, by unanimous decision of the UN Security Council, US Supreme Court and EU Commission. The developers who first allowed this should be tracked down and named publically. Their boss who approved this should be fired (he's probably already retired though). As I've commented before, it's at least as old as UNIX, probably older. If you try to stop the accounts team naming their Excel files Budgets from Margaret 2008-2009 you may find your office surrounded by a mob of pitchfork- and torch-waving users chanting give us back our readable filenames. Overall, I suspect more hours have been saved by humanity having readable filenames* than lost by developers having to work round the problems. The Apache group should stop installing their Windows versions by default in a directory containing the silly names Apache Group and/or Program Files in the path. How many useless programming and debugging hours does it have to cost before this issue is put to rest ? Program Files is mandated by Microsoft, lobby them. I partially agree that Apache Group is a poor name for a directory; it does, at least, force implementors to face up to the problem early, rather than facing a surprise later. This may or may not be a good thing overall. - Peter * ReadingSpeedGoesUpWhenTheSpacesAreInTheCorrectPlace.HowLongHasItTakenYouToReadThisComparedToYourUsualReadingSpeed?Andhowmuchslowerisitwhenthereisn'tevencamelcasetohelpyoudistinguishwordbreaks? OK, now multiply that by all filenames read by all users over all their time interacting with their computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mixed html and jsp site using ProxyPass
From: David Goodenough [mailto:[EMAIL PROTECTED] I have a site which is a mixture of html (and a bunch of images and flash and other such stuff which came in from the web designer) and a couple of JSPs. I have implemented this with Apache 2.2 and Tomcat 5.5, using ProxyPass statements with ajp in the Location tag. Is there any reason for such a complex setup? Tomcat will quite happily serve the static content itself. You could: 1) Put all the content in the same directory for Tomcat to serve, keep Apache httpd, but all your content goes through Tomcat-httpd-user; 2) Put all the content in the same directory for Tomcat to serve, remove Apache httpd, serve the content directly through a http Connector in Tomcat. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jvm cowardly refuses to print a thread dump
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] That's ugly. Sounds like either the OS failed to deliver the signal, or the JVM is locked up internally (probably the latter). That's rather what I was reckoning. I've had signal delivery fail before if all the threads were stuck in kernel code via system calls. This was SunOS 3.x, which shows my age - NFS was kernel-mode at that point, which made for interesting times if file accesses got stuck. Processes not responding to a kill -9 was a new one on me! Might the code have ended up with all threads stuck in OS calls? It feels a little unlikely, as I assume the JVM keeps a couple of threads for itself... - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Manager app language
From: André Warnier [mailto:[EMAIL PROTECTED] Caldarale, Charles R wrote: Is the server named after a legendary British king, the Kinks album, or the HHGTTG character? HHGTTG. We also have marvin, ford, dent, zaphod, trillian, fenchurch,.. even a slartibartfast (wich also has an alias, for evident reasons). marvin is an old Sun, which has been making strange complaining noises for a while now, unsurprisingly. Zaphod: Computer... Eddie: Hi, this is Eddie, your shipboard computer. I hope you're having a great day! Zaphod: ... yeah. Er... computer... Eddie: Call me Ed, please, if it'll help you relax. Zaphod: ... look, can you just tell me the probability of everybody on the Tomcat mailing list being able to get the right combination of JVM, Tomcat version, lack of repackaging, AJP connector options and logging configured? Eddie: Oh, that's an easy one! Two to the power of infinity minus one... and rising! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: GPGPU and Tomcat
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Frequently, webapps do relatively minor processing, with the brunt of the work being performed in a data base engine (usually running on a separate system). To me, the database is one of the more interesting places to use GPUs. Half a gigabyte of very fast RAM and some high speed simple processors is a good place to put some critical data that you want to search. Because of the architecture of a typical GPU, it seems unlikely that it's the best place to process complex threaded code, even if (say) the JVM could make use of it. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5.20 security issue
From: Serge Fonville [mailto:[EMAIL PROTECTED] Just a few questions off the top off my head: ... and to add another one: What is your OS What is your Java virtual machine? In particular, are you using a non-Sun JVM such as GCJ? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache HTTP + Tomcat + SSL
From: Alexander Diedler [mailto:[EMAIL PROTECTED] What ist he best-practice to use SSL with a Frontend Apache Webserver and a mod_jk connected Tomcat? Define the SSL in Tomcat or in Apache Frontend? In Apache httpd. Has the SSL functions to be enabled on Tomcat? No. In a pure mod_jk system, Tomcat will only have a mod_jk connector - no HTTP or HTTPS connectors at all. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat virtual host
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] I deployed my webapp svn.war on webapps directory of tomcat 6. I configured localy a virtual host with tomcat 6, but it does not work. This url works : http://localhost:8080/svn/ But when i use the virtual host, it does not works : http://mysvn:8080/ This is a part of server.xml : ... Host name=mysvn appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=mysvn_log. suffix=.txt pattern=combined resolveHosts=false/ /Host ... What Connectors do you have configured? What does not work - *exactly* what are the symptoms? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat virtual host
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] When i tape http://mysvn:8080/ in browser to access to my web application, i have this : Internet Explorer cannot display the web page but when i tape http://localhost:8080/svnrepository; i access correctely to my application. Find file attached server.xml any idea ? I agree with the other response: rename your war to ROOT.war, so that it is the root web application. By the way, it is worth changing only one thing at once in your URL when testing. You are changing two. Does http://localhost:8080/ work? Does http://mysvn:8080/svnrepository work? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat request processing gets stuck
From: Christopher Schultz [mailto:[EMAIL PROTECTED] acceptCount=200 just means that the socket will accept 200 clients /in addition/ to those currently being served by RequestProcessor threads. The only way to see those waiting clients would be to query the socket itself (maybe only available at the C-library level?). Rarely even that - these connections are held in limbo in the kernel. There are sometimes ways of examining the next request in the queue (to see whether you want to accept it or reject it), but I'm not aware of a general way of examining *all* requests in an accept queue. I'd love to hear about any that exist, as in the past I've needed to monitor these! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logging Tomcat errors
You could configure your logging to only log the container level categories. Categories seem useful! will have to do some more reading... thanks a lot for this, it seems like the solution I am looking for! cheers, Peter - Original Message - From: Kees Jan Koster [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, 14 November, 2008 8:37:56 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Logging Tomcat errors Dear Peter, I guess it should be easy enough to distinguish between severe errors and ordinary errors, but how do you distinguish between 500 errors application runtime errors? I specifically want to report errors that occur at the container level and not at the application level... I hope this makes sense. Each logged line has an associated categry. You could configure your logging to only log the container level categories. -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logging Tomcat errors
Hi all, Can anyone point me in the right direction, I need to implement a logging and reporting mechanism for Tomcat (6.0.18 on Debian based Linux with JSVC). I am thinking of using either Log4j or Juli logging for only severe errors. Ideal would be to send an alert when the server crashes (by logging to an email appender - I know log4j has this feature), other errors can go to a log file. Some documentation/advice would be a great help! cheers, Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat webapp stopped working, please help
From: djbowen1 [mailto:[EMAIL PROTECTED] I am running tomcat server on Redhat linux. Tomcat server 5. There' a 5.0 stream (no longer maintained) and a 5.5 stream (maintained). The third version number then becomes significant. Could you give us any more of the version numbers, such as 5.0.26? [...] The only thing i see that has changed on the server is that up2date ran october 29th and updated a bunch of stuff. Ah. The machine doesn't have a standard Tomcat install on it, I think. I suspect you'll have more initial luck posting on a RedHat list. They distribute a re-packaged version of Tomcat that puts a lot of things in very odd places compared to the default installation, and few people here are familiar with it. That said, if you can find out where the Tomcat server's log files have been put, I'd strongly suggest looking in there for errors. If you can then post the errors here, we might be able to help. I'd love to suggest possible file names, but the repackagers may have changed those as well. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat webapp stopped working, please help
From: djbowen1 [mailto:[EMAIL PROTECTED] I have the catalina.out and the catalina.date logs.which one is more usefull? The .out file typically has any errors in it. The logging format is similar to many other applications. I'd suggest looking through that for error messages - a swift hunt for xception in your text editor of choice is often remarkably informative! To find the most recent set of exceptions, go to the end of the file and search backwards for startup. YOu should find a startup complete line. Anything more recent than that is after the webapp started, but I suspect you'll find problems before that - look backwards in the file for things that look problematic. If you're new to Java and Tomcat, one piece of advice: post *full* stack traces of any exceptions you need more information about. The headline exception often has nested exceptions inside it, and it's often the innermost one (and hence the bottom one on the stack trace) that's the most infomative one. Along the lines of: FubarException: Couldn't start application [... trace...] -- nested exception -- SqlException: Couldn't connect [... trace...] -- nested exception -- SocketException: Connection refused [... trace...] As you can imagine, it's a lot easier to diagnose the problem with all of that than if we just see the FubarException! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat webapp stopped working, please help
From: djbowen1 [mailto:[EMAIL PROTECTED] [...] INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found Not a problem. /usr/java/jdk1.6.0_01/jre/lib/i386/client That's quite an old 1.6. If the app was working before, and this isn't a recent update from RedHat, keep it - but I'd update to a more recent stable version where possible. There have been some comments on this list that the latest (_10) isn't that stable, but don't take it as gospel! INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 That's not a Tomcat 5.0. Were you expecting it to be? 5.x and 6.0 are *very* different - if RedHat has pulled a 5.x out from under your webapp and put a 6.0 in, I would expect your app to fail. It's a little like pulling out Apache httpd 1.x and putting 2.0 in, and expecting everything to work... ain't going to happen! [...] INFO: JK: ajp13 listening on /0.0.0.0:8009 Are you connecting to Tomcat via Apache httpd? I assume not, as you're talking about port 8010. If not, once all this is fixed, you might want to edit your conf/server.xml file (wherever RedHat have put it!) and comment out the Connector that's on port 8009. Don't do it now, on the principle of changing one thing at once! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logging Tomcat errors
I guess it should be easy enough to distinguish between severe errors and ordinary errors, but how do you distinguish between 500 errors application runtime errors? I specifically want to report errors that occur at the container level and not at the application level... I hope this makes sense. Thanks Peter - Original Message - From: Charles R Caldarale [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, 14 November, 2008 5:32:17 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: Logging Tomcat errors From: Peter Stavrinides [mailto:[EMAIL PROTECTED] Subject: Logging Tomcat errors Can anyone point me in the right direction, I need to implement a logging and reporting mechanism for Tomcat (6.0.18 on Debian based Linux with JSVC). What specifically do you need to know beyond what's in the doc? http://tomcat.apache.org/tomcat-6.0-doc/logging.html http://wiki.apache.org/tomcat/FAQ/Logging http://wiki.apache.org/tomcat/HowTo#head-af688216137bbf0542fa3f599cd4c41dcba68056 http://wiki.apache.org/tomcat/HowTo#head-6e03ddcd16fff5f1900e5332f311ed7faa228119 - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to integrate Shibboleth and Tomcat
From: Lucia Moreno Lopez [mailto:[EMAIL PROTECTED] I need to integrate Shibboleth and Tomcat. We are using tomcat 5.5.23, mod_jk connector 1.2.23 and the reference implementation of Shibboleth version 2.0. Do you *need* httpd in front? If not, how about http://www.guanxi.uhi.ac.uk/index.php ? It's a pure Java Shibboleth implementation. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Are multiple contexts of the same code code base visible to each other?
[My mailer appears to be missing part of the thread, ignore this if the question's already been answered] From: Jonathan Mast [mailto:[EMAIL PROTECTED] getInstance(path) checks a static hashmap for path Static held where? In MultiLogger, and Multilogger is a class (or in a jar) that is deployed with each context? How will 2 copies of MultiLogger handle 2 requests for com.mysite.stuff.foo.log ? They're two copies. They're separate classes, loaded by separate classloaders, with separate copies of the static HashMap. They will behave in that way, i.e. you'll get two different instances from your two requests. If that's not what you want, you may want to investigate putting MultiLogger in common/lib - see the TC5.5 documentation about the classloader hierarchy. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about Tomcat context
From: Jerome Lepage - AKEROZ [mailto:[EMAIL PROTECTED] I have developped a web application on Tomcat (5.0.28). My webapp use Hibernate 3 and i have a Singleton pattern too. I want have my webapp deployed N time in same Tomcat Server. But i don't want to share context, hibernate and Singleton from one webapp to other. (Like database access is not the same) Have you tried just deploying it N times, making sure all the jars are in WEB-INF/lib? Each webapp should get its own classloader, and hence will have its own copies of Hibernate and your singleton. I *think* they'll have different contexts, too, but I've not tried this. By the way: if you start getting out of memory errors as you deploy more copies, make sure you have enough perm space configured in your JVM options. Hibernate can generate a lot of classes, and lots of copies of these classes can consume a lot of perm space. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about Tomcat context
From: Jerome Lepage - AKEROZ [mailto:[EMAIL PROTECTED] But when i launch tomcat with this env vars : JAVA_OPTS=-XX:MaxPermSize=512m -Xms24m -Xmx512m Well, yes :-). That should give you enough perm space. Tomcat looks like not really care about the memory i grant to JVM. It's seems that tomcat have the memory but don't give to the différents contexts I have a poor Free memory at each time... I'm simplifying here - you're better off reading the JVM docs or waiting for Chuck* to tell me I'm wrong ;-). Any Java virtual machine will only collect garbage a) when you tell it (and sometimes not then), or b) when it runs out of free memory and needs to allocate something. Low free memory is not necessarily a problem - the JVM may just be being lazy about garbage collection. - Peter * who has forgotten more about Java virtual machines than I will ever learn - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Obfuscating a Servlet
From: Jeng Yu [mailto:[EMAIL PROTECTED] I just wanted to know if I can first obfuscate my selvlet with ProGuard before I deploy it in Tomcat environment. As long as ProGuard doesn't hack around with the servlet interface calls, you should have no problem. However, I've never tried. Will doing this really protect my servlet No. and make it really difficult for someone to reverse engineer or decompile it, as people seem to say? Obfuscation makes it *more* difficult to reverse engineer, as (for example) the names of functions and types no longer give any clues. However, if there's enough information in the code to run it, there's enough to reverse engineer it. It's like installing better locks on your house: fewer thieves will get in, but a determined thief will always do so. Generally via a way you didn't think of. For example, have you defended against someone breaking in and stealing the machine with your source code on? ;-) - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TomCat question
From: Ghanta, Bose [mailto:[EMAIL PROTECTED] Will Tomcat run with J2SE or does it require J2EE? The ones I have here run just fine on J2SE. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple IIS sites and ISAPI redirect problem
Martin, read the OP's information? From: Martin Gainty [mailto:[EMAIL PROTECTED] [...] For non server products like Windows 2000 Professional or Windows XP the number of concurrent connections is limited to 10 [...] Mikko Pukki wrote: System is Windows Server 2003 That's a server product, and your (correct) information about non-server products is not relevant to the OP's problem as far as I can see? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.26 Vulnerability - Test
Which JDK are you using, and do those vulnerabilities apply to that *specific* JDK? They are all Java vuls, not Tomcat vuls. - Peter -Original Message- From: Gozde Aytan [mailto:[EMAIL PROTECTED] Sent: 23 October 2008 12:32 To: users@tomcat.apache.org Subject: Tomcat 5.5.26 Vulnerability - Test Dear all, In our project, we are using Tomcat 5.5.26 and as it is reported that some vulnerabilities have been found. So, I just want to test our system if these vulnerabilties are exploited in our side or not. But I do not know how to test? Is there someone else who could help me in testing (how to generate) any of the following cases below? If at least one of them can be tested and resulted failure, that means Tomcat will be upgraded. Any help will be appreciated. Thanks. 1) An error in the Java Runtime Environment Virtual Machine can be exploited by a malicious, untrusted applet to read and write local files and execute local applications. 2) An error in the Java Management Extensions (JMX) management agent can be exploited by a JMX client to perform certain unauthorized operations on a system running JMX with local monitoring enabled. 3) Two errors within the scripting language support in the Java Runtime Environment can be exploited by malicious, untrusted applets to access information from another applet, read and write local files, and execute local applications. 4) Boundary errors in Java Web Start can be exploited by an untrusted Java Web Start applications to cause buffer overflows. 5) Three errors in Java Web Start can be exploited by an untrusted Java Web Start applications to create or delete arbitrary files with the privileges of the user running the untrusted Java Web Start application, or to determine the location of the Java Web Start cache. 6) An error in the implementation of Secure Static Versioning allows applets to run on an older release of JRE. 7) Errors in the Java Runtime Environment can be exploited by an untrusted applet to bypass the same origin policy and establish socket connections to certain services running on the local host. 8) An error in the Java Runtime Environment when processing certain XML data can be exploited to allow unauthorized access to certain URL resources or cause a DoS. Successful exploitation requires the JAX-WS client or service in a trusted application to process the malicious XML data. 9) An error in the Java Runtime Environment when processing certain XML data can be exploited by an untrusted applet or application to gain unauthorized access to certain URL resources. 10) A boundary error when processing fonts in the Java Runtime Environment can be exploited to cause a buffer overflow. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat is running but page is not displayed
From: Danny_HY052 [mailto:[EMAIL PROTECTED] When the tomcat is running i am able to access the application, however, after some time when i try again to access the application i get Page cannot be Displayed. (ensured that the tomcat was still running) I need to restart the tomcat server manually to get the page to be displayed. I'm guessing that you have a memory leak in your application, and that after a while your JVM runs out of heap. You could test this by increasing or decreasing the heap space available to the JVM, and seeing whether this increases or decreases the time to failure. Then you have the fun job of finding the leak - there are many threads in the Tomcat archive on doing this, just search for memory leak and follow the threads. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error reporting
Hi everyone, I am looking into implementing an error reporting mechanism that will translate errors into a notification via say an email. I am interested in errors that can't be handled by my application like 500 (Internal Server Errors) and the like which occur on the servlet container i.e.:tomcat. Would I have to implement a valve? Any pointers would be much appreciated. Thanks, Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where to look for connection refused errors in Tomcat6.0.18 ?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] If still more simultaneous requests are received, they are stacked up inside the server socket created by the Connector, up to the configured maximum (the value of the acceptCount attribute. Any further simultaneous requests will receive connection refused errors, until resources are available to process them. So where can we expect to see those errors in Tomcat? You *can never* see these errors in Tomcat, because Tomcat is never aware that the connection was received. The operating system's TCP/IP stack has received the incoming SYN, tried to queue the connection request on Tomcat's accept queue, failed, and simply sends a RST to close the connection. You *might* be able to monitor the total number of connection refusals at the OS level. Netstat on Windows will give you this, for example, though it combines refusals due to load and refusals due to no port being configured to accept a connection. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Appeal to Tomcat developers
From: André Warnier [mailto:[EMAIL PROTECTED] From earlier Tomcat expert's messages here, I understand that the previous logging methods were technically flawed, and that the new methods, technically, are far superior. But from tens of user's messages on this list, it is clear that in terms of setup and configuration, the new methods are too complicated, and the available documentation is too obscure for most of the Tomcat users that are not themselves Java or Tomcat experts. What would you change? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Appeal to Tomcat developers
I think there's a miscommunication going on. From: Leon Rosenberg [mailto:[EMAIL PROTECTED] well our [...] admins are well able to configure tomcat logging as they wish (mainly by using log4j configs we (developers) [...]). OK. So your admins have in-house developers to turn to. [...] I would doubt that the majority of tomcat users (i.e. java developers) [...] Andre's original premise is that the majority of Tomcat users are *not* Java developers. They are, instead, people who have a webapp they need to run and maintain. They have downloaded Tomcat in order to run it. I agree with Andre. I think his 90% estimate is high, but I suspect pure admins are in the majority. Certainly I think equating tomcat user with java developer is naïve. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Communicating between webapps
From: André Warnier [mailto:[EMAIL PROTECTED] Maybe hacks, but why not use them if they are easier, faster, and have a smaller memory footprint ? Because they can be harder to maintain. Note *can be* - it depends on the developers and admins. Not being very good at either Java or Tomcat, I'll submit the following ideas, and watch for comments : Depending on what exactly you need to pass as information, why not just the fact of whether a given flag file exists in a directory under catalina.base ? I know that this sounds quite pedestrian, but considering that a webserver already makes zillions of file accesses anyway, I don't think the overhead of a few more would matter. Or, if both webapps already use some common database, a record in ditto database. That is probably more flexible and more reliable re locking. Or, a webapp with the appropriate permissions can set/reset/read a system property, and these should be shared by all apps under the same JVM instance, no ? what I don't know is if set/reset of a system property is atomic. I think the OP wanted webapp A to call webapp B and return the result from B, via A, to the user. None of these cause A to invoke code in B, though they're all solutions to the problem of A informing B that something has changed. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-secure HTTP connector with secure=true requires a keystore?
Hi, I don't have this problem at tomcat 6.0.18 Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ Connector port=9080 executor=tomcatThreadPool protocol=HTTP/1.1 connectionTimeout=6 URIEncoding=UTF-8 / Connector port=9089 schema=http secure=true executor=tomcatThreadPool protocol=HTTP/1.1 connectionTimeout=6 URIEncoding=UTF-8 / Test with folloing index.jsp %= new java.util.Date() % %= request.isSecure() % As you want SSL enabled, you must add schema=https secure=true SSLEnabled=true at your config. Peter Am 07.10.2008 um 21:01 schrieb Christopher Schultz: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Non-secure HTTP connector with secure=true requires a keystore? I tried it with scheme=http at first, and got the same exception. The code in 6.0 is noticeably different from that in 5.5 for protocol initialization, including setting up the socket factory. Would it be possible to test the config on 6.0 to see if you can achieve the desired results there? Yeah, I can probably try that. I don't even need an app to deploy in order to test ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjrsgkACgkQ9CaO5/Lv0PCWPQCbBXylAq0lmheCGZwpsxPrL9yA SJEAoIoJ/FHSV+pK+6J1PalX9DWWWZCq =xNNQ -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic Tribes Questions
HI Mike, tribes is part of tomcat. Yoo can find the svn repo links at http://tomcat.apache.org/svn.html Peter Am 08.10.2008 um 17:18 schrieb Mike Wannamaker: Cool, Is there a repository to just get the tribes jar or just the tribes source without having to get all of tomcat to get it? Like a SVN or CVS repository I could get the fix from and build myself? Thanks Mike -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: October 7, 2008 5:13 PM To: Tomcat Users List Subject: Re: Basic Tribes Questions hi Mike, that's great. yes, the TCP failure detector could give multiple DISAPPEARED messages, that is something I'm about to fix Filip Mike Wannamaker wrote: Hi Filip, I think I am seeing the message, it was just hidden amongst other log messages I guess I missed it. However I do see something else when I added the TcpFailureDetector to the interceptor list, I see two DISAPPEARED messages? Without TcpFailureDetector: 1) Start Server #1, then #2 2) Unplug #2 network 3) On #1 - #2 DISAPPEARED, on #2 - #1 DISAPPEARED 4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 ADDED Add TcpFailureDetector 1) Start Server #1, #2 2) Unplug #2 network 3) On #1 - #2 DISAPPEARED;#2 DISAPPEARED, on #2 - #1 DISAPPEARED;#1 DISAPPEARED 4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 ADDED I take it I get the 2 DISAPPEARED messages because I have another interceptor, but is this the correct behaviour? TIA Mike -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: October 6, 2008 11:28 AM To: Tomcat Users List Subject: Re: Basic Tribes Questions there are getters and setters for everything and they are all documented here http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html each component has getters/setters, for example, the multicast address setAddress getAddress breakpoints might not work very well, since you are stopping one thread, and not really emulating a real scenario. again, sounds like you have a simple test case, if you can share that, I can get more understanding, and help you further. Filip Mike Wannamaker wrote: Hi Filip Thanks for the info. However, I don't see the documentation for the setters/getters you mention below? Also I'm having issues while debugging. When I hit a breakpoint in my code and while stepping thru code, I get DISAPPEARED/ADDED messages over and over on the other server? I would think the heartbeat is running in a separate thread for both send/receive? How to solve this, bump the heartbeat timeout? TIA Mike -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: October 3, 2008 2:51 PM To: Tomcat Users List Subject: Re: Basic Tribes Questions answers inline Mike Wannamaker wrote: Hi, I am currently trying to use Tribes as the clustering layer on our server. My startup code looks like this. if(_tribesChannel == null) { // nothing to do if already running try { _tribesChannel = new GroupChannel(); // must be done before start: no need to use any properties, there are getters and setters for everything and they are all documented here http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html _tribesChannel.getMembershipService ().getProperties().put(mcastPort, String.valueOf(_mainPort)); _tribesChannel.getMembershipService ().getProperties().put(mcastAddress, _multicastIPAddr); not sure what you are trying to do in the code below. if you wanna set the port, then simply do it. the membership will pick it up automatically if(_ancillaryPort 0) { _tribesChannel.getMembershipService ().getProperties().put(tcpListenPort, String.valueOf (_ancillaryPort)); // hack alert: Default Tribes instantiation (Tomcat 6.0.16) does not read value for tcpListenPort from properties. // Therefore, set it directly ChannelReceiver receiver = _tribesChannel.getChannelReceiver(); if(receiver.getPort() != _ancillaryPort) { if(receiver instanceof ReceiverBase) { ((ReceiverBase)receiver).setPort (_ancillaryPort); } } } _tribesChannel.addMembershipListener (_tribesMembershipListener); _tribesChannel.addChannelListener (_tribesChannelListener); _tribesChannel.start(CHANNEL_COMPONENTS); } catch(ChannelException ex) { try { _tribesChannel.stop(CHANNEL_COMPONENTS); } catch(Throwable t) { /*gulp
Re: Managing Tomcat 6 threads : How to make tomcat destroy threads when idle?
Hi Rohan, at tomcat 6 you must use an external executor thread pool to decrease idle threads: Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=2000 minSpareThreads=20/ Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / Look at http://tomcat.apache.org/tomcat-6.0-doc/config/executor.html Executor drop idle threads after one minute. Peter Am 07.10.2008 um 10:29 schrieb Mark Thomas: Rohan Sahgal wrote: I tried increasing the number of tomcat threads. However, I cannot get tomcat to destroy the threads once they get created even though tomcat is idle. However I have observed that once 2000 threads are created (I am monitoring with jconsole), the number never comes down. The minSpareThreads and maxSpareThreads are ignored. Correct - those parameters have no effect. I could not find their mention in the tomcat docs either, but this was something I found on a blog post for Tomcat 5.x. Tomcat 5.x is not Tomcat 6.x. There are differences and this is one of them. Is there a way to make tomcat reduce the number of threads? Sorry, no. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Reloading Tomcat Server
From: Barry Fawthrop [mailto:[EMAIL PROTECTED] [...] wget -O .../local_news http://www.topix.com/rss/county/citrus-fl [...] java.io.FileNotFoundException: http://www.topix.com/rss/county/citrus-fl at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Htt pURLConnection.java:1239) at com.sun.cnpi.rss.parser.RssParserImpl.parse(RssParserImpl.java:100) at com.sun.cnpi.rss.taglib.FeedTag.doStartTag(FeedTag.java:121) at org.apache.jsp.index_jsp._jspService(index_jsp.java:155) Are you *sure* you've changed your JSP to read from the local file? That looks like it's still trying to read directly from the URL during the request. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: manipualting a select list from within an event handler
From: Robert Welz [mailto:[EMAIL PROTECTED] Manipulating checkboxes from withing an onchange event handler works but I'd like to manipulate a select list like in this code example, but without luck? I'd appreciate some little help, that would be fantastic. [Javascript elided] Ask on a Javascript list? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTPS and Virtual Hosts
From: André Warnier [mailto:[EMAIL PROTECTED] As I remember from reading about this a while ago, there is/was a fundamental incompatibility between the HTTP Virtual Host mechanism, and HTTPS/SSL, in the sense that there is some egg-and-chicken problem involved, which roughly goes like this : - the client connects to the host and requests an encrypted connection to a certain hostname Almost. The client connects to the host on a given IP address and port, which requires an encrypted connection. No hostname is transferred at this point, as encryption must happen first. - the host and client negociate the encryption (based or not on the name of the host) Based on the certificate that the host sends to the client as part of negotiating the encryption. That certificate contains the common name of the host (or occasionally a wildcard name such as *.melandra.com). The client should be suspicious if the common name in the certificate does not match the hostname the client thinks it sent the request to. Therefore, the host cannot know to which virtual host the client wishes to connect when it sends the certificate. Therefore, the host cannot send the right certificate unless all requests to a given hostname and port are designed to use the same certificate. Therefore, virtual hosting using SSL is a problem. Is the above, very roughly and approximatively still a valid explanation of what happens, or is it totally wrong, or has something changed in-between that I am unaware of ? It's close, but the problem occurs at an earlier step than you outline :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: HTTPS and Virtual Hosts
From: Ognjen Blagojevic [mailto:[EMAIL PROTECTED] For instance, you could put 2 or more network cards in the server, and than configure one virtual host for each of these cards. Or configure multiple IP addresses on one card - almost all operating systems these days allow multiple IP addresses on one adapter. Cheaper, and you don't run out of card slots so fast :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connector problem
From: Mathias P.W Nilsson [mailto:[EMAIL PROTECTED] Let's say I want a user to access the website in this fashion https://www.domain1.com ( SSL from thawte ) https://www.domain2.com ( SSL from thawte ) https://www.domain1.se ( SSL from thawte ) What would I have to do to make this work? I only have one server that is running tomcat 6. You would have to: - Obtain and set up 3 different IP addresses for the server; - Set up DNS to point www.domain1.com to one of the IP addresses, www.domain2.com to another, and www.domain1.se to the third. - Configure 3 different Host elements in your server.xml, each for one of the secure domains; - Configure each Host to use the appropriate certificate from your keystore(s). This is no harder than configuring one Host for SSL, you just need to do it three times :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTPS and Virtual Hosts
From: Johnny Kewl [mailto:[EMAIL PROTECTED] I actually cant see any reason why the hand shake couldnt be extended to look at the incoming URL... Because the URL (or at least the host header) would have to be sent over the wire in cleartext, as it's before the encrypted connection is negotiated. This is an information disclosure vulnerability. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connector problem
From: Mathias P.W Nilsson [mailto:[EMAIL PROTECTED] When a user access www.domain1.se then I read the HTTPServletRequest host name to see what site he/she want's to access. This is because I do not want 3 hibernate access to the same database because that won't work. I would get a lot of exceptions from hibernate if an entity is changed in one domain and not the other. So, can I set up the server in the way I have done now? If I use 3 different hosts, how can this point to the same war file without loading the war file twice? I am not aware of any way of doing this, unless you re-architect the application so that all Hibernate access is done in classes that are only loaded once. However, I'm not a Tomcat expert and there may be ways round the problem! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTPS and Virtual Hosts
From: André Warnier [mailto:[EMAIL PROTECTED] I seem to remember that there was talk about a scheme or a protocol that would allow (very roughly) a client/server pair to start a session using HTTP (not SSL), negociate, then in the course of the session upgrade this link to HTTPS. And that this somehow could be a solution to the Virtual Host issue under HTTPS. Am I dreaming this up, or does there exist something in that general area ? I've no idea whether such a protocol exists today; however, the current set of browsers don't appear to support such a beast. It might be a good solution 5 years down the line, once all the old browsers that don't support it have fallen out of use, but even if the protocol's ready to go now the installed browser base isn't ready for a site that uses it. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connector problem
From: Jörg Fröber [mailto:[EMAIL PROTECTED] Sorry to kind of hijack this thread, but would it be possible to use one of the certificates linked below with tomcat, when only 1 IP and 1 SSL-Connector is used for different Host elements? http://www.geotrusteurope.com/products/ssl_certificates/true_b usinessid_mdm.asp http://www.positivessl.com/ssl-certificate-products/ssl/multi- domain-ssl-certificate.html Assuming the browser support is out there then yes, it should be possible. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: HTTPS and Virtual Hosts
[Marked OT as this is not even remotely about Tomcat] From: Johnny Kewl [mailto:[EMAIL PROTECTED] http://support.microsoft.com/kb/257591 ... OK... If it send the HOST info in step one ... which it doesn't as far as I can see... and the server chose the correct cert I see no problem, the secure session hasnt even kicked in yet ;) Yes, exactly. So anything sent across the wire (such as the host header) is subject to eavesdropping. The URL, in particular, MUST NOT be sent in cleartext - consider a URL of the form https://www.innocentsite.com/myphotos/notsoinnocent/llamapr0n372.jpg *. The user would no doubt expect SSL to defend his/her access to that URL from eavesdropping :-). The case for not sending the host header in cleartext is weaker, but still present. Consider a blog site such as LiveJournal, for example. It hosts a range of content, separated onto one hostname per blog. Some of that content is pretty explicit, and some people might get rather upset if they knew that *even though they thought they were on a secure channel* then others could eavesdrop on the mere fact that they were reading *that* content, rather than some other innocent content that happened to be on the same IP. So I consider that the ID vul is still present, even via disclosure of just the host header. If not what is the vulnerability? Whatever cert is sent what oput there by the admin dudes, and will be checked client side anyway ;) You're thinking about ID vuls from the side of the server admin. Broaden your thinking - what might a *client* get upset about? - Peter * With thanks to User Friendly (http://www.userfriendly.org), over the years, for warping my mind enough to devise this URL. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat usage
From: Kusuma Pabba [EMAIL PROTECTED] what is the difference between running tomcat server and as client Tomcat is a Web server. There is no concept of running it as a client. What are you trying to do? We might be able to help more if you tell us! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: apache and tomcat version
From: [EMAIL PROTECTED] [EMAIL PROTECTED] Does Tomcat do the same thing as Apache? ie http; as well as the bonus of java? Yes, with reservations. Tomcat's a Web server in its own right - and a pretty fast one, in its modern versions. You'll saturate your network bandwidth long before you saturate your CPU. It's tuned for serving static content and Java web application content. It *can* serve other content via custom webapps and filters, but in my opinion this is less well developed than the facilities in Apache httpd (what most people call Apache). I am using PhP, and would to like to also have Java/AJAX?J2EE on my web page, and I am not sure if I need both Apache and Tomcat, or can just use Tomcat? (I dont know if it will do everything that Apache does plus more?) httpd has more modules available, and is probably a better choice as your front-end if you're running several different active server technologies such as PHP and Java. Tomcat *can* serve PHP, but as far as I'm aware the integration is slower than httpd's. I've not done it, however - can anyone who has comment on performance? If you do run httpd in front of Tomcat, you do of course have the integration job to do. The appropriate version of the docs at http://tomcat.apache.org will, of course, be of benefit :-). I'd go with Tomcat 6 unless you have a good reason to use an older version. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat usage
From: Kusuma Pabba [mailto:[EMAIL PROTECTED] actually i want to use tomcat on my arm processor and i am not understanding how to use it on that 1) Set up an appropriate operating system on your ARM processor that includes a TCP/IP stack and support for a good Java virtual machine (must be at least J2SE - I don't think Tomcat will work under J2ME). 2) Test for TCP/IP network connectivity between whatever you're using to view your Tomcat content and your ARM device. 3) Ensure the Java virtual machine runs at least a hello world program that you've developed. 4) Download an appropriate version of Tomcat, and install on the operating system and Java virtual machine that you have tested and shown to be working. As you have installed an appropriate operating system, you should be able to follow the instructions for that operating system. 5) Start Tomcat, and browse to its default page using a browser on whatever system you identified in step 2. There may be other ways of working, but most of the embedded Tomcats I've seen on devices are running on embedded Linux of one variety or another. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Browser Limited web application
From: karthikn [mailto:[EMAIL PROTECTED] Question 2: How to fetch the MAC address (Physical address) of the clients using web application ? You can not do this at the server. Some clients may not even have one - a computer with no network card using a dial-up modem to access the Internet has no MAC address. If you look at the OSI 7-layer model, the MAC address exists in some Datalink (layer 2) implementations, but need not exist on all. If you really, *really* need the MAC address, you would have to write a piece of code to download to the client computer and run on the client computer to get it. I suspect most anti-malware programs would recognise that software as spyware and stop it running. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: apache and tomcat version
From: Hardik Shah [mailto:[EMAIL PROTECTED] is tomcat 3.2.1 and apache 1.3.27 are both server Tomcat 3.2.1 is a web server. You can use it to serve Web pages or web applications directly. You do not need to use any version of Apache httpd as well. If you want to use Apache httpd as well, you can connect Tomcat to httpd using AJP. It is more difficult to set up the two servers in this way. If possible, I would use a newer version of Tomcat than version 3. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Browser Limited web application
[Marked off-topic as this now has nothing to do with Tomcat] From: karthikn [mailto:[EMAIL PROTECTED] But some Browsers provide modification of User-Agent Is this fool proof ? No. You have no control over the client; you cannot determine what it really is, only what it says it is. AVG8, for example, can pretend pretty convincingly to be Internet Explorer. The only way to be relatively certain is to send a page to the browser that uses Javascript to check for known bugs or quirks in the browser, and sends back to you a status report. Of course, a hacker has control over the client, so could change the Javascript code you send (or run it under a debugger) to report whatever they wanted... you can never be *certain*. If you told us what you were trying to do, and what is an acceptable level of confidence in the result, we might be able to help more. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Filesystems allowing spaces (was RE: html entities and urls with spaces)
From: André Warnier [mailto:[EMAIL PROTECTED] Whichever bright developer invented the first filesystem allowing spaces in filenames should be found and shot. You'd have to go a long way back - UNIX has had them at least since I started using it*. Besides, users love 'em - it's just us command-line types who have problems. - Peter * I'm a latecomer - mid-1980s - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM per Context
From: Michael Dehmlow [mailto:[EMAIL PROTECTED] I have multiple contexts that are defined for a given host in my server.xml each context I would like to start up in its own jvm, for dll and enviornment variable reasons. As a solution sketch (I've never done it), you'll need to deploy eclipsev1 and eclipsev2 in two different Tomcat instances. See the file RUNNING.txt that comes with your version of Tomcat (which you didn't tell us!) for details on setting up multiple instances. You'll then need something that talks AJP or can reverse proxy to sit at the front of the two Tomcats and divide incoming requests to the multiple Tomcats. Apache httpd (what most people call Apache) can do this. Again, check the docs at http://tomcat.apache.org for integration of httpd as a front-end, Tomcat as a back-end. I suspect you'll get more detailed responses; this is rapid rather than complete! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [NEWBIE] Separate tomcat engines on the same physical server
From: Jon Camilleri [mailto:[EMAIL PROTECTED] Hence, is it feasible to have: - Server 1 installed with Tomcat instance #1 and Tomcat instance #2 over JVM #1 - Server 2 installed with Tomcat instance #1 and Tomcat instance #2 over JVM #2 If by JVM you mean the files installed to support Java on the computer, yes. One Java installation can support many concurrent processes running Java. If by JVM you mean one process running Java, no. Each Tomcat must run in its own process. What are your views on this? I've successfully run up to three Tomcats on the same machine, as three processes, all with the same JAVA_HOME. It's a good way of providing isolation between applications, or even Tomcat versions (I was running two 5.0.x, one 5.5.x). Any relevant documentation on configuring them this way? See the file RUNNING.txt in the Tomcat zip you download. There's a section at the end on running multiple Tomcats on the same box. Setup can get a little interesting if you're running on Windows and want both processes to start as services, but even that's entirely possible to configure. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Multiple Instances on Windows Server 2003
From: Steve G.B. [mailto:[EMAIL PROTECTED] I need to install multiple instances of Tomcat on my server. I changed all the connection and redirect ports, but the second Tomcat still doesn't start. What should I do? Give us more information - that's far too vague for us to help you. Post: - Tomcat versions; - Any error messages you get in either set of logs while starting Tomcat. Also: If you start the two services in the opposite order, which one fails? Is it always one instance of Tomcat (in which case you should be looking for config errors in that Tomcat) or is it always the second one started (in which case you should be looking for contention issues)? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Multiple Instances on Windows Server 2003
From: Steve G.B. [mailto:[EMAIL PROTECTED] I'm trying to overload the Virtual Machine on which I've installed the two Tomcats. To check: this is a virtual computer (on a physical host computer) running a virtual operating system on which you are running two copies of Tomcat in two separate Java virtual machines? But I can't exceed a 50% of CPU Utilization. How many virtual cores have you set up? How many physical cores on the host computer do you have? How many of those are allocated to the virtual computer? I believe it's a JVM limitation. What JVM are you using? If it's a Sun one, I don't believe you ;-). I've saturated 8-core processors on 1.4 and 1.5 with no issues; I can't see that having regressed in 1.6, although I don't have personal experience. Is there a way to change jvm configurations in order, for example, to create even more threads? Depends on your JVM. But I'm willing to bet that the bottleneck is in one or more of: - Your test harness; - Your web app (do all the threads access a common object?); - A library you're using that single-threads; - Your back-end systems, such as your database server. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Multiple Instances on Windows Server 2003
From: Steve G.B. [mailto:[EMAIL PROTECTED] I've created a VM with 4 VCores, and all of the cores are allocated to the VM. OK, so 50% CPU = 2 cores maxed out. Out of interest, is it 25% with only one Tomcat started? I'm using Sun JVM 1.6, and stressing the Guest with Loadrunner on another machine (if you ask: this machine with loadrunner isn't the bottleneck) No Databases, no I/O requests, no Network saturation. OK. Given that you're getting exactly 50% CPU use (it *is* exact, right?) that indicates the test harness is very unlikely to be the problem. It would almost certainly bottleneck at some other CPU value. that's why I think it's the JVM. For my tests I used the standard demo webapp in Loarunner (Mercury Tours), and a couple of stupid jsp pages. So Apache and Tomcat both. I'll highlight that to the folks who know the demo app better: does it run properly under load? I'd assume so... Fun thing is that when using Tomcat and Apache combined, I can get an 80-85% CPU Utilization. Yes. If you've got httpd passing everything through it as well, you'll increase the CPU load - that's expected! Problem is that for my tests I need something more simple and the same server. Yes. Why add complexity when it's not required? :-) How do you saturate an 8-core host? With some reasonably complex code in the JSPs :-). Out of interest, if your JSPs call something that loops a couple of million times before returning, what happens to the CPU use? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ignorance about some things.
From: Ronald Klop [mailto:[EMAIL PROTECTED] My experience is also that java likes more memory on 64-bit systems. But I can't prove or explain it. I would expect 64-bit Java to use 64-bit object pointers, and 32-bit Java to use 32-bit object pointers. Given how often object pointers occur in typical Java programs, that's a fair bit of extra memory. If you assume that half of a typical object's state is references to other objects, then (naively) you'll use 50% more memory. Now I'll sit back and wait for Chuck to contradict me :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.0.26 / Performance issue
From: Anthony COMMUNIER [mailto:[EMAIL PROTECTED] I'am doing load tests with a web application that is deployed under Tomcat 5.5.0.26 Tomcat has 3-character version numbers, so this is probably 5.0.26 or 5.5.26? With only one request (no load just one call) it tooks 150 ms to call the method getParameterNames from class org.apache.catalina.connector.RequestFacade. Is this for the first call, or for second and subsequent calls as well? First calls are often much slower as code is loaded. If it's for second and subsequent calls, then there's a problem! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Can't execute servlet project
From: sam wun [mailto:[EMAIL PROTECTED] OK, I followed your instruction to invoke the servlet class file, but I got errors. [...] root cause java.lang.UnsupportedClassVersionError: Bad version number in .class file You're compiling your class with a newer Java version than your Tomcat instance is running on. You probably want to find which JDK your Tomcat's running on, and change that to the same one that you're using for compilation. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to allow remote login in tomcat ?
From: Ajay Garg [mailto:[EMAIL PROTECTED] b) In Tomcat deployment, Tomcat needs the credentials to login into the shared folder (the fact that the the network folder has already been mapped onto a drive SUPPOSEDLY does not help ...) Mapped drives are per-user, not per-system. If Tomcat's running as a service or under a different user ID to yours, it won't see the mapped drive. Who's it running as? Also, if Tomcat's running as a service, it doesn't load a full profile - notably including the mapped drives. What's it running as? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Can't generate class file from Interface
This is not a Tomcat question. Please find a more appropriate list. - Peter -Original Message- From: sam wun [mailto:[EMAIL PROTECTED] Sent: 26 August 2008 13:03 To: Tomcat Users List Subject: Can't generate class file from Interface Hi, In Eclipse 3.4 (not sure about the previous version), I have a project, in the src, there is a interface file called DatabaseCommand.java. This file is an interface file. It s content is shown below: package command; import java.sql.Connection; import java.sql.SQLException; public interface DatabaseCommand { public Object executeDatabaseOperation(Connection conn) throws SQLException ; } Another file CreateOrder.java *implements* this interface. Its content shown as below: Package command; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import java.sql.ResultSet; import java.util.ArrayList; import domain.Customer; /** * List existing customers in the database */ public class ListCustomers implements DatabaseCommand { public Object executeDatabaseOperation(Connection conn) throws SQLException { // List customers in the database ArrayListCustomer list = new ArrayListCustomer(); Statement sta = conn.createStatement(); ResultSet rs = sta.executeQuery(SELECT ID, FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMER); while(rs.next()) { Customer cust = new Customer(); cust.setId(rs.getInt(1)); cust.setFirstName(rs.getString(2)); cust.setLastName(rs.getString(3)); cust.setAddress(rs.getString(4)); list.add(cust); } rs.close(); sta.close(); return list; } } When I press Clt-B to build the project(All), DatabaseCommand.java does not get compiled, no DatabaseCommand.class generated in the build\classes\command\ directory. The syntax highlithed in the CreateOrder.java file indicated that DatabaseCommand is an unknown type, that meant no class found. How can I get around this issue? may be I should ask how to generate an interface dot class file (eg. DatabaseCommand.class in this instance)? Thanks Sam - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat does not unpack WAR file (Tomcat 5.5.20)
It turns out that the problem IS connected to the ROOT.xml file under conf\Catalina\localhost. As soon as I remove ROOT.xml, the ROOT.war unpacks. This is what my ROOT.xml file looks like: Context cookies=false path= debug=1/ There has been some prior discussion around this topic. For example, see: http://marc.info/?l=tomcat-userm=116107471021645w=2 http://marc.info/?l=tomcat-userm=116302992202121w=2 Is this a known issue / 'bug' with Tomcat 5? :) Pete Johnny Kewl wrote: - Original Message - From: Peter [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, August 22, 2008 4:07 PM Subject: Tomcat does not unpack WAR file (Tomcat 5.5.20) Hi When I drop a WAR file into the webapps folder on my dev machine - running Tomcat 6.0.16 - Tomcat unpacks it on startup. When I do the same on the production box - running Tomcat 5.5.20 - nothing happens. The WAR file that I am deploying is ROOT.war; there is a corresponding ROOT.xml under conf\Catalina\localhost. (I'm not sure if those details have any bearing on the problem - according to one archived post, there may be a connection.) On both machines, the host tags look identical: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Any assistance would be appreciated. :) Pete -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] Pete, nothing comes to mind, you seem to have the bases covered... One possibility is that the existing ROOT web ap is busy... Maybe a thread running or something... TC will not start up the new guy, if the old one cant let go.. possibly from the manager console /manager/html tell the old one to undeploy first maybe... Also just make sure from you dev environment that the ROOT context path is really empty and not root which it maybe doing... wild guess ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] /Any sufficiently advanced technology is indistinguishable from magic./ - Arthur C. Clarke - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat does not unpack WAR file (Tomcat 5.5.20)
I may be going slightly off-topic for this thread, but I have 2 questions regarding the ROOT.xml ROOT.xml fragment file... As a test, I removed ROOT.xml and tested the app behavior. Specifically, I performed these steps to remove the ROOT.xml fragment file: = I removed ROOT.xml from ...conf\Catalina\localhost. = I stopped Tomcat, deleted the 'work' folder and started Tomcat again. = I cleared all cookies from the client machine's web browser. The ROOT.xml file that I removed looked like this: Context cookies=false path= debug=1/ What puzzles me is this: 1. In order to map the ROOT web context to the root URI ('/'), I included the (path=) attribute in ROOT.xml. However, even after removing the ROOT.xml fragment file, the ROOT web app is still mapped to the root URI ('/') i.e. when I navigate to the server's root domain name, the ROOT wabapp is invoked. Was I mistaken in thinking that the (path=) attribute is required? 2. Similarly, I included the (cookies=false) attribute to enable URL rewriting for browsers that do not support cookies. However, even after removing the ROOT.xml fragment file, URL rewriting takes place - IF the web browser does not support cookies. Have I missed something - or does the (cookies=false) do something slightly different to what I thought? Just to re-iterate, I am runningTomcat 5..5.20 Thanks Pete Johnny Kewl wrote: - Original Message - From: Peter [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, August 22, 2008 4:07 PM Subject: Tomcat does not unpack WAR file (Tomcat 5.5.20) Hi When I drop a WAR file into the webapps folder on my dev machine - running Tomcat 6.0.16 - Tomcat unpacks it on startup. When I do the same on the production box - running Tomcat 5.5.20 - nothing happens. The WAR file that I am deploying is ROOT.war; there is a corresponding ROOT.xml under conf\Catalina\localhost. (I'm not sure if those details have any bearing on the problem - according to one archived post, there may be a connection.) On both machines, the host tags look identical: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Any assistance would be appreciated. :) Pete -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] Pete, nothing comes to mind, you seem to have the bases covered... One possibility is that the existing ROOT web ap is busy... Maybe a thread running or something... TC will not start up the new guy, if the old one cant let go.. possibly from the manager console /manager/html tell the old one to undeploy first maybe... Also just make sure from you dev environment that the ROOT context path is really empty and not root which it maybe doing... wild guess ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] /Any sufficiently advanced technology is indistinguishable from magic./ - Arthur C. Clarke - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat does not unpack WAR file (Tomcat 5.5.20)
Thanks Johnny On the production server, Tomcat is actually being started up by another 'parent' application. Since this does not appear to be a (pure) 'Tomcat' issue, I will take it up with the guys who manage the 'parent' app. Thanks for the assistance. Johnny Kewl wrote: - Original Message - From: Peter [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, August 22, 2008 4:07 PM Subject: Tomcat does not unpack WAR file (Tomcat 5.5.20) Hi When I drop a WAR file into the webapps folder on my dev machine - running Tomcat 6.0.16 - Tomcat unpacks it on startup. When I do the same on the production box - running Tomcat 5.5.20 - nothing happens. The WAR file that I am deploying is ROOT.war; there is a corresponding ROOT.xml under conf\Catalina\localhost. (I'm not sure if those details have any bearing on the problem - according to one archived post, there may be a connection.) On both machines, the host tags look identical: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Any assistance would be appreciated. :) Pete -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] Pete, nothing comes to mind, you seem to have the bases covered... One possibility is that the existing ROOT web ap is busy... Maybe a thread running or something... TC will not start up the new guy, if the old one cant let go.. possibly from the manager console /manager/html tell the old one to undeploy first maybe... Also just make sure from you dev environment that the ROOT context path is really empty and not root which it maybe doing... wild guess ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] /Any sufficiently advanced technology is indistinguishable from magic./ - Arthur C. Clarke - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat does not unpack WAR file (Tomcat 5.5.20)
Yes - they are. (as I stated in my original post) Martin Gainty wrote: check your unpackWARS and autoDeploy parameters are both set to 'true' e.g. $TOMCAT_HOME/conf/server.xml Host unpackWARs=true autoDeploy=true HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Sat, 23 Aug 2008 23:40:06 +0300 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Tomcat does not unpack WAR file (Tomcat 5.5.20) Thanks Johnny On the production server, Tomcat is actually being started up by another 'parent' application. Since this does not appear to be a (pure) 'Tomcat' issue, I will take it up with the guys who manage the 'parent' app. Thanks for the assistance. Johnny Kewl wrote: - Original Message - From: Peter [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, August 22, 2008 4:07 PM Subject: Tomcat does not unpack WAR file (Tomcat 5.5.20) Hi When I drop a WAR file into the webapps folder on my dev machine - running Tomcat 6.0.16 - Tomcat unpacks it on startup. When I do the same on the production box - running Tomcat 5.5.20 - nothing happens. The WAR file that I am deploying is ROOT.war; there is a corresponding ROOT.xml under conf\Catalina\localhost. (I'm not sure if those details have any bearing on the problem - according to one archived post, there may be a connection.) On both machines, the host tags look identical: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Any assistance would be appreciated. :) Pete -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] Pete, nothing comes to mind, you seem to have the bases covered... One possibility is that the existing ROOT web ap is busy... Maybe a thread running or something... TC will not start up the new guy, if the old one cant let go.. possibly from the manager console /manager/html tell the old one to undeploy first maybe... Also just make sure from you dev environment that the ROOT context path is really empty and not root which it maybe doing... wild guess ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] /Any sufficiently advanced technology is indistinguishable from magic./ - Arthur C. Clarke - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®. http://clk.atdmt.com/MRT/go/108588797/direct/01/ -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] /Any sufficiently advanced technology is indistinguishable from magic./ - Arthur C. Clarke - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat does not unpack WAR file (Tomcat 5.5.20)
Hi When I drop a WAR file into the webapps folder on my dev machine - running Tomcat 6.0.16 - Tomcat unpacks it on startup. When I do the same on the production box - running Tomcat 5.5.20 - nothing happens. The WAR file that I am deploying is ROOT.war; there is a corresponding ROOT.xml under conf\Catalina\localhost. (I'm not sure if those details have any bearing on the problem - according to one archived post, there may be a connection.) On both machines, the host tags look identical: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Any assistance would be appreciated. :) Pete -- Peter Cimring Software Developer (: +972 52-545-9364 *: [EMAIL PROTECTED] /Any sufficiently advanced technology is indistinguishable from magic./ - Arthur C. Clarke - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hot redeploying a WAR - HTML is not refreshed
Thanks for the information. I know it is not the browser caching. I've tried both IE and Firefox, clearing all caches and refreshing. I did look more closely at what Tomcat is doing when it hot redeploys my WAR file. I'm using an unmodified copy of Tomcat to test this issue. So Tomcat deploys the new HTML files here: C:\apache-tomcat-6.0.18\webapps\war-file-name\ But it leaves the old HTML files here: C:\apache-tomcat-6.0.18\work\Catalina\localhost\war-file-name\ And the browser is getting the old HTML files. If I shut down the server, delete C:\apache-tomcat-6.0.18\work\, and restart the server, the browser sees the new HTML files. Is deleting the work directory standard practice for completely refreshing web content? I can't do it while Tomcat is accessing the files. Or is there a configuration option that will cause Tomcat to delete and recreate the work directories when redeploying? Again, thank you. Peter Desjardins - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hot redeploying a WAR - HTML is not refreshed
Those are excellent suggestions. Thanks. The other thing is that I cant actually recall ever seeing an HTML file in the work folder... I see stuff like... basic_002darithmetic_jsp.class basic_002darithmetic_jsp.java which is what it is used for... ie to hold the compiled JSP's... if you using HTML to describe JSP's then we already have crossed lines... Maybe this is causing the problem: the HTML files are wrapped up in JAR files. This is functionality of the Eclipse help system. You can wrap up all of your documentation content (HTML files, image files, tables of contents, ...) in a JAR file. This becomes a documentation plugin that the Eclipse application knows how to unpack and serve. So my HTML content is actually in here: C:\apache-tomcat-6.0.18\webapps\war-file-name\WEB-INF\eclipse\plugins\com.my.doc.plugin.name.jar C:\apache-tomcat-6.0.18\work\Catalina\localhost\war-file-name\eclipse\plugins\com.my.doc.plugin.name.jar Does the fact that my content is in a JAR file make a difference? Is there a different way that Tomcat handles redeploying JAR files? Also, there is no development environment on my computer. I am taking the WAR files from a separate build server and just trying to deploy and redeploy locally. Thank you. Peter Desjardins - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hot redeploying a WAR - HTML is not refreshed
Exactly how are you accomplishing this hot redeployment? Does Tomcat really shut down the application and reload it? I copy the new version of the WAR file into C:\apache-tomcat-6.0.18\webapps\, overwriting the old copy. Here's the log: Aug 14, 2008 3:45:05 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 14, 2008 3:45:05 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 559 ms Aug 14, 2008 3:45:05 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 14, 2008 3:45:05 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 Aug 14, 2008 3:45:05 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-admin.war Aug 14, 2008 3:45:22 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-eped.war Aug 14, 2008 3:45:32 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-ps-mon.war Aug 14, 2008 3:45:42 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Aug 14, 2008 3:45:42 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Aug 14, 2008 3:45:42 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/32 config=null Aug 14, 2008 3:45:42 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 36795 ms * New versions of WAR files copied into C:\apache-tomcat-6.0.18\webapps Aug 14, 2008 3:46:42 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/nexus-5-0-ps-mon] Aug 14, 2008 3:46:50 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/nexus-5-0-admin] Aug 14, 2008 3:46:58 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/nexus-5-0-eped] Aug 14, 2008 3:47:05 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-admin.war Aug 14, 2008 3:47:16 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-eped.war Aug 14, 2008 3:47:25 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive nexus-5-0-ps-mon.war Since you're on a Windows box, you may want to experiment with the antiResourceLocking attribute of your webapp's Context element - but watch out for the caveats mentioned in the doc: This problem is occurring on two type of Linux server also. I'm just troubleshooting the problem on my Windows computer. Thanks! Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hot redeploying a WAR - HTML is not refreshed
Hi. I have a web application that consists of an online help system. It serves HTML content using the Eclipse user assistance system. The usage I need to support is that the help system WAR is running in Tomcat, we repackage a new version of the WAR with updated content (only new HTML pages, no new application functionality), and then hot redeploy the new WAR file. The hope is that users will see the new HTML content with minimal interruption of service. I am able to hot redeploy the new WAR files by overwriting the versions in the webapps directory. In the server log I can verify that Tomcat undeploys the old version and then deploys the new version. However, the HTML files that are being served are not updated. Tomcat serves the HTML pages from the previous WAR file. If I stop the server, replace the WAR files, delete the work directory, and restart the server, the HTML pages are refreshed. Is there a way to clear all the old content from the cache during a hot redeploy? Or is there any other way to serve the new HTML content without stopping the server? I am using Apache Tomcat Version 6.0.18, jdk1.5.0_14, and Windows XP. Thanks for your help. Peter Desjardins - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Chaining Request Processing
From: Jeng Yu [mailto:[EMAIL PROTECTED] The servlet (in Appserver A) then processes part of the form input in the doGet method and then needs to send the rest of the form to another web server (Appserver B) to process and return the results (response code or something) to the calling servlet which is waiting for it. The servlet receives the results and based on the results, sends response back to the client, all within the same doGet method. Is this doable, and What's the best way to go about it? Best or Easiest to code? :-) Best from a performance point of view is to change your application so that it's *not* all happening in the same doGet call. You don't know how long your call will take. You should submit the request via some appropriate mechanism and return a holding page to the user. Every so often, the holding page should poll to see whether the call has completed. You'll need some way of storing the results from appserver B, along with a way of managing timeouts and similar. Since you've not said how appserver B expects its data, we can't really suggest specific technologies. This approach minimises the number of threads that will be waiting at any time. Easiest to code is to use the same doGet call. Be aware that you may tie up a *lot* of Tomcat threads waiting for responses from B. Your worst case is when B black-holes at the busiest time for your application, meaning that A has to wait for a timeout on every call. You'll need at least that many threads configured unless you want unpleasant error messages returned to your users. Should I make the call to Appserver B in a separate thread (I'm considering it)? If you're doing this in the same doGet call, why bother? It's extra overhead for no good reason - you're already tying up the Tomcat thread for the duration of the call. If you're changing your architecture, you'll definitely need to do this. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to make context path case insensitive
From: persistence k [mailto:[EMAIL PROTECTED] Can anybody tell me how to make context path of a web application case insensitve. I need a case insenstive context path for my web application. Do you need a case insensitive context path, or do you need users to be able to type in either case initially and to be directed to the same webapp? If it's the latter, you could deploy your webapp at one variant of the context path (say the lowercase one) and deploy a small webapp at the other that simply redirects to the lowercase version. If you genuinely need a case insensitive context path, can you give us some more details about what you're trying to do? Also, what OS, and what version of Tomcat? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with in Synchronized methods in Tomcat 4.x
From: Thangavel Sankaranarayanan [mailto:[EMAIL PROTECTED] After number of session in my application has reached in some point of time. the synchronized method is not executed and the system hangs waiting to execute that method. I could'nt make a thread dump as my tomcat is started as a window service.What can i do at this point of time?? Find some way of getting that thread dump - nobody will be able to help you more until we can see it. If necessary, start Tomcat from a command prompt to get it. I strongly suspect you have a logic error or race condition in your code so that another of your threads is stuck inside the synchronised block. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Will tomcat handles Syn
As far as I know... From: Thangavel Sankaranarayanan [mailto:[EMAIL PROTECTED] Does Synchronization is taken care by Tomcat itself when i call a static method from a thread No. should i use synchronized keyword Depends. If your application will fail under some circumstances if the call is not synchronised, then you should synchronise it. You are the only person who knows the detail of your application; nobody on this list can answer this question for you. And J2EE application are multithread,so its container responsibilities to handle all these stuff for user. No. The container can do some things, but it does not inspect your code for calls to static methods and synchronise them. Even if you use 'synchronized' keyowrd in J2EE application than you are trying to make your container life tuff which you shd not be the case. Depends. Large synchronised areas may lead to lock contention and hence slow down your application. In the extreme case, they could lead to deadlock. It's up to you to design your application appropriately, mainly by avoiding shared state as far as possible. It's not the container's job to get you out of the mess if you code your own solution. Conatiner will do better handling of common resource,so we shd not use 'synchronized' keyword. Yes, where the container is aware of the common resource and knows how to pool it. No, where it's your own code implementing the common resource. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]