RE: In-Process Tomcat
In-process Tomcat is to have Tomcat running in the same process space as Apache HTTPD, IIS, or other web server. Since most of the web servers are implemented in C/C++, you will have to use JNI to integrate with Java-based Tomcat, and create a mod_tomcat like module for Httpd. Definitely the in-process setup improves performance, since communication between Tomcat and web server occurs via memory-based data exchange. It will be less stable since if something went wrong with the Tomcat, it would affect the web server directly. It will also be less scalable, since this setup won't support high-availability and clustering of Tomcat servers. Out-process Tomcat, on the other hand, is running as an independent server in a different process space or on a different machine as the HTTPD server. It may lack the performance as the in-process set up, since the communication between Tomcat and HTTPD occurs via network. But it is definitely more stable and more scalable than in-process Tomcat. I don't think that in-process Tomcat is much used nowadays, since it is hard to configure and very error-prone. The common way of using Tomcat with a front end HTTPD is the out-process one, since it is more flexibly and easy to configure. The common architecture is to have the front-end HTTPD running in a DMZ, serving static pages, while one or more Tomcat servers hosting the dynamic application running behind the firewall. In this case, the out-process Tomcat is the only option. Hope this helps. ND -Original Message- From: lightbulb432 [mailto:[EMAIL PROTECTED] Sent: Sunday, June 24, 2007 1:33 PM To: users@tomcat.apache.org Subject: In-Process Tomcat I read a few things that explained the difference (in configurations where you must front Tomcat with Apache HTTPD) between in-process Tomcat and out-of-process Tomcat, and have a couple of questions. It said that in-process Tomcat will reduce latency (which I understand) but decrease both stability and scalability - why will it decrease both of these things? How can you set up an in-process Tomcat? I couldn't find anything related at http://tomcat.apache.org/connectors-doc/ or by doing a web search. Do both options make use of the mod_jk connector to HTTPD, and it's just a matter of configuring it appropriately, or does Tomcat somehow have to be compiled into Apache, or something else? In general, what conflicts arise from an integrated Tomcat and HTTPD setup, whether in-process or not? Both Tomcat and HTTPD have configuration related to URL rewriting, authorization/authentication, logging, etc. In general terms, what's the most reasonable way to configure your integrated setup so that the resulting installation doesn't leave security holes, or break due to URL rewriting, or any other results? An strategies or best practices here? -- View this message in context: http://www.nabble.com/In-Process-Tomcat-tf3972772.html#a11276703 Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: Using a configuration file without path for an application deployed on tomcat
How about packaging the config.xml file within the jar file and import it to your application via resource stream? See Class.getResourceAsStream() or ClassLoader.getResourceAsStream() for more details. The limitation of this approach is that the configuration parameters have to be predefined prior to deployment. ND -Original Message- From: STEINER Stephan [mailto:[EMAIL PROTECTED] Sent: Monday, March 06, 2006 10:28 AM To: users@tomcat.apache.org Subject: Using a configuration file without path for an application deployed on tomcat Hi I have developed a Java application which offers certain services to Cisco IP phones. I've written it as a standalone java application to separate processing logic and presentation. So basically I have a set of classes, and two jsp frontend files that do very basic things. Since the application can be run in standalone mode (for debugging purposes), I have an xml configuration file which is assumed to be located in the same directory as the application itself. Hence, my configuration reader looks for a file config.xml without any path indication (since the path can change). This works like a charm in the standalone configuration. Then I added the jsp frontent using NetBeans. Netbeans has an integrated Tomcat, and out of sheer luck I figured out that once my war is deployed on the Netbeans Tomcat, my config.xml needs to be located not in the path where the jar that contains the application logic (that one is put in WEB-INF/lib where it belongs) but in the Tomcat bin directory. However, this no longer holds when I'm looking at a standalone Tomcat installation. I've tried a bunch of different paths but with no luck. So I'm wondering, if the app is looking for a config.xml without any path indication whatsoever, where should I put it so that it will be find once the jsp frontend starts the application? (and to go a little into detail, the jsp is configuration oblivious and the application uses the singleton pattern.. So in the jsp I'd write something like % mypackage.Application myApp = new mypackage.GetApplication(); myApp.DoSomething(); % And in mypackage.Application, I'd have Static Application app = null; Public static Application GetApplication() { if (app == null) { app = new Application() app.loadConfig(config.xml); } return app; } So, where do I put config.xml so that loadConfig will find it? I presume that if the NetBeans integrated tomcat mapps the local directory to the bin directory, there should be something similar on a standalone tomcat installation, should there not? And if this approach is doomed, then how else can I get an xml configuration to the application without involving the frontent jsp files? Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TomcatProbe 1.1 released
What are the differences between Tomcat Manager and TomcatProbe? Thanks! ND -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 06, 2006 7:51 AM To: users@tomcat.apache.org Subject: TomcatProbe 1.1 released Hello guys, I thought that you might be interested in this announcement. TomcatProbe 1.1 new features include log file browser and connector usage charts. Log browser is a configuration- and maitenance free feature that enables monitoring of Tomcat log files. It supports Log4J, Commons, Catalina and JDK built-in loggers. You will be able to see and download easily all log files Tomcat has created or can possibly create. Connector usage charts display real-time Tomcat connector usage both in terms of the number of requests received and the volume of traffic that came in and out of the connector for the last 2 hours. This feature should help to visualise load on your Tomcat instance. This release also addresses some important issues with application deployment, multi-lingual JSPs, referencing datasources via ResourceLink and others. Project web site: http://www.tomcatprobe.org Change log: http://www.tomcatprobe.org/d/latest.shtml Demo site (LOGIN: demo/demo) http://www.tomcatprobelive.com I hope you enjoy using it. Best regards, Vlad The information contained in this email message may be confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Although this message and any attachments are believed to be free of viruses, no responsibility is accepted by Informa for any loss or damage arising in any way from receipt or use thereof. Messages to and from the company are monitored for operational reasons and in accordance with lawful business practices. If you have received this message in error, please notify us by return and delete the message and any attachments. Further enquiries/returns can be sent to [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need help with click streams
You may be interested in the open source product http://www.opensymphony.com/clickstream/ ND -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 7:31 AM To: 'Tomcat Users List' Subject: RE: Need help with click streams Tomcat has an access log mechanism, aka access valve. This will log what URLs are requested, which may or may not be what the user clicked, of course. http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html -Original Message- From: S, Ashwath [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 1:26 AM To: users@tomcat.apache.org Subject: Need help with click streams Hi, I need to extract the click Stream logs from tomcat. Is this possible?? I would like to know who's clicked what, when and how many times. I need these stats for analytic purposes... Regards, Ashwath S - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat servlet load handling
I assume that your web app was dealing with a backend database. In that case, it is quite possible that your JDBC data source is running out of connections. So the timeout is not necessarily caused by the servlet, but by the connection pool. One option is to increase the number of connections in the connection pool. 8 out 10 times this can be the solution. ND -Original Message- From: foo shyn [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 6:05 AM To: users@tomcat.apache.org Subject: Tomcat servlet load handling Hi, I face problems when Tomcat is facing heavy load for a particular servlet. I got a servlet which serves a large amount of data to users. When a particular number of users is accessing this servlet, others failed to reach it (receive nothing until the connection timed out). If they access other servlets on the same Tomcat there won't be any problem. My Questions are: Is it that the Tomcat have any settings to allow how many users to be able to access a servlets at the same time? or is it that my Servlets need to follow certain coding pattern? What would prevent the users from accessing the Tomcat's servlet when other's running it as well? I'm running on Tomcat 4.1 with J2SDK 1.4.2 Any opinions and feedbacks are welcomed. Thanx Regards, FooShyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client Cert
What do you want to accomplish? SSL is the only (I mean one that is established) way to ensure a secure session. ND -Original Message- From: Luis Henrique [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 10:11 AM To: users@tomcat.apache.org Subject: Client Cert Is there anyway to request a client cert without https? Thanks for your help Luis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where to place JNDI sections for customer deployment
If you (or someone else) have full control of the database configuration, not your customers, you may consider using a true JDNI server. The JNDI implementation provided by Tomcat (or most of the app servers in the market today) are not true JDNI services, but only a look-up table, because objects bound as JNDI resources are available only to clients within the same app server. A true JDNI server (e.g. LDAP-based) would allow remote look-up of objects, so that naming functions can be made independently from application (war file) packaging and deployment. One such JNDI server is the COBRA's CosNaming provided by JDK. Please see instructions on tnameserv under the Java IDL and RMI-IIOP Tools section of JDK doc for more details. You will have to create a simple Java client to register your DB with the naming server, and make corresponding coding change in the web app to retrieve DB resource. ND -Original Message- From: Darren [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 11:00 AM To: users@tomcat.apache.org Subject: Where to place JNDI sections for customer deployment Hi, I am running Tomcat 5.5.9 and would like to deploy an application (as a war file) to various customers, but I am having trouble finding the best place for JNDI lookups. During development I kept everything inside the war file and placed my JNDI entries in $WAR/META-INF/ context.xml, but I don't want customers to have to edit the context.xml in the war file on their systems. So, I added the following into $WAR/WEB_INF/web.xml resource-ref descriptionDB Connection/description res-ref-namejdbc/db/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref resource-ref descriptionEmail Server Settings/description res-ref-namebean/email/res-ref-name res-typesomepackage.EmailServerConfiguration/res-type res-authContainer/res-auth /resource-ref Now I am unsure where to add the following Context path=/mycontext docBase=mycontext crossContext=true reloadable=true debug=1 Resource name=jdbc/db auth=Container type=javax.sql.DataSource maxActive=10 maxIdle=15 maxWait=1 removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=true driverClassName=com.mysql.jdbc.Driver username=user password=pass url=jdbc:mysql://localhost:3306/db? autoReconnect=true / Resource name=bean/email auth=Container type=somepackage.EmailServerConfiguration factory=org.apache.naming.factory.BeanFactory host=localhost port=25 / /Context I tried adding it into $CATALINA/conf/server.xml inside the following host definition Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false but this meant the mycontext application was always visible in the manager and did not autodeploy when a war file was placed in $CATALINA/webapps (undeploy didn't appear to work either). I tried without the Context wrapper and the JNDI lookups failed. I see when an application is deployed tomcat makes it's own context configuration within $CATALINA/conf/Catalina/$HOST/$CONTEXT.xml which appears a good place to put the JNDI lookups. Only problem is this file is removed by tomcat when the application is undeployed. Am sure there must be a standard solution to this, so can anyone tell me how it is 'meant' to be done? Thanks, Darren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Sessions per user
In your situation, you probably don't want to mess around with the HttpSession object. The session object is designed for sharing info within the same session, not the same user. If sharing info among multiple sessions is desired, use ServletContext instead. One solution would be store your user-specific application data as an attribute and store it in the servlet context, with the user id as the key. You may need to use a hashtable or your own data structure as the context attribute if dealing with multiple/complex data types. This solution will also allow user data to be accessible even after one of the user sessions is terminated. ND -Original Message- From: Daniel Guggi [mailto:[EMAIL PROTECTED] Sent: Thursday, February 16, 2006 8:22 AM To: users@tomcat.apache.org Subject: Multiple Sessions per user Hi! I ran into a session-issue with a webapp. There are situations when it would be nice for a user (same browser/same machine/same webapp) to have the possibility to login twice and thus have two different JSESSIONIDs. There is also a problem if the user opens a second browser-window or -tab, because the user may change session-data in the one window and thus will have invalid (outdated) data in the other window afterwards. Example: The user is logged and requests a jsp page that has the following session-bean: jsp:useBean id=someBean scope=session class=someClass / The user also opens the jsp page in another browser-window (or -tab). Now he starts editing the data (provided in the form) in one of those windows and then submits it to the server. The server verifies and stores the data in db. As a result the session-variable someBean gets reloaded/updated. If the user now tries to update the data in the other window, there will be a problem, because the session-data someBean has already been updated and the user is going to send outdated information to the server. What are the possible solutions to this issue(s)? Maybe the RSEF (the rudimental servlet extension framework) (http://java.sun.com/developer/technicalArticles/Servlets/ServletControl /) would help me with creating multiple sessions for the same users? And how would someone solve the problem with multiple browser-windows or -tabs? TIA, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat, Security, Anonymous Authentication
Anonymous authentication is an additional feature that you need to create in your web application. It doesn't come by default in any app servers. So there is no need to disable it when configuring Tomcat. There is a good article in JavaWorld discussing about anonymous authentication in J2EE. http://www.javaworld.com/javaworld/jw-03-2005/jw-0307-captcha.html ND -Original Message- From: Aydın Toprak [mailto:[EMAIL PROTECTED] Sent: Monday, February 13, 2006 4:27 AM To: users@tomcat.apache.org Subject: Tomcat, Security, Anonymous Authentication Hi, I have a question about the security issue that I have to cover of my server. I have web service which runs on Tomcat 5.5 with SSL ... I have installed all the SSL system on the server and it works fine, however as a little advance subject, I have to recover some security issues,... the first one is Disabling anonymous authentication ... I actually dont know the exact meaning of it an how to fix it... as far as foundfrom the web, I need to add some lines like SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite ALL:!aNULL:!ADH:!ADH:!eNULL:!LOW:!EXP:RCA4+RSA:+HIGH:+MEDIUM to SOMEWHERE that I dont know and how... according to web site that I have inspired :) , those lines should be added to Apache/mos_ssl, httpd.conf, or ssl.conf ... but I dont have these files in tomcat directory... what should I do ? thank you... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problems with Clusters or apache connector not sure which one
It looks like a network problem to me. Is there any firewall between the apache and your tomcat server? Or did your IT dept reconfigure the network recently? ND -Original Message- From: Randy Paries [mailto:[EMAIL PROTECTED] Sent: Monday, February 13, 2006 9:27 AM To: Tomcat Users List Subject: problems with Clusters or apache connector not sure which one hello, I am running apache-tomcat-5.5.15 on three boxes 2 rh9 and one fedora 4. and they are clustered together I am seeing problems where apache can not longer talk to tomcat. if anyone can point me on how to debug this please help, i am not sure what else i should include as far a conf setups, so please let me know what other details i need to supply so you guys can help Thanks in the log files at the time of the failure i see the following catalina.out ( i will see a bunch of these) Feb 12, 2006 8:25:23 PM org.apache.catalina.cluster.tcp.TcpReplicationThread run SEVERE: TCP Worker thread in cluster caught 'java.io.IOException: Connection reset by peer' closing channel java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233) at sun.nio.ch.IOUtil.read(IOUtil.java:206) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:125) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:69) = then in my mod_jk.log i will see = [Sun Feb 12 20:25:10 2006] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems [Sun Feb 12 20:25:13 2006] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems [Sun Feb 12 20:25:39 2006] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems [Sun Feb 12 20:30:00 2006] [jk_ajp_common.c (738)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. err=-104 [Sun Feb 12 20:30:00 2006] [jk_ajp_common.c (1137)]: Error reading reply from tomcat. Tomcat is down or network problems. [Sun Feb 12 20:30:00 2006] [jk_ajp_common.c (1290)]: ERROR: Receiving from tomcat failed, recoverable operation. err=0 [Sun Feb 12 20:30:02 2006] [jk_ajp_common.c (738)]: ERROR: can't receive the response message from tomcat, network problems or tomcat is down. err=-104 [ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdbc context
You should be able to add the context info in your web.xml file. In other words, instead of making the JDBC resource available to all web apps, you make it only to particular applications. If this JDBC connection is only used by the workflow web app, defining it in web.xml is actually preferred. ND -Original Message- From: jacky [mailto:[EMAIL PROTECTED] Sent: Monday, February 13, 2006 5:07 AM To: users@tomcat.apache.org Subject: jdbc context hi, I have deploy a workflow webapp in Tomcat4.1.31. First time, i add the following code in server.xml: Context path=/myworkflow docBase=myworkflow reloadable=true Resource name=jdbc/DefaultDS type=javax.sql.DataSource/ ResourceParams name=jdbc/DefaultDS parameter namemaxActive/name !-- Maximum number of DB connections in pool.Set to 0 for no limit. -- value100/value /parameter parameter namemaxIdle/name !-- Maximum number of idle DB connections to retain in pool.Set to 0 for no limit. -- value30/value /parameter parameter namemaxWait/name !-- Maximum time to wait for a DB connection to become available in ms.An exception is thrown if this timeout is exceeded.Set to -1 to wait indefinitely. -- value15000/value /parameter parameter nameremoveAbandoned/name !-- Abandoned DB connections are removed and recycled -- valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name !-- Use the removeAbandonedTimeout parameter to set the number of seconds a DB connection has been idle before it is considered abandoned. -- value60/value /parameter parameter namelogAbandoned/name !-- Log a stack trace of the code which abandoned -- valuefalse/value /parameter parameter namefactory/name !--DBCP Basic Datasource Factory -- valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameternameusername/namevaluesa/value/parameter parameternamepassword/namevalue/value/parameter parameternamedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value/parameter parameternameurl/name valuejdbc:microsoft:sqlserver://localhost:1433;databaseName=myworkflow /value/parameter /ResourceParams /Context It works well. But now, we need to migrate myworkflow into another tomcat4.1.31, in which the server.xml can't be modified. So what shall i do to deploy the jdbc context? Thanks for your help! Best Regards. jacky - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdbc context
Well, I guess it was my mistake. In Tomcat 5.5 you will be able to define the context information within each web app, by creating a context.xml in your war file, and the corresponding resource-ref in web.xml. Apparently this is not available in tomcat 4.1 I guess there are two options you may consider: One is to upgrade your tomcat to 5.5. The other is to change the web app not to use JNDI, but to use the data source factory directly in your code. Hope this helps. ND -Original Message- From: chen jacky [mailto:[EMAIL PROTECTED] Sent: Monday, February 13, 2006 10:49 AM To: users@tomcat.apache.org Subject: RE: jdbc context hi, Do you mean add the following code in the web.xml? resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref But this still need to add the jdbc config in the server.xml,right? Can you give me some suggestions? From: Duan, Nick [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: Tomcat Users List users@tomcat.apache.org Subject: RE: jdbc context Date: Mon, 13 Feb 2006 10:11:34 -0500 You should be able to add the context info in your web.xml file. In other words, instead of making the JDBC resource available to all web apps, you make it only to particular applications. If this JDBC connection is only used by the workflow web app, defining it in web.xml is actually preferred. ND -Original Message- From: jacky [mailto:[EMAIL PROTECTED] Sent: Monday, February 13, 2006 5:07 AM To: users@tomcat.apache.org Subject: jdbc context hi, I have deploy a workflow webapp in Tomcat4.1.31. First time, i add the following code in server.xml: Context path=/myworkflow docBase=myworkflow reloadable=true Resource name=jdbc/DefaultDS type=javax.sql.DataSource/ ResourceParams name=jdbc/DefaultDS parameter namemaxActive/name !-- Maximum number of DB connections in pool.Set to 0 for no limit. -- value100/value /parameter parameter namemaxIdle/name !-- Maximum number of idle DB connections to retain in pool.Set to 0 for no limit. -- value30/value /parameter parameter namemaxWait/name !-- Maximum time to wait for a DB connection to become available in ms.An exception is thrown if this timeout is exceeded.Set to -1 to wait indefinitely. -- value15000/value /parameter parameter nameremoveAbandoned/name !-- Abandoned DB connections are removed and recycled -- valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name !-- Use the removeAbandonedTimeout parameter to set the number of seconds a DB connection has been idle before it is considered abandoned. -- value60/value /parameter parameter namelogAbandoned/name !-- Log a stack trace of the code which abandoned -- valuefalse/value /parameter parameter namefactory/name !--DBCP Basic Datasource Factory -- valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameternameusername/namevaluesa/value/parameter parameternamepassword/namevalue/value/parameter parameternamedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value/parameter parameternameurl/name valuejdbc:microsoft:sqlserver://localhost:1433;databaseName=myworkflo w /value/parameter /ResourceParams /Context It works well. But now, we need to migrate myworkflow into another tomcat4.1.31, in which the server.xml can't be modified. So what shall i do to deploy the jdbc context? Thanks for your help! Best Regards. jacky - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Realm and Authentication with Tomcat 5.0, Apache 2 and mod_jk 1.2
Sorry for jumping into the discussion. The comment I'd like to make is that you can't really separate the security realm from authentication. In other words, a security realm is an integral part of user authentication. If user authentication is done by apache, the realm (the term realm is kind of used for app servers exclusively) should be provided by apache. If it is done by tomcat, the tomcat realm should be used. In this case, one option is to use or customize the mod_auth of apache (http://localhost/manual/mod/mod_auth_dbm.html), which is the apache realm for doing authentication. Another option would be just letting tomcat do the authentication by setting the tomcatAuthentication field to true. ND -Original Message- From: Mickael Goujon [mailto:[EMAIL PROTECTED] Sent: Friday, February 10, 2006 3:30 AM To: Tomcat Users List Subject: Re: Realm and Authentication with Tomcat 5.0, Apache 2 and mod_jk 1.2 Hi Bill, Thanks for your answer. The original design of this authentication/session creation mechanism was made by another developper who knows Tomcat better than I know (but not enough apparently ;) ). If I understand correctly, your suggestion is to write a custom valve which will be used as our missing link between the Apache authentication and the Tomcat Realm call. Is this correct? The Valve will access the username/password in the header and explicitly call the Realm (Kind of similar to the SSO Valve)? Cheers, Mickael Bill Barker wrote: Mickael Goujon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, We have a web application deployed under Tomcat 5.0 which uses a custom Realm for authentication. This custom Realm basically does a web service call using the user's credentials to authenticate with the web service server (basic WS-I username/password authentication). If the web service call fails (user not allowed to call the web service with his credentials), then Tomcat authentication fails. If the web service call succeed (user has access to the web service), then Tomcat authentication succeed and the Realm will store the Session object returned by the web service in a ThreadLocalContext to be reused later in the web application. This works fine with Tomcat only, but as soon as I add mod_jk and try to use Apache to do the authentication and then pass the credentials to Tomcat (using tomcatAuthentication=false), I get the 403 - access denied page. I'd like to know if, in my configuration (Apache authentication + Tomcat Realm + tomcatAuthentication=false), Apache is supposed to pass the user login/password to the Tomcat Realm or if the realm is not called at all (This would be the bad news I fear)? Sorry for the bad news, but the Tomcat Realm is not called at all in this situation. Also, Apache doesn't forward the password directly (although it is still in encoded in the Header). My combination Apache/Tomcat/mod_jk works when I specify tomcatAuthentication=true. But, I'd like to have Apache authentication and the Tomcat Realm called automatically after that with the username/password... Is this possible or do I have to move my Session creation process somewhere else? A custom Authenticator is probably over-kill here. I would probably just use a custom Valve. But as-is, you do at least have to add something (or, modify your copy of the Tomcat code :) to invoke the Realm. Hope you understood my problem, Cheers, Mickael -- Mickael Goujon Software Engineer Lion Bioscience Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat + certificate
Without knowing the details of your problem (you may want to provide a stack trace next time), I think the problem is in the java client. Did you use JSSE to implement the client? The java sockets for accessing http are not the same as https. ND -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Saravana Kumar Sent: Friday, February 10, 2006 2:29 AM To: users@tomcat.apache.org Subject: tomcat + certificate Hi, I am running a tomcat server running here. We have a servlet container hosted in the server. The servlet is called from a java client program and is working fine(http). Then i following the instructions from the tomcat documentation page i installed a self signed certificate. The site now shows up with the certificate from the browser. The problem is while running the java client and connecting to the server(https) the program gives out error(connection timed out/SSL handshake ... etc). Hope i am not raising a dumb question here. What is wrong with my setup? Any pointers. Some one said we have to install apache also. Is that so? Is it possible to make tomcat handle the certificates itself and free the servlet from that. BTW, i am running on FC4, with tomcat version 5.5.12. TIA, SK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: socket read errors
Are you using Solaris? Is it possible that your MTU at the OS level wasn't set to a large number? ND -Original Message- From: James Rome [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 9:30 AM To: Tomcat Users List Subject: socket read errors My servlet that verifies presented client certificates is getting socket read timeout errors: INFO: : i/o exception: java.net.SocketTimeoutException: Read timed out Feb 2, 2006 7:24:14 PM org.apache.catalina.core.StandardWrapperValve invoke WARNING: Servlet.service() for servlet PolicyEngineServlet threw exception java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:284) at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:319) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java :720) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl. java:677) at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75) , Note the 133 errors below. The status is (note the 133 errors): Free memory: 77.98 MB Total memory: 254.12 MB Max memory: 1524.18 MB Max threads: 300 Min spare threads: 25 Max spare threads: 75 Current thread count: 25 Current thread busy: 3 Max processing time: 60035 ms Processing time: 8260 s Request count: 21298 Error count: 133 Bytes received: 33.67 MB Bytes sent: 46.44 MB I s there some way to overcome this? Googleing turns up lots of pages saying that you should use non-blocking i/o, but Tomcat only presents me with input and output Streams, and I do not think I can access the socket directly. My server does not seem to be overloaded, and I am communicating over a 1 Gbps LAN, so I do not understand why I am getting these errors. Thanks for any help, Jim Rome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and client certificates
The clientAuth attribute of the connector has to be set to true. Then you will need a client cert to access resources under /html/*, but not other pages. See the Tomcat SSL guide on how to create the client cert. ND -Original Message- From: Markus [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 9:22 AM To: Tomcat Users List Subject: Re: Tomcat and client certificates Setting clientAuth to true / false in the Connector configuration works fine, but how do I configure client authenticaton on a per-directory or even per-servlet basis? This is my current configuration: In server.xml: Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=\...\keystore.jks keystorePass=wonttell truststoreFile=\...\truststore.jks truststorePass=wonttell / In web.xml: security-constraint web-resource-collection url-pattern/html/*/url-pattern /web-resource-collection auth-constraint/ user-data-constraint/ /security-constraint login-config auth-methodCLIENT-CERT/auth-method /login-config And here are the results I get: https://domain/anypage : OK https://domain/html/anypage : HTTP Status 403 - Access to the requested resource has been denied The logfile says: 01.02.2006 15:19:57 org.apache.coyote.http11.Http11Processor action WARNING: Exception getting SSL Cert java.net.SocketException: Socket Closed What's wrong with my configuration? Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: BUG in Tomcat 4.3.31 with Oracle 9?
Could you publish the stack trace for this? ND -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 8:06 AM To: users@tomcat.apache.org Subject: BUG in Tomcat 4.3.31 with Oracle 9? Hi! I tried the following code from a jsp-page one time on a tomcat 4.1.30 and one time on a tomcat 4.1.31. String up = update test_double set test_value = '26.5' where oid = '1'; Statement st = dbConn.createStatement(); st.executeUpdate(up); Interestingly this code works with tomcat 4.1.30 but not with 4.1.31 I'm using an Oracle 9 DB and ODBC-Thin Driver. Any ideas what this problem could be? best regards, Markus -- 10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail +++ GMX - die erste Adresse für Mail, Message, More +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Asynchronous messaging in tomcat
Spawning your own threads in a web app is usually not recommended. The correct way is to create and use a JMS message listener, like in Jakarta common messenger. http://jakarta.apache.org/commons/sandbox/messenger I am not sure how easy it is to integrate with Tomcat 5. ND -Original Message- From: Gehl, Pascal [mailto:[EMAIL PROTECTED] Sent: Friday, January 27, 2006 9:02 AM To: users@tomcat.apache.org Subject: Asynchronous messaging in tomcat Hi, I know we are not supposed to do this but is there a big inconvenience to do asynchronous message consuming in tomcat 5+ (by spawning a daemon thread for my message listener ?) Is it true that if a I create a thread on my own I won't have access to the tomcat JNDI context ? I ask this because we really don't want to use an EJB container only for MDB. thanks paskos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application sign-in
If you have your web resources (servlet, jsps) protected with authentication, no users are able to access them without logging in first. ND -Original Message- From: Luis Gervaso [mailto:[EMAIL PROTECTED] Sent: Friday, January 27, 2006 1:00 PM To: Tomcat Users List Subject: Re: Application sign-in I need to call database only whe user login with j_security_check It's is valid other users have a session in the application but they are not authenticated (guest users) regards 2006/1/27, Duan, Nick [EMAIL PROTECTED]: One option is to create your own HttpSessionListener and implement the method sessionCreated(), where you can add objects to HttpSession. Please refer to the javadoc of javax.servlet.http.HttpSessionListener API for more details. ND -Original Message- From: Luis Gervaso [mailto:[EMAIL PROTECTED] Sent: Friday, January 27, 2006 11:36 AM To: users@tomcat.apache.org Subject: Application sign-in Hello, I need help about making this... when an user login using form-based authentication i need retrieve a user objet from database and store it in his httpsession regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Un saludo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Spam:RE: Spam:RE: stdout/logging
The redirection operator should work, but with one more detail: You need to modify the catalina.bat file to enable the redirection. ND -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 24, 2006 10:04 AM To: Tomcat Users List Subject: Spam:RE: stdout/logging From: Samuel B. Quiring [mailto:[EMAIL PROTECTED] Subject: stdout/logging Is there any way to accomplish this exact same redirection without running tomcat as a service? Is there something wrong with the standard Windows redirection operator ()? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Size of session bean
The initial posting sounds like an EJB question instead of one that is Tomcat related. Tomcat is considered a web application server and it uses session objects (HttpSession) to represent user sessions. It doesn't handle EJBs at this point. Session beans are exclusive terms for EJB servers (e.g. JBoss, WebLogic, WebSphere, etc.) If you want to determine memory usage of session objects in tomcat, the answer will depend on the content/size of HttpSession and the number of concurrent users. If you really mean session beans in EJB, you need to differentiate the types of session beans. There are two types of session beans, stateless and stateful (as of EJB spec 2.1). Stateless session beans can be pooled, so the memory usage for them would be the size of a bean object times the size of the pool. Stateful session beans can't be pooled, so their memory usage would be the size of the bean times the number of concurrent users. The size of any java object is usually defined by its size on the heap, determined by its instance data members. The number of methods does not matter. ND -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Saturday, January 14, 2006 1:35 PM To: Tomcat Users List Subject: Re: Size of session bean That's an interesting question... looking at the code I wrote in Java Web Parts for the getSessionSize() method, I'm only taking into consideration the fields of the objects in session. I think this is OK because IIRC, when an object is serialized, only the non-transient values are considered. The methods don't factor into it because you aren't serializing the class definition, just the state of the object. If anyone knows differently I'd like to hear about it, but I believe how that method works yields an accurate result. If you want to see how I've done it, check out: http://javawebparts.sourceforge.net If you look at the javadocs, in the session package, there is a class called SessionSize that is used to get the size of a session object. You can grab the code and see how it's done, or just use it if that's your ultimate goal :) Frank Robert Palmer wrote: When calculating the size of a session bean to determine memory usage, what should be included and how is this done? Do the number of methods matter? The size of the code? Just the variables? I've read much about limiting the size of the session information but not how to do it. I have some fairly large classes in session context but they don't store very much. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Easiest Open Source Shopping Cart Fnctnlty to plug into Tomcat
Sourceforge.net may be your answer (search for e-commerce). The latest spring framework also contains a very simple shopping cart app called jpetstore as an example. It works well on Tomcat. http://www.springframework.org. ND -Original Message- From: Kyle [mailto:[EMAIL PROTECTED] Sent: Saturday, January 14, 2006 12:35 AM To: TomCat Subject: Easiest Open Source Shopping Cart Fnctnlty to plug into Tomcat Hello folks I was wondering whether someone can point me in the direction of some Open Source Shopping Cart type functionality I can easily plug-in to Tomcat and integrate into a site please? I found a few on Google, but have no idea which does what and how complex , etc. Can you offer guidance please? -- Kind Regards Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with servlets from upgrade (Tomcat to SunOne)
Without knowing how your web.xml file was defined, it seems to me a context root problem. Sun has its own way to define the path of a context root in its sun-web.xml file, unlike tomcat which uses the application name as the default root path. If you use Sun's Studio to package and deploy your web app, by default it may create a default context root as / instead of /yourappname as in tomcat. The simplest way to solve this problem is to package your tomcat application yourself (if you haven't got a deployable war file) instead of using Sun's IDE, and deploy the war file to the autodeploy directory of your Sun One app server. By default, the autodeploy directory should be under $YOURSUNAPPSERVER/domains/domain1. You don't have to restart the SunOne server to do the deployment. ND -Original Message- From: Francesca Jovanovic [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 11, 2006 5:29 AM To: tomcat-user@jakarta.apache.org Subject: Problem with servlets from upgrade Importance: High I have a new computer and I have installed the latest version of Tomcat 5 and reinstalled the Sun One Studio 4 which I still had a setup file. The example servlets and jsp's work fine but my servlets - that worked fine on my old pc with tomcat 4 - now don't work, the jsps are working fine but not the servlets. I get this error: HTTP Status 404 - /servlet/PostStudentID _ type Status report message /servlet/PostStudentID description The requested resource (/servlet/PostStudentID) is not available. _ Apache Tomcat/5.5.12 I have searched endlessly to try and see what's going wrong and tried all your pointers but cannot resolve it. Can you please help? Is Tomcat 5.5.12 compatible with Sun one studio 4? Francesca Jovanović Learning Technologist Learning Partnerships Development Unit (LPDU) Faculty of Health University of Central England 311 Ravensbury House, Westbourne Road Edgbaston, Birmingham, B15 3TN Telephone: 0121 331 7181 Fax: 0121 331 6009 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to redirect incoming requests?
Couple of ways you may consider: - Ask your network administrator to change your DNS mapping or IP address mapping. - Use the build-in balancer of tomcat as a proxy to redirect the traffic (see the load balancer section of tomcat doc). - Apache or HW load balancer. ND -Original Message- From: Ritchie Gillam [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 11, 2006 8:59 AM To: users@tomcat.apache.org Subject: How to redirect incoming requests? I am trying to have all requests that come to the Tomcat Server be redirected to another web server. What is the best/easiest was to do this? I have Tomcat 5.5.7 installed and I do not have or want to install Apache. I have did a search through the archives and have found nothing. Any suggestions? Thanks in advance, Tomcat 5.5.7 Sun Solaris 9 Ritchie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Single Thread is deprecated?
Well, when I was mentioning the term user session, I was discussing from a threading/transaction perspective, not from the servlet object perspective. It is the worker thread that represents a active user session and accesses both the session and the servlet object (if we want to be precise). Chuck was right. It is possible to have one client (single browser) to start two concurrent sessions at the same time, both eligible to access the same HttpSession object. Therefore, it looks like synchronization is necessary from the spec. However, the spec does not define how HttpSession should be implemented (it's just an interface). In fact, the session attributes were implemented as a Hashtable in tomcat, not a Hashmap (just double checked the latest 5.5.15 src of tomcat). As we all know, Hashtable already has thread sync built in. So that's why additional synchronization on HttpSession in tomcat is unnecessary. ND -Original Message- From: GB Developer [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 6:33 PM To: 'Tomcat Users List' Subject: RE: Single Thread is deprecated? -Original Message- From: Duan, Nick [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 5:14 PM To: Tomcat Users List Subject: RE: Single Thread is deprecated? Typo due to my laziness. I knew someone was going to catch this. Actually the sentence should read: ... because there is only one servlet that is active during a single user session. In other words, there is no way a single user session (represented by a worker thread) can access more than one servlet at a time. Yah, I don't think that's right either, and besides that, it's a little backwards to describe it as you have. A sessions doesn't so much access servlets, as the servlets (more than one, regardless of their single-threadness) can access a single Session at once. Sessions are (never?) thread-safe. Which is perhaps one reason why SingleThreadModel was deprecated. People thought by using that interface that they would never have to worry about synch issues again. Even if you have nothing but singleThread servlets, that only prevents concurrent access to that servlet. Neither singleThread servlets nor any other mechanism I'm aware of can prevents concurrent access to a single Session object. Perhaps Remy will weigh in again with so many wildly varying 'opinions' ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: JSessionID
Tomcat handles user sessions (HttpSession) separately from SSL session. In other words, JSessionID is being generated independently from SSL. There is no relationship between an SSL session and the user session at the application level. You still have to use the same JSessionID (either implemented as a cookie or using url-rewriting) to access HttpSession even if SSL is turned on. ND -Original Message- From: Jess Holle [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 12:10 PM To: Tomcat Users List Subject: Re: AW: JSessionID Conveying servlet sessions by SSL session is clearly not required by the spec, though... I'm not sure whether Tomcat supports this... Bernhard Slominski wrote: Hi, I just looked it up in the spec and there is a 3rd one as well: SSL Sessions From the Servlet spec: SRV.7.1 Session Tracking Mechanisms The following sections describe approaches to tracking a user's sessions SRV.7.1.1 Cookies Session tracking through HTTP cookies is the most used session tracking mechanism and is required to be supported by all servlet containers. The container sends a cookie to the client. The client will then return the cookie on each subsequent request to the server, unambiguously associating the request with a session. The name of the session tracking cookie must be JSESSIONID. SRV.7.1.2 SSL Sessions Secure Sockets Layer, the encryption technology used in the HTTPS protocol, has a built-in mechanism allowing multiple requests from a client to be unambiguously identified as being part of a session. A servlet container can easily use this data to define a session. SRV.7.1.3 URL Rewriting URL rewriting is the lowest common denominator of session tracking. When a client will not accept a cookie, URL rewriting may be used by the server as the basis for session tracking. URL rewriting involves adding data, a session ID, to the URL path that is interpreted by the container to associate the request with a session. The session ID must be encoded as a path parameter in the URL string. The name of the parameter must be jsessionid. ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: forwarding JDOM-Objects
You shouldn't use req.getParameter(..). Instead, use the setAttribute and getAttribute methods in HttpServletRequest. No need to pack/unpack JDOM. You can pass an object via request. ND -Original Message- From: Christian Stalp [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 9:21 AM To: Tomcat Users List Subject: forwarding JDOM-Objects Hello again, now I have another question. I want to forward a JDOM-object from one servlet to another in the same servlet-container. I thought I write this JDOM to a string, transfer it and unpack it at the other side. BUT I cannot find a way to extract a JDOM from a String delivered by a HttpServletRequest. I tried it this way: String mystring = req.getParameter(Objekt); Document mydoc = mystring.? - no method found I thought there was a method anyway. What can I do here? Thank you and... Gruss Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: forwarding JDOM-Objects
Don't forget type casting the object. ND -Original Message- From: Christian Stalp [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 10:06 AM To: Tomcat Users List Subject: Re: forwarding JDOM-Objects Duan, Nick wrote: You shouldn't use req.getParameter(..). Instead, use the setAttribute and getAttribute methods in HttpServletRequest. No need to pack/unpack JDOM. You can pass an object via request. So... String mystring = req.getAttribute(Object) Document mydoc = mystring.? --- and now? Thank you... Gruss Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: forwarding JDOM-Objects
By type casting I mean: Document mydoc = (Document) req.getAttribute(yourobjname); Viel Glueck! ND -Original Message- From: Christian Stalp [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 11:16 AM To: Tomcat Users List Subject: Re: forwarding JDOM-Objects Duan, Nick schrieb: Don't forget type casting the object. String mystring = req.getAttribute(Object).toString(); Document mydoc = mystring.? Casting from String to JDOM doesn't work!!! So which way you prefer? Thank you... Gruss Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Single Thread is deprecated?
HttpServlet is inherently thread-safe as long as you don't use any instance and class variables in your code. There is also no need to sync around the session object, because there is only one servlet that is active at a time. The only sync you have to do is with app context objects. If you want to sync on your DB resource, you will have bottleneck problems with DB connections. The best solution is to use a DB connection pool which is more scalable. ND -Original Message- From: Michael Echerer [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 11:52 AM To: Tomcat Users List Subject: Re: Single Thread is deprecated? Christian Stalp wrote: Hello out there, I want to build a servelt which access a database. To avoid race-conditions and to realize synchronous access, I decited to make a Singe Thread Servlet. But Eclipse told me that this is no longer a usable code. Usually the best solution is to synchronize just the part that accesses the single resource (the DB) instead of using single thread. In worst case you won't even achieve what you want using single thread mode because according to the servlet specification servlet containers are free to pool servlets, if it implements SingleThreadModel. Hence you could have multiple pooled instances that be no means guarantee an synchronized access to your database in case of simultaneous requests hitting different instances. So SingleThreadModel is deprecated for good reason, since servlet spec 2.4 and also for 2.5. You are better of synchronizing yourself. Don't rely on SingleThreadModel as an easy way to get around multithreading issues. In case you have different code parts accessing your DB or various clients, it might not even help to just sync one servlet. You might even have to set database transaction isolation level to fit your needs for your DB connections. Most DBs have read-committed by default, but it might be that you need isolation level up to synchronized. Depends on your use case... Cheers Michael So what can I do else? Thank you... Gruss Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How does Tomcat log by default?
Check catalina.out file under the log dir. ND -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 9:59 AM To: users@tomcat.apache.org Subject: How does Tomcat log by default? I am playing around with a Hibernate project, and created a war file. I have a clean 5.5 Tomcat running on XP. The project I created is not using log4j. It has a bunch of System.out.println statements, and the tutorial says to look at the Tomcat log to see how this hibernate project connects, etc. By default my new Tomcat has a logs directory, but inside it there are stderr, stdout, tomcat.log and jakarta_service logs. I would assume that the system out should go to stdout.log, but there are no logs there. How is a new Tomcat configured, where would default System.out.printlns go? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Single Thread is deprecated?
Typo due to my laziness. I knew someone was going to catch this. Actually the sentence should read: ... because there is only one servlet that is active during a single user session. In other words, there is no way a single user session (represented by a worker thread) can access more than one servlet at a time. The deprecation of SingleThreadModel API is due to its unnecessity and the possibility of confusions on how to use it. If multiple concurrent threads access a method of an object that does not use any class or instance variables, like the most cases in doGet and doPost of HttpServlet, why bother to sync them? ND -Original Message- From: Michael Echerer [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 5:44 PM To: Tomcat Users List Subject: Re: Single Thread is deprecated? Duan, Nick wrote: HttpServlet is inherently thread-safe as long as you don't use any instance and class variables in your code. There is also no need to sync around the session object, because there is only one servlet that is active at a time. The only sync you have to do is with app context objects. How can you guarantee that only one servlet is active at a time? Tomcat by default has many connector threads that could simultaneously handle concurrent requests to the same servlet or different servlets that all could work with the same sessionid session objects. Without SingleThreadModel this servlet won't be pooled, hence all requests would have to be serialized to make this work, which is obviously not an option for performance reasons as the spec says (e.g. regarding servlet lifecycle and synchronized service methods) BTW, if only one servlet would be active at a time, your advice not to use instance/class variables would not be of any use, as under this assumption no concurrency issues while accessing those variables could occur. However it's valid. It should be quite easy to write a simple test jsp using a session and containing e.g. image links to a servlet that manipulates session content, each time called. Due to most browsers behaviour to request many images at the same time and Tomcats connector threads, I wouldn't bet on this, if you put this under load and log results... If you want to sync on your DB resource, you will have bottleneck problems with DB connections. The best solution is to use a DB connection pool which is more scalable. DB connections pools are a good idea (e.g. to avoid connection opening times that take a few hundred ms with most DBs, eventhough neglectable for others). Nevertheless depending on the kind of transactions done, setting an appropriate transaction isolation level is just as important as doing other syncs. If you just read from the DB you can stick to the default level, but e.g. for a booking reservation system, I wouldn't trust read-committed, when doing lookups, inserts, updates wildly mixed in one transaction. Could easily happen that someone else booked your trip then, eventhough you got the confirmation... ;-) Cheers, Michael ND -Original Message- From: Michael Echerer [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 11:52 AM To: Tomcat Users List Subject: Re: Single Thread is deprecated? Christian Stalp wrote: Hello out there, I want to build a servelt which access a database. To avoid race-conditions and to realize synchronous access, I decited to make a Singe Thread Servlet. But Eclipse told me that this is no longer a usable code. Usually the best solution is to synchronize just the part that accesses the single resource (the DB) instead of using single thread. In worst case you won't even achieve what you want using single thread mode because according to the servlet specification servlet containers are free to pool servlets, if it implements SingleThreadModel. Hence you could have multiple pooled instances that be no means guarantee an synchronized access to your database in case of simultaneous requests hitting different instances. So SingleThreadModel is deprecated for good reason, since servlet spec 2.4 and also for 2.5. You are better of synchronizing yourself. Don't rely on SingleThreadModel as an easy way to get around multithreading issues. In case you have different code parts accessing your DB or various clients, it might not even help to just sync one servlet. You might even have to set database transaction isolation level to fit your needs for your DB connections. Most DBs have read-committed by default, but it might be that you need isolation level up to synchronized. Depends on your use case... Cheers Michael So what can I do else? Thank you... Gruss Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED
RE: Problems with Mod JK (Apache 2.052 and Tomcat 5.5.9)
Well, the log msg is complaining about not able to find the worker. Apparently your tomcat wasn't configured for listening to ajp13 request from httpd. A connector entry for ajp13 should be added to server.xml file. At least it was not listed in your email. !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / ND -Original Message- From: Luka Andrejasic [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 9:24 PM To: Tomcat Users List Subject: Re: Problems with Mod JK (Apache 2.052 and Tomcat 5.5.9) I remember workers.properties is located in apache/conf/, the same directory with httpd.conf.. The file workers.properties is located under Tomcat`s conf directory, not Apache`s. In workers.properties I only have the following and that should be enough : worker.list=ajp13w worker.ajp13w.port=8009 worker.ajp13w.host=localhost worker.ajp13w.type=ajp13 worker.ajp13w.cachesize=10 worker.ajp13w.cache_timeout=1200 worker.ajp13w.socket_timeout=3600 Any other idea what else it might be? Thanks for the reply and trying to help. Luka - Original Message - From: blueberry lake [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, November 30, 2005 3:06 AM Subject: Re: Problems with Mod JK (Apache 2.052 and Tomcat 5.5.9) Since I am a new user of mod_jk, please correct me if I am wrong. In your apache httpd.conf, you set: JkWorkersFile /var/tomcat/conf/workers.properties I remember workers.properties is located in apache/conf/, the same directory with httpd.conf.. And, do you indicate the location of tomcat in workers.properties, such as workers.tomcat_home=/.../tomcat/? -b On 11/29/05, Luka Andrejasic [EMAIL PROTECTED] wrote: Hello guys, I am trying to figure this one out for weeks. Nothing seems to work and I am running out of ideas. The problem seems to be with Mod JK, as Apache and Tomcat work without problems on their own. Below are all the main configuration files, as well as the error log (at the bottom) : // System Configuration : - OS : RedHat Linux ES 4.0 (2.6.9-22.0.1) - Apache : 2.0.52 - Tomcat : 5.5.9 - MySQL : 4.1.12 - Mod JK : 1.2.15 // Mod JK Installation : tar -xzf jakarta-tomcat-connectors-jk-1.2.15-src.tar.gz cd jakarta-tomcat-connectors-jk-1.2.15-src cd jk cd native ./buildconf.sh ./configure --enable-EAPI --with-apxs=/usr/sbin/apxs make make install cp ./apache-2.0/mod_jk.so /etc/httpd/modules // Apache Virtual Domains : NameVirtualHost *:80 VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/tomcat/webapps/ROOT ServerName domain.com ServerAlias server.domain.com ErrorLog /home/virtual/domain.com/logs/error_log CustomLog /home/virtual/domain.com/logs/access_log combined IfModule mod_jk.c Options Indexes FollowSymLinks DirectoryIndex index.jsp index.html index.htm Location /META-INF/* AllowOverride None deny from all /Location Location /WEB-INF/* AllowOverride None deny from all /Location JkWorkersFile /var/tomcat/conf/workers.properties JkShmFile /var/tomcat/conf/shm.file JkLogFile /var/tomcat/logs/mod_jk.txt JkLogLevel info JkAutoAlias /var/tomcat/webapps/ROOT JkMount /backup/* ajp13w JkMount /config/* ajp13w JkMount /files/* ajp13w JkMount /logs/* ajp13w JkMount /servlet/* ajp13w JkMount /sql/* ajp13w JkMount /temp/* ajp13w JkMount /*.jsp ajp13w /IfModule /VirtualHost // File server.xml : Server className=org.apache.catalina.core.StandardServer debug=0 port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className= org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ Listener className= org.apache.catalina.storeconfig.StoreConfigLifecycleListener debug=0/ GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml/ /GlobalNamingResources Service className=org.apache.catalina.core.StandardService debug=0 name=Catalina Connector acceptCount=128 className=org.apache.coyote.tomcat5.CoyoteConnector connectionTimeout=2 debug=0 enableLookups=false minProcessors=32 maxProcessors=384 port=8009 protocolHandlerClassName= org.apache.jk.server.JkCoyoteHandler protocol=AJP/1.3
RE: Problems with Mod JK (Apache 2.052 and Tomcat 5.5.9)
I see. It still looks like a connector configuration problem. It seems that your connector config was using an older format, not the one for 5.5. For instance, the acceptCount and className shouldn't be part of the AJP connector setting. You may want to try the one I posted or configure one according to http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html ND -Original Message- From: Luka Andrejasic [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 30, 2005 11:37 AM To: Tomcat Users List Subject: Re: Problems with Mod JK (Apache 2.052 and Tomcat 5.5.9) Thanks for the assistance Nick. I think the connector is alreary defined in the current configuration. Perhaps you overlooked that line : Connector acceptCount=128 className=org.apache.coyote.tomcat5.CoyoteConnector connectionTimeout=2 debug=0 enableLookups=false minProcessors=32 maxProcessors=384 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler protocol=AJP/1.3 redirectPort=8443 useURIValidationHack=false/ Should I delete this one and try yours? The same error occured when they were placed side by side (yours on top). Thanks for helping. Luka - Original Message - From: Duan, Nick [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, November 30, 2005 3:58 PM Subject: RE: Problems with Mod JK (Apache 2.052 and Tomcat 5.5.9) Well, the log msg is complaining about not able to find the worker. Apparently your tomcat wasn't configured for listening to ajp13 request from httpd. A connector entry for ajp13 should be added to server.xml file. At least it was not listed in your email. !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / ND -Original Message- From: Luka Andrejasic [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 9:24 PM To: Tomcat Users List Subject: Re: Problems with Mod JK (Apache 2.052 and Tomcat 5.5.9) I remember workers.properties is located in apache/conf/, the same directory with httpd.conf.. The file workers.properties is located under Tomcat`s conf directory, not Apache`s. In workers.properties I only have the following and that should be enough : worker.list=ajp13w worker.ajp13w.port=8009 worker.ajp13w.host=localhost worker.ajp13w.type=ajp13 worker.ajp13w.cachesize=10 worker.ajp13w.cache_timeout=1200 worker.ajp13w.socket_timeout=3600 Any other idea what else it might be? Thanks for the reply and trying to help. Luka - Original Message - From: blueberry lake [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, November 30, 2005 3:06 AM Subject: Re: Problems with Mod JK (Apache 2.052 and Tomcat 5.5.9) Since I am a new user of mod_jk, please correct me if I am wrong. In your apache httpd.conf, you set: JkWorkersFile /var/tomcat/conf/workers.properties I remember workers.properties is located in apache/conf/, the same directory with httpd.conf.. And, do you indicate the location of tomcat in workers.properties, such as workers.tomcat_home=/.../tomcat/? -b On 11/29/05, Luka Andrejasic [EMAIL PROTECTED] wrote: Hello guys, I am trying to figure this one out for weeks. Nothing seems to work and I am running out of ideas. The problem seems to be with Mod JK, as Apache and Tomcat work without problems on their own. Below are all the main configuration files, as well as the error log (at the bottom) : // System Configuration : - OS : RedHat Linux ES 4.0 (2.6.9-22.0.1) - Apache : 2.0.52 - Tomcat : 5.5.9 - MySQL : 4.1.12 - Mod JK : 1.2.15 // Mod JK Installation : tar -xzf jakarta-tomcat-connectors-jk-1.2.15-src.tar.gz cd jakarta-tomcat-connectors-jk-1.2.15-src cd jk cd native ./buildconf.sh ./configure --enable-EAPI --with-apxs=/usr/sbin/apxs make make install cp ./apache-2.0/mod_jk.so /etc/httpd/modules // Apache Virtual Domains : NameVirtualHost *:80 VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/tomcat/webapps/ROOT ServerName domain.com ServerAlias server.domain.com ErrorLog /home/virtual/domain.com/logs/error_log CustomLog /home/virtual/domain.com/logs/access_log combined IfModule mod_jk.c Options Indexes FollowSymLinks DirectoryIndex index.jsp index.html index.htm Location /META-INF/* AllowOverride None deny from all /Location Location /WEB-INF/* AllowOverride None deny from all /Location JkWorkersFile /var/tomcat/conf/workers.properties JkShmFile /var/tomcat/conf/shm.file JkLogFile /var/tomcat/logs/mod_jk.txt JkLogLevel info JkAutoAlias /var/tomcat/webapps/ROOT JkMount /backup/* ajp13w JkMount /config
RE: Certificate Revocation Lists in Tomcat 5.5
Tomcat currently doesn't support cert validation against CRL. You may want to use Apache's mod_ssl to do the CRL checking. You will have to use mod_jk to connect Apache web server with tomcat. SSL is very computational intensive. Use Apache's httpd to do the SSL work is more efficient than to use Java-based tomcat. ND -Original Message- From: Kennedy Roberts [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 10:55 AM To: users@tomcat.apache.org Subject: Certificate Revocation Lists in Tomcat 5.5 Hi all, We've recently migrated our (SSL enabled) web application from SunOne to Tomcat 5.5, and I can't find any information on handling Certificate Revocation Lists in Tomcat. In SunOne, there was a function in the administration console that let you import a CRL. Is there any equivalent in Tomcat, or perhaps some other command line equivalent? Thanks for your help. -Kennedy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sharing session across http and https connections
You can't do this if both sites are on different machines since tomcat user ID (defined as a cookie by default), is tied to an url. If both sites are on different machines, you may have to use url-rewritting for session tracking instead of using the default cookies. ND -Original Message- From: Chris Birch [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 11:57 AM To: Tomcat Users List Subject: Sharing session across http and https connections Hi, I'm sure this has been solved and documented already but I can't find any information, if anyone can help me or point me in the right direction, I'd be very grateful. I have an Apache-mod_jk-Tomcat installation. I'm running two sites on Apache for the same domain but one is HTTP and the other is HTTPS. I'd like to be able to share a java user session across both the HTTP and HTTPS requests from a single user but a separate session is created for the secure and unsecure connection. Does anyone know how to have a single session for a user regardless of whether they are connecting to the application via the secure or unsecure route? Many Thanks, Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Certificate Revocation Lists in Tomcat 5.5
That's indeed good news. I'd really like to know the result and appreciate any details. Tomcat 5.5 supposed to run on JDK 1.5. Why was it compiled with JDK 1.4? ND -Original Message- From: Kennedy Roberts [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 3:24 PM To: Tomcat Users List Subject: Re: Certificate Revocation Lists in Tomcat 5.5 Martin, I have yet to try what you suggested, but if this is the case, I am grateful for your advice. I had already got our web application up and running on stand alone Tomcat (5.5.12) when I ran into this issue. Realizing this, I was thinking that I would have to scrap my work and start over figuring out how to run our web app with Tomcat integrated with Apache HTTP server. That option seems more labor intensive, as configuration of Tomcat was a breeze (even using SSL). Two questions (for anyone): 1) Is there any reason why running our web app under Tomcat is not as good as running it under Tomcat/Apache HTTP server integrated? 2) With the solution proposed below, is it possible to point to more than one CRL file? We multiple from multiple agencies, and previously just imported them one at a time into SunOne. Thanks again for your help -Kennedy - Original Message - From: Martin Dubuc [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, November 29, 2005 3:11 PM Subject: RE: Certificate Revocation Lists in Tomcat 5.5 CRL support is present in Tomcat 5.5.12. I am not an expert on Tomcat CRL support but what I know is the following: - You will need to recompile some of the tomcat-util.jar classes with JDK 1.5 because Tomcat 5.5.12 was compiled with JDK 1.4. The classes to be recompiled are: org.apache.tomcat.util.net.jsse.JSSE15Factory and org.apache.tomcat.util.net.jsse.JSSE15SocketFactory classes. - The crlFile property needs to be added inside your SSL Connector in the server.xml file. The value is the location of the CRL file on your system. Regards, Martin --- Duan, Nick [EMAIL PROTECTED] wrote: Tomcat currently doesn't support cert validation against CRL. You may want to use Apache's mod_ssl to do the CRL checking. You will have to use mod_jk to connect Apache web server with tomcat. SSL is very computational intensive. Use Apache's httpd to do the SSL work is more efficient than to use Java-based tomcat. ND -Original Message- From: Kennedy Roberts [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 10:55 AM To: users@tomcat.apache.org Subject: Certificate Revocation Lists in Tomcat 5.5 Hi all, We've recently migrated our (SSL enabled) web application from SunOne to Tomcat 5.5, and I can't find any information on handling Certificate Revocation Lists in Tomcat. In SunOne, there was a function in the administration console that let you import a CRL. Is there any equivalent in Tomcat, or perhaps some other command line equivalent? Thanks for your help. -Kennedy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Certificate Revocation Lists in Tomcat 5.5
The official tomcat 5.5.12 was compiled and packaged with J2SE5.0, not JDK 1.4. You'll get an error message if you run tomcat on 1.4. ND -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 4:46 PM To: Tomcat Users List Subject: Re: Certificate Revocation Lists in Tomcat 5.5 Caldarale, Charles R wrote: From: Duan, Nick [mailto:[EMAIL PROTECTED] Subject: RE: Certificate Revocation Lists in Tomcat 5.5 Tomcat 5.5 supposed to run on JDK 1.5. Why was it compiled with JDK 1.4? Because it's supposed to run on JRE 1.4 as well. Compiling on 1.5 would have precluded that. Not necessarily. But it would create complications to maintain 1.4 compatibility where there is 1.5 specific code. The 1.5 code is skipped if 1.4 is used to build. I'm a bit suspicious of the statement that certain classes had to be recompiled with 1.5; I suspect there's something more subtle than that going on. Nope, it is that simple. There was a discussion about this on the dev list recently. However, I would be wary of only compiling the extra classes. To be on the safe side, I would re-build the lot with 1.5. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: heap size problems (speed) [2]
1024 K is still relatively small compare to a heap size of 512M. The fact is that Duron is really the low-end of AMD processor family. It shouldn't be used for any serious computing purpose. I'd like to suggest doing the test at least on an Athlon. Hardware is really cheap nowadays. ND -Original Message- From: Cristian [mailto:[EMAIL PROTECTED] Sent: Monday, November 28, 2005 1:27 PM To: Tomcat Users List Subject: Re: heap size problems (speed) [2] - Original Message - From: Duan, Nick [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, November 28, 2005 7:30 PM Subject: RE: heap size problems (speed) [2] Were you using the right JVM? There were two JDK download for LINUX on Sun's web site. I have downloaded : J2SE(TM) Development Kit 5.0 Update 5 Linux self extracting file (although I think I should have get the rpm). I've extrated it in a separate directory and set JAVA_HOME in tomcat to point to that dir. Does it make any difference other than the fact that this way it is not rpm compliant? The main problem may be your AMD Duron processor which has a very small cache size (I believe it's about 512K). Once the processor cache reaches its limit, increasing the JVM heap size won't be very effective. This is even worse for my AMD Duron cache size : 64 KB but on the other machine I have : cache size : 1024 KB and still get the same results. Cristian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where should I store my static content in a clustered environment
A simple solution would be to have all static pages hosted on an Apache httpd server in front of tomcat clusters. If you need more performance, just cluster the httpds. Tomcat is not really designed to server static pages. Apache httpd can also serve as a LB. In this case, certainly you have to treat static pages separately from dynamic webapps. In other words, you can't bundle static pages with your war files. ND -Original Message- From: Eickvonder Bjoern [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 23, 2005 4:23 AM To: users@tomcat.apache.org Subject: Where should I store my static content in a clustered environment Hi, lets start with describing my current task where I would appreciate any advice from you. I have to construct a clustered system (with lots of webservers) that has few dynamic pages but a lot of static ones, whereby all resources have to be protected by security-constraints of a webapp (so letting Apache deliver this content won't work). Moreover there should be the possibility to upload/delete static components via a web form. My main problem is now where should I store the static data (mainly html pages, images, ...; but over 4 GB(!) large in total)? As far as now I'm considering the following solutions: 1.) Storing the content within the webapp of each webserver. This would include that the servers know each other as the upload/delete operations must be propagated from one server to all the others. Moreover the update of the dynamic parts would not be as easy any more as just uploading a new war-file as this requires deleting the old webapp directory (that contains the content is this case as well). 2.) Storing the content in a separate directory but still on each webserver. This would still include that servers must know each other, but updating the dynamic part would be easier. The downside is that I would have to write a servlet that delivers all static content with all the problems of mime-types, character encoding and so on which I would have to handle myself. 3.) Storing the content in a database on a separate server. The advantage would be that webservers only need to know their database server and updating the webapps would be easy (just uploading new war-files). The downside here is that I need a servlet too and I think it's maybe not the fastest solution as all requests of all servers to each single chuck of static content would require a connection to the database server. 4.) As 3.) but storing data on a single separate server in the filesystem. The advantages/disadvantages should be similar to 3.) whereby I do not know which solution might be faster. 5.) As 3.)/4.) but additionally implementing a caching-mechanism on the webservers. This means if a webserver gets a request for a specific page for the first time he connects the database server to retrieve that page, then stores it in its webapp directory and then let tomcat deliver that page. On the second request it is just checked if that page is already there and if so it is delivered directly. Of course I must implement some mechanism such that the webservers get to know if their cached data is outdated but so far this seems to me the best solution. Anyone ever faced this kind of problem? Any kind of remark to my possible solutions or any other possibilities you might know of are appreciated. Thanks you in advance for your help. Bjoern - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Calling EJBs
I don't know the JBoss mailing list. But it should available at http://www.jboss.org BTW, the approach I suggested was not just JBoss specific, but a generic solution applicable to all J2EE apps. ND -Original Message- From: Milan Tomic [mailto:[EMAIL PROTECTED] Sent: Monday, November 21, 2005 11:17 AM To: 'Tomcat Users List' Subject: RE: Calling EJBs Nick (and others), Do you know which mailing list is for JBoss? Thank you, Milan -Original Message- From: Duan, Nick [mailto:[EMAIL PROTECTED] Sent: Monday, November 21, 2005 4:49 PM To: Tomcat Users List Subject: RE: Calling EJBs 1. If you access an EJB app from another server, your EJB client, in this case JSP, has to use remote component interface to access your EJB, not local interface. Make sure your EJB publishes remote interfaces. 2. You need to have JBoss generate the EJB client stub classes, or in J2EE's term, the application client container classes, and include them in your webapps lib dir. 3. Make sure that your JNDI names of your EJB are configured correctly and accessible from tomcat. ND -Original Message- From: Milan Tomic [mailto:[EMAIL PROTECTED] Sent: Sunday, November 20, 2005 8:37 AM To: users@tomcat.apache.org Subject: Calling EJBs Hi, I have developed my first EJB and deployed it into JBoss. When I try to call my EJB from JSP page stored in Tomcat I gen an compiler error saying that it can't find my EJB's interfaces. I have copied my EJB JAR into all Tomcat's lib folders, but the error is still present. :) What should I do? Thank you in advance, Milan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Grabbing JNDIRealm Authentication Roles
I think the standard way for including role in your programming logic (e.g. if user is of role manager, dispatch the manager.jsp; if user is an employee, dispatch the employee.jsp, etc), is to use the isUserInRole method of HttpServletRequest. This solution doesn't depend on which realm you are using in your server. ND -Original Message- From: PHIL CAVAZOS [mailto:[EMAIL PROTECTED] Sent: Friday, November 18, 2005 3:54 PM To: users@tomcat.apache.org Subject: Grabbing JNDIRealm Authentication Roles Does anyone know how to grab user roles from the JNDIRealm authentication classes once a user logs in to a servlet context? I'm attempting to dynamically present content based on the user roles the user authenticates with. Another way to put my question is if there is a way to grab the LDAP authentication instance and make use of it to read the user roles without having to create a new LDAP instance? Thanks, Phil Confidentiality Notice: The information contained in this email and any attachments may be legally privileged and confidential. If you are not an intended recipient, you are hereby notified that any dissemination, distribution, or copying of this email is strictly prohibited. If you have received this email in error, please notify the sender and permanently delete the email and any attachments immediately. You should not retain, copy, or use this email or any attachment for any purpose; nor disclose all or any part of the contents to any other person. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session not sticky in 5.5 with load balancer
Thanks for everyone's response! Finally I figured out that the problem was caused by naming inconsistency between workers.properties and the jvmRoute value in server.xml. The jvmRoute under the engine tag in server.xml has to be defined with the same name as the worker name for the same tomcat instance. BTW, in the latest version of mod_jk, the property name balanced_workers has been changed to balance_workers. ND -Original Message- From: John Moore [mailto:[EMAIL PROTECTED] Sent: Thursday, November 17, 2005 4:35 PM To: Tomcat Users List Subject: RE: Session not sticky in 5.5 with load balancer Nick, I think you want to use balanced_workers not balance_workers. Here's a snippit from our workers.properties. worker.list=lbcon # ww1 worker.ww1.port=8009 worker.ww1.host=192.168.X.Y worker.ww1.type=ajp13 worker.ww1.lbfactor=1 worker.ww1.cachesize=20 worker.ww1.local_worker=0 # ww2 worker.ww2.port=8009 worker.ww2.host=192.168.X.Z worker.ww2.type=ajp13 worker.ww2.lbfactor=1 worker.ww2.cachesize=20 worker.ww2.local_worker=1 worker.lbcon.type=lb worker.lbcon.sticky_session=1 worker.lbcon.balanced_workers=ww1,ww2 worker.lbcon.local_worker_only=0 John -Original Message- From: Duan, Nick [mailto:[EMAIL PROTECTED] Sent: Thursday, November 17, 2005 11:02 AM To: tomcat-user@jakarta.apache.org Subject: Session not sticky in 5.5 with load balancer I am running an Apache httpd server as the load balancer with two tomcat instances. All servers are on the same windows XP machine. The load balancing works fine, but I am not able to make user sessions sticky with either one of the tomcat instances. The test was done using is the session example application bundled with the tomcat distribution. Configuration: Windows XP Professional Edition Apache httpd 2.0.55 Mod_jk 1.2.15 Tomcat version 5.5 workers.properties file: # Define some properties #workers.apache_log=C:\ApacheHttpd\Apache2\logs\workers #workers.tomcat_home=C:\devel\tomcat-5.5.12 #workers.java_home=C:\jdk1.5.0_03 ps=/ # Define 4 workers, 3 real workers using ajp12, ajp13, jni, the last one being a loadbalancing worker worker.list=loadbalancer # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8010 worker.worker1.lbfactor=1 #worker.worker2.cachesize=10 #worker.worker2.cache_timeout=600 #worker.worker2.socket_keepalive=1 #worker.worker2.socket_timeout=60 # Set properties for worker2 (ajp13) worker.worker2.type=ajp13 worker.worker2.host=localhost worker.worker2.port=8009 worker.worker2.lbfactor=1 # Set properties for lb which use worker1 and worker2 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=worker1,worker2 worker.loadbalancer.sticky_session=1 Any comment/info/suggestion will be greatly appreciated! ND - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: robust Failover, mod_jk
Apparently mod_jk does support several load balancing algorithms other than round-robin. You may want to set the method property of load balancer to Request or Traffic. See instructions on worker properties for details. http://tomcat.apache.org/connectors-doc/config/workers.html I think this will solve your problem. I am curious to know the results. If you need more sophisticated solutions, go with a hardware load balancer such as Cisco or BigIP. ND -Original Message- From: Mott Leroy [mailto:[EMAIL PROTECTED] Sent: Thursday, November 17, 2005 2:41 PM To: Tomcat Users List Subject: robust Failover, mod_jk I was wondering if I could get some advice on better failover for my current setup. I'm using mod_jk 1.2.14 with Tomcat 5.0.28. One issue that we occassionally run across is that an instance of tomcat will become unresponsive (due to out of memory errors for example) but mod_jk will still route requests to it. I realize the longer term solution here is to fix applications which cause tomcat problems (out of memory errors especially), but the reality is, these things happen, and don't cause a failover. Does anyone have any suggestions on how to handle situations like this? - Mott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]