RE: Run more than two tomcat in one server
Yes there is. Make sure you create two sets of configuration files. Make sure they do not want to share resources that cannot be shared like the HTTP/HTTPS port Tomcat claims (use port 8080 and port 8081 for example) Then start tomcat and pass as an argument to the start scripts where the configuration files are located. (just look at the content of the 'bat' files and you will find the argument) And not the quick and dirty sollution Make two copies of tomcat and hardcode the setting of TOMCAT_HOME in the startup script. Wouter -Original Message- From: Katsuyuki Michishita [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 11 December, 2001 11:06 To: Tomcat Users List Subject: Run more than two tomcat in one server I am using Tomcat-3.2.3 on Windows 2000. For the testing pourpose, I 'd like to run 2 or more Tomcat servers on one machine. I have tested on the machine, but it's failed. Because it tries to use the directory where I specified in TOMCAT_HOME (C:\Tomcat in my case) when one of "startup.bat" is executed. Is there anyway to run more than one tomcat service on the machine? please let me know. Thx -kats -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Help: 4 clients vs 1 client
You can impove significantly by recognizing simularities between requests. If some of the 'n' record and building the XML from them are the same for requesting each client, a new request will initiate the whole processing again while you hust might have done the work a second ealier. If the result would have been chached, the repsonse for the query would have been fast and without asking tomcat/database to process the request. So you have two benefits. The reponse is faster and the load on the backend system reduces. Try put a Squid cache in web accelerator mode (better known as reverse proxying), binding to port 80, in front of apache and let it cache only in memory. Each client then connectect like this: Squid - Apache - Tomcat - Database If the request has been handled before and the result is know, squid will return the result at once so the request will nog even be seen by Tomcat and the database. Apart from the overhead, this will come very close to the same reponse times for 1 client of m clients. Please note that in order for this construct to work, the data must be stateless! The result of the request must be valid for a fixed amount of time, lets say 5 minutes, in order for the caching to be helpfull. In general the higher the TTL of a request can be set, the better the reverse proxy will work. Wouter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 11 December, 2001 10:22 To: [EMAIL PROTECTED] Subject: Help: 4 clients vs 1 client Hello, The system of my company consists of an Apache + Tomcat 3.2 server and a database server. An application is being developed, it involves calling a tomcat servlet which retrieves records from the database server and then use the records to build an XML. I've tested the times required to run from 1000 to 2 records for a single client, and then tested the times for 4 clients. I found that the average time needed for 4 clients to build the XML with 'n' records is always similar to the time needed for a single client to build with '4n' records(excluding the time to fetch the database). Is this pattern reasonable? My boss suggests that 4 clients to build 'n' records should be similar to a single client to build 'n' records as servlets involve some kinds of threading mechanism. If it is true, what are the means to improve to get a better pattern? Please give me some opinions, thanks. McMug -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: SESSION Poblems
Hi Catalin, You didn't look very well did you? This is part of the servlet 2.2 specs that can be found at www.javesoft.com It's in the web.xml file session-config session-timeoutxx/session-timeout /session-config Regards, Wouter -Original Message- From: Catalin [mailto:[EMAIL PROTECTED]] Sent: Monday, 10 December, 2001 23:29 To: [EMAIL PROTECTED] Subject: SESSION Poblems Hi! In wich file is setted the time witch the session remains valid without any operations made in my web-app. In my case, if I login to my application and I stay logged in without doing nothing for a half an hour (30 min) I lose the session and I have to login again (to initiate a new session for my web application). Thanks very much!! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Newbie - class loading issue
Newbie - class loading issueHi, Maybe to obvious, but Tomcat is *not* a EJB server, just a servlet/jsp container. Let us know which classes it cannot find if you want to get more repsonse. Putting classes in the WEB-INF/classes are found, the examples prove that. Wouter -Original Message- From: Vinay Singh [mailto:[EMAIL PROTECTED]] Sent: Monday, 10 December, 2001 15:25 To: '[EMAIL PROTECTED]' Subject: FW: Newbie - class loading issue Folks, I am facing the same issue. Could not get my classes loaded from WEB-INF/classes folder. Do I have to do anything other than just putting my classes in this folder and restarting tomcat 4.0.1 Can anybody answer this !! Thanks in advance Vinay -Original Message- From: Bill Halpin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 9:51 PM To: '[EMAIL PROTECTED]' Subject: Newbie - class loading issue Hello Folks! I was recently assigned a POC project that includes some web development which I am using Tomcat 4.0.1 to do. I've only been using Tomcat for about 1.5 weeks so I'm extremely wet behind the ears. I've consulted the documentation and searched the list archives looking for an answer to my problem but cant seem to find one. Right now, I am simply trying to use a bean to gather data from a form and return the data to the screen. When I run the jsp to do this, I get one of two different class not found errors. I am not deploying the app using a WAR file, right now I just have the jsp file in the root directory and the class files in WEB-INF/classes. The bean class is in the package login. So the full path for the class is WEB-INF/classes/login/UserBean.class. I've also tried the following: 1. Recompiled the class without the package and placed the class in WEB-INF/classes. 2. Created jar file with package. Placed the jar file in WEB-INF/lib. This also did not work, so I tried /lib and /common/lib which also didnt work. I tried all of these locations with and without the package designation. 3. I've added the individual class and the jar file to the classpath. I am sure I am making a simple mistake but cant seem to figure out what that mistake is. According to (my understanding of) the documentation, placing the class files in WEB-INF/classes should be all I need to make them accessible to the jsp, am I mistaken? The text from the errors was rather lengthy, so I have not included it, if necessary I would gladly forward it on. If anyone has a possible solution, or perhaps advice on other sources to peruse to solve the problem, I would greatly appreciate it. Thanks -b Bill Halpin Schwoo, Inc 412-481-3301 [EMAIL PROTECTED]
RE: How to create global variables wich could be accessed by all jsp sites and servlet's?
You may want to use a properties file or much more 'mordern' nowadays, create XML file which hold the values. The Properties class is easier to work with directly I think. Wouter -Original Message- From: Sebastian Hagenbrock [mailto:[EMAIL PROTECTED]] Sent: Monday, 03 December, 2001 15:36 To: Tomcat Maillist Subject: How to create global variables wich could be accessed by all jsp sites and servlet's? Hi, I've found nothing about how to save Variables wich are stored globally in reference to one context. Normally I handle the variables in session objects for each user. But I've some preferences wich should be read only once at the start of the tomcat server and then always only read by the classes/jsp sites. I need it, because the initialisation of these variables consumes much time, and i have running it now for each new created session object. But it is only needed once at the servers startup. How to do that? Thx SH PS: Sorry for my bad english. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]