RE: Can someone recommend a hardware device to Load Balance Tomc at
We use Foundry ServerIron to LB apache servers but it could also be used for Tomcat. I assume you want a HW based solution so you can get more options to distribute load than what the mod_jk's provide. If not, we've used mod_jk to balance multiple apache servers to multiple tomcat instances for a long time and am very happy. The changes to mod_jk to ease taking a server off-line comes very close to the concept of unbinding a server that you get with the foundry equipment. John Moore -Original Message- From: Asif Chowdhary [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:37 PM To: [EMAIL PROTECTED] Subject: Can someone recommend a hardware device to Load Balance Tomcat Hi, I would like to put an apache server which forwards the requests to LoadBalancer which then distributes the load to various instances of Tomcat. I am looking for a hardware device which will do that? Any recommendations. Asif Chowdhary System Analyst x.eye incorporated Phone: (905) 624-6608 ext. 280 mailto:[EMAIL PROTECTED] www.xeye.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing objects with any servlets, where the object is already pre-created
Anson, What about loading them up with an MBean and retrieving via the servlet? I've done this with JBoss/Tomcat, never with standalone tomcat though. Or, you populating the objects when the application starts and put the object it into the JNDI tree? John Moore On Tue, 2003-10-07 at 03:42, zeallousbigpond.net.au wrote: Hi guys! Is it possible to create a bunch of objects, put them aside, and Servlets can just access them any time without recreating those objects or having to pass them around?? say, Vector s = a very large vector of Strings that will appear in many servlets, but now I don't want to have to create them in each servlet, I want to have them pre-created somewhere, and servlets will go grab them when they need that Vector of Strings. Thanks! Anson - 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]
dbcp and maxWait
Is there any trick to getting the maxWait to work. Am using TC 4.1.24LE, RH 9 (2.4.20-9), JVM 1.4.1_02, DBCP 1.0 and Pool 1.0.1 connecting to a sybase sqlanywhere database. Even though I have max wait set to 5 seconds it still doesn't timeout for over three minutes. I checked out the source and started to follow it through got lost along the way. TIA, John Moore Resource name=webdemo scope=Shareable type=javax.sql.DataSource/ ResourceParams name=webdemo parameternameremoveAbandoned/namevaluetrue/value/parameter parameternamelogAbandoned/namevaluetrue/value/parameter parameternametestOnBorrow/namevaluetrue/value/parameter parameternamevalidationQuery/namevalueselect count(0) from agency_tbl/value/parameter parameternametestWhileIdle/namevaluetrue/value/parameter parameternametimeBetweenEvectionRunsMillis/namevalue6/value/p arameter parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name valuex/value /parameter parameter nameurl/name valuejdbc:sybase:Tds:[host]:[port]/[db]/value /parameter parameter namedriverClassName/name valuecom.sybase.jdbc2.jdbc.SybDataSource/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuexxx/value /parameter /ResourceParams
RE: Database connection No suitable driver?
We also put jdbc2_0-stdext.jar in the common/lib directy. -Original Message- From: Terje Hopsø [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2003 2:54 PM To: 'Tomcat Users List' Subject: Database connection No suitable driver? Hello, I have to ask you once again. I have tried to get a connection to my Sybaseserver. I get no suitable driver when trying to connect. Do anyone have a suggestion on what is wrong. Sybase driver file jconn2.jar is placed under $CATALINA/common/lib. It is a long mail but I hope anyone will look at it. - Terje org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: No suitable driver at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) . I have an example that is working: ... %@ page language=java % %@ page import=java.lang.* % %@ page import=java.util.* % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % body sql:setDataSource var=ex scope=application driver=com.sybase.jdbc2.jdbc.SybDriver url=jdbc:sybase:Tds:x: user= password=pwdpwd / sql:query var=rader dataSource=${ex} select Initialer from Skytter /sql:query Liste :br c:forEach items=${rader.rows} var=rad c:out value=${rad.Initialer} /br /c:forEach /body /html - And one that is not working. . %@ page language=java % %@ page import=java.lang.* % %@ page import=java.util.* % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % body sql:setDataSource var=ex scope=application dataSource=javax.sql.DataSource / sql:query var=rader dataSource=${ex} select Initialer from Skytter /sql:query c:forEach items=${rader.rows} var=rad c:out value=${rad.Initialer} /br /c:forEach --- My web.xml is lik this. context-param param-name javax.sql.DataSource /param-name param-value jdbc:sybase:Tds:xx:,com.sybase.jdbc2.jdbc.SybDriver,,pwdpwd /param-value /context-param -- OR LIKE THIS resource-ref descriptionDB Connection/description res-ref-namejdbc/resDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -- server.xml Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=false debug=0 displayName=dbtest docBase=c:\usr\utvikl\dbtest mapperClass=org.apache.catalina.core.StandardContextMapper path=/dbtest privileged=false reloadable=true swallowOutput=false useNaming=false wrapperClass=org.apache.catalina.core.StandardWrapper Resource name=jdbc/resDB scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/resDB parameter namevalidationQuery/name value/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name valuepwdpwd/value /parameter parameter nameurl/name valuejdbc:sybase:Tds::/value /parameter parameter namedriverClassName/name valuecom.sybase.jdbc2.jdbc.SybDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name value/value /parameter /ResourceParams /Context --
RE: Database connection No suitable driver?
One other idea, we have the Resource and ResourceParams in the GlobalNamingResources and a ResourceLink in the application context. Using 4.1.24LE. We also had to put commons-dbcp and commons-pool into commons/lib, these are not included in LE. John -Original Message- From: Terje Hopsø [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2003 3:12 PM To: 'Tomcat Users List' Subject: RE: Database connection No suitable driver? It is there. Tomcat version is 4.1.24. - Terje -Original Message- From: John Moore [mailto:[EMAIL PROTECTED] Sent: 3. juni 2003 00:05 To: 'Tomcat Users List' Subject: RE: Database connection No suitable driver? We also put jdbc2_0-stdext.jar in the common/lib directy. -Original Message- From: Terje Hopsø [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2003 2:54 PM To: 'Tomcat Users List' Subject: Database connection No suitable driver? Hello, I have to ask you once again. I have tried to get a connection to my Sybaseserver. I get no suitable driver when trying to connect. Do anyone have a suggestion on what is wrong. Sybase driver file jconn2.jar is placed under $CATALINA/common/lib. It is a long mail but I hope anyone will look at it. - Terje org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: No suitable driver at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) . I have an example that is working: ... %@ page language=java % %@ page import=java.lang.* % %@ page import=java.util.* % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % body sql:setDataSource var=ex scope=application driver=com.sybase.jdbc2.jdbc.SybDriver url=jdbc:sybase:Tds:x: user= password=pwdpwd / sql:query var=rader dataSource=${ex} select Initialer from Skytter /sql:query Liste :br c:forEach items=${rader.rows} var=rad c:out value=${rad.Initialer} /br /c:forEach /body /html - And one that is not working. . %@ page language=java % %@ page import=java.lang.* % %@ page import=java.util.* % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % body sql:setDataSource var=ex scope=application dataSource=javax.sql.DataSource / sql:query var=rader dataSource=${ex} select Initialer from Skytter /sql:query c:forEach items=${rader.rows} var=rad c:out value=${rad.Initialer} /br /c:forEach --- My web.xml is lik this. context-param param-name javax.sql.DataSource /param-name param-value jdbc:sybase:Tds:xx:,com.sybase.jdbc2.jdbc.SybDriver,,pwdpwd /param-value /context-param -- OR LIKE THIS resource-ref descriptionDB Connection/description res-ref-namejdbc/resDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -- server.xml Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=false debug=0 displayName=dbtest docBase=c:\usr\utvikl\dbtest mapperClass=org.apache.catalina.core.StandardContextMapper path=/dbtest privileged=false reloadable=true swallowOutput=false useNaming=false wrapperClass=org.apache.catalina.core.StandardWrapper Resource name=jdbc/resDB scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/resDB parameter namevalidationQuery/name value/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name valuepwdpwd/value /parameter parameter nameurl/name valuejdbc:sybase:Tds::/value /parameter parameter namedriverClassName/name valuecom.sybase.jdbc2.jdbc.SybDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name value/value /parameter /ResourceParams /Context -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Copious Connectors Conundrum
Jeff, Am using mod_jk w/ kernel 2.4.9-34smp, apache 1.3.26 and jboss 2.4.6/Tomcat 4.0.3 (combined continer). Two servers both run apache and jboss/tomcat with balancing between them. It also has a h/w load balancer in front of apache. Live since March under low load (~20K/day) and very stable. Another site uses apache/mod_jk/tomcat on solaris for two years and have had some issues (posted issues last week on Ajp13 connections), could have been self-inflicted. It has about (~40K/day). John -Original Message- From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 4:59 PM To: [EMAIL PROTECTED] Subject: Copious Connectors Conundrum Hi! I'm bewildered by the array of connector options. I'm trying to hook up a cluster of Tomcat 4.0.4 instances (running in JBoss) behind Apache 1.3, all running on Linux. I'm looking for a stable, production-quality option. It would be really really helpful to me and probably everyone else trying to cluster Tomcat if someone could offer a brief overview of the history (why so many different projects?) and merits of each of these ways of connecting Apache to Tomcat: mod_jserv (this is deprecated, right?) mod_jk mod_jk2 mod_webapp mod_proxy (this is a simple proxy that doesn't offer clustering, right?) coyote (this is only for tomcat 4.1, right?) I've searched the archives extensively, but there doesn't seem to be any posts that explain why I should use one connector over another. BTW, are there supposed to be binaries available in http://jakarta.apache.org/builds/jakarta-tomcat-connectors? There is a nice hierarchy of directories, but no files :-( Of course I can build from source, but I'm lazy :) Thanks in advance, Jeff Schnitzer [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat 3.3.1 - Sessions Migrating Between Users
Milt, I posted earlier (9/12) about a problem that we ran into with Apache/Tomcat having one user login and get another user's data. Look for Killing Apache Processes Connected to Tomcat via mod_jk (Ajp13) for a little background. In the logs we found the error where USER1 called a jsp via POST that validated and redirected to a different servlet (GET). The parameters on the GET URL were not for the person that just logged in but USER2 who had logged in earlier and was still on the system performing other requests.To say the least my world was rocked (in a bad way). They are SSL connections through different ISP's so I'm throwing out caching proxies. The USER1 didn't have jsessionid attached to his URL on this POST (we have cookies=false and encodeURL everywhere but it still happened). So now we added a hard coded ;jsessionid= on the first page to ensure it's there. I hadn't put too much thought into session hijacking.Now I am just hope and pray that I don't get another incident. I have asked over and over and have never had anyone respond or appear to have a similar problem. We are on Apache 1.3.26 w/ ajp13 and TC 4.0.4 and had been killing off apache processes that get stuck in a 'W' state. John Moore Milt Epstein wrote: On Thu, 19 Sep 2002, Jason Koeninger wrote: I've been doing multi-threaded code for a long time, and while I'm not going to say there's no way I made a mistake, I am going to say that it's unlikely it's a threading issue. In this particular application, I do session management in a single servlet, and all I do is log the user on and place the user object in the session. I'll double-check it, but that's how it was originally written. Any other thoughts? I did say could be -- it is the most obvious thing that comes to mind. Similarly, it could be something wrong with those versions of Tomcat and/or mod_jk, but by the same token, if there were some such obvious/basic problem with it, you'd think it'd be pretty well known. But you might check the archives of this list to see if others have reported such problems with them. Is that the latest version of the 3.3 branch? If not, you could try to upgrade. In fact, if feasible, you might just upgrade to an entirely new version, and see if the problem persists. There's a 4.0 branch (up to 4.0.4) and a 4.1 (up to 4.1.11 already or soon). Both those versions implement the latest servlet/jsp specs (2.3/1.2) (3.2 and 3.3 implement 2.2/1.1). And the ajp12 protocol (I think that means version 1.2 of the AJP protocol) has been replaced by ajp13 (likewise, version 1.3 of the AJP protocol). On Thu, 19 Sep 2002 14:40:39 -0500 (CDT), Milt Epstein wrote: On Thu, 19 Sep 2002, Jason Koeninger wrote: Has anyone seen sessions move between users running Tomcat 3.3.1? I'm using Apache 1.3.26 connecting to Tomcat 3.3.1 with mod_jk using the ajp12 protocol, and it sounds from user reports as if sessions are moving between users. At first, I thought it had something to do with proxies caching the pages, but the last report I got rules out a proxy as the users were on totally independent networks. This could be a multi-threading issue -- i.e. some of your code may not be thread-safe. Milt Epstein Research Programmer Integration and Software Engineering (ISE) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Milt Epstein Research Programmer Integration and Software Engineering (ISE) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
HEAD request to JSP stuck in a 'W' state
How does a HEAD request get stuck in a 'W' state for over 2000 seconds. Running Sun Solaris 8, Apache 1.3.26, mod_jk (4.0.4), Tomcat 4.0.4, jvm 1.3.1_04-b2. This call is from the load balancer to confirm that the app is still available.Subsequent (and prior) requests were successfully handled and released. from /server-status Srv PID Acc M CPU SSReq Conn Child Slot Host VHost Request 2-0 899 0/1/1 W 0.07 2395 0 0.00.01 0.01 192.168.62.4 webstaff.pdsi-software.com HEAD /webstaff/login.jsp HTTP/1.0 Thanks, John Moore -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Killing Apache Processes Connected to Tomcat via mod_jk (Ajp13)
TC Users: I have a big production problem that I'm hoping someone in the group can address. Running Apache 1.3.26/mod_ssl with Tomcat 4.0.4 and mod_jk connector (4.0.4) on Sun Sparc servers. I have processes in apache which get stuck in a 'W' state for days while processing a servlet request through Tomcat.This is intermittent, although seem to be tied to database access over a WAN and availability (which I have zero control). These processes are killed with kill -3 pid. Now for the problem. We have had two reported occurrences in two days where one person logs in and gets a page back for someone else and one other a about month ago. I am trying to determine if killing the apache pids could leave the Tomcat Ajp socket open to return its content to the next person that connects.Besides having cache-control and pragma statements, all tranmission is via SSL upon hitting the login page so I'm betting against any external cache. If someone knows the ins and outs of the Ajp13 connector and tomcat who can address this I am eternally grateful. Trying to reproduce has been difficult and looking for any support before diving into the code. John Moore -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Read-Only Naming Cobtext
Is there a way to remove a Resource from a context once it's been added OTHER than stopping reloading the application. In 4.0.4 I think I actually have to reload TC not just the app. I want to be able to bind new resources and unbind old resources and want to do it without bringing down the server/application.Specifically, I have 41 DataSources and am frequently adding and removing references. i tried ctx.unbind( java:comp/env/jdbc/dsn ) but that threw javax.naming.NamingException: Context is read only. Thanks, john moore
Apache/Tomcat server-status Question
I have asked this question three times in the apache-users forum and not heard a response. I know this is a problem related more to Apache than Tomcat but I'm hoping someone who is running a similar configuration can help. I have a Sun Netra X1 Solaris 8 running Apache 1.3.22 w/ mod_ssl, mod_rewrite, mod_status, mod_jk with Tomcat 3.3. We are suddenly seeing processes that have long running R states (hours, days, ...) in server-status. If I do a server-status?notables I can see a reference to URL and IP but am not convinced this is the request that is hanging (the log files don't support what I'm seeing). The files see to be those that are not passed back to tomcat (ajp13, load balanced) for the web application such as .js, .gif and .jpg. None are zero length and they all have read permission. I also don't see anything via netstat that would indicate that there are other IP's connecting to a port but not sending anything across. from mod_jk.conf: JkMount /webstaff/*.jsp lbcon JkMount /webstaff/servlet/* lbcon Alias /webstaff /opt/jakarta-tomcat-3.3/webapps/webstaff Directory /opt/jakarta-tomcat-3.3/webapps/webstaff In looking at a custom logs w/ User-Agent, PID, IP and URL the problem references (if the logs are correct) seem to be 98 machines and usually customized (AOL, COX, MSN ) browsers. Am I alone in this problem? Could this in any way be hardware/os related? I have not seen this on another site we have that runs on Dell/RH 7.1 with Apache/Tomcat/JBoss, it has nowhere near the usage of the server that's encountering these issues. Help, my forehead is starting to hurt from banging it against the wall. John Moore
RE: Apache w/ mod_jk and Tomcat 3.2.1 not handling URL rewriting
It sounds like apache is not configured to hand .jsp or /servlet requests back to tomcat. From Tomcat 3.3 (sorry it's all I have around right now). If you mistakenly encoded your gif/.js references you will need to do a rewrite of the URL so apache can pass by it. I say it only because we did it once and having mod_rewrite enabled on Apache was a god-send! Make sure that you have the Include in your apache httpd.conf (e.g. Include /opt/jakarta-tomcat-3.3/conf/auto/mod_jk.conf ). { partial from mod_jk.conf for one application} JkMount /webstaff/*.jsp ajp13 JkMount /webstaff/servlet/* ajp13 Alias /webstaff /opt/jakarta-tomcat-3.3/webapps/webstaff Directory /opt/jakarta-tomcat-3.3/webapps/webstaff AllowOverride All Options Indexes FollowSymLinks Order allow,deny Allow from all /Directory Location /webstaff/WEB-INF AllowOverride None deny from all /Location Location /webstaff/META-INF AllowOverride None deny from all /Location John Moore -Original Message- From: Robert Wille [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 3:35 PM To: [EMAIL PROTECTED] Subject: Apache w/ mod_jk and Tomcat 3.2.1 not handling URL rewriting I have a standalone Tomcat 3.2.1 installation I am trying to make work through Apache with mod_jk and ajp13. Rewritten URL's (ones with ;jsessionid= in them) give me a 404 error. Even when the browser has cookies enabled, there is still a problem with the second request. Tomcat doesn't know whether the browser will accept cookies, so it sets the cookie and rewrites the URL and I get the error. Any help would be greatly appreciated
Apache/Tomcat/mod_jk growing TIME_WAIT counts
First, I am running an Apache 1.3.22 with Tomcat 3.3 using shared mod_jk, mod_ssl and mod_rewrite on a Sun Netra X1 Solaris 8, JDK 1.3.1_02 with os and jvm recommended patches applied. I notice that I have a growing number of processes that are left in a w state according to server-status. I check using netstat and see that there are sockets hanging out in a TIME_WAIT state. These will hang out for who knows how long but I have some that are days old (when apache was last restarted). Is this a bad-client issue, configuration of apache issue, apache-tomcat-session issue or something else I'm not considering. I'm guessing it may be an Apache issue but since I monitor this forum and see lots of expertise on combined containers I thought I'd start here. Any advise or direction is greatly appreciated. John Moore
Cookie Spec Tomcat 3.2.3
A new vendor were evaluating to processes XML through our site (Telephony support via XML) now claims (indirectly) that Tomcat 3.2.3 has incorrectly implemented the specification for Cookies, more specifically in the use of the Path attribute. The container is throwning an exception when they call back to us with a cookie named Path, which is of-couse illegal. All we create is a Session object which in turn creates the Cookie with JSESSION and its associated attributes. After reading the IETF RFC2109 (two or three times) it also seems clear to me that the Path attribute is permitted to have quotes around it (Section 5.1 Examples uses them ) and that Tomcat is doing it right. They claim that browsers don't necessarily enforce the spec and that's why the browsers works against the rest of the site but the XML traffic from their site doesn't. I think this is a load of crap especially since everything broke after they updated their software and the app subsequently stopped working. I saw bug #231 related to a fix in 3.3 but related to high volume which we're not and the bug (#231) could not be reproduced. Will have my team try TC 3.3 on Moday but I don't think anything is going to change. So to the question, is there a governing body that has newer, more complete definition of the Cookie specification that I should have read, is Bug #231 really related to our problem, or is it time for a heart-to-heart with these guys. Thanks, John Moore
Apache Style Logging
Fellow Tomcat'ers, Is there a way to configure Tomcat 3.X or 4.X to produce a log file like that of Apache? I want to use a standalone Tomcat container but need to get usage stats out for WebTrends (date, time, url, rc, size, etc) . I currently use Apache 1.3.22 - mod_jk - tomat 3.2.3 but can easily move to TC 4 if that helps. I couldn't find anything in the logger docs. Thanks, John Moore
RE: ;jsessionid not working
You should be using the url encoding to get the session id. Also I'm pretty sure that the ;jsessionid needs to come before the ?. John -Original Message- From: Sylvain Hamel [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04, 2002 9:34 AM To: tomcat-user Subject: ;jsessionid not working OS : win98 TOMCAT : 3.2.3 I cant seem to use a path sessionid for a non-cookie enable browser. here is an example url that get sent to tomcat http://sylvain:9090/wap/menunewtask.jsp?;jsessionid=2w84ctnex1 the sessionid is obtained like this : %= session.getId() % In order to debug this I added the following lines to the header.jsp file that all my pages include : //--- Date dateHeader = new Date(); System.out.println(dateHeader.toString() + SessionID : + session.getId()); //- A call to menunewtask will result in a new session id. What am I doing wrong??? Sylvain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: ;jsessionid not working
you are trying to get to something that looks like http://host/app/myfile.jsp;jsessionid=x19293921?lhs=rhs. The response object has a encodeURL( String url ) operation that returns a formatted url with the jsessionid added if cookie support is turned off. -Original Message- From: Sylvain Hamel [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04, 2002 9:41 AM To: Tomcat Users List Subject: Re: ;jsessionid not working a short example would be appreciated... - Original Message - From: John Moore [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, January 04, 2002 12:40 PM Subject: RE: ;jsessionid not working You should be using the url encoding to get the session id. Also I'm pretty sure that the ;jsessionid needs to come before the ?. John -Original Message- From: Sylvain Hamel [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04, 2002 9:34 AM To: tomcat-user Subject: ;jsessionid not working OS : win98 TOMCAT : 3.2.3 I cant seem to use a path sessionid for a non-cookie enable browser. here is an example url that get sent to tomcat http://sylvain:9090/wap/menunewtask.jsp?;jsessionid=2w84ctnex1 the sessionid is obtained like this : %= session.getId() % In order to debug this I added the following lines to the header.jsp file that all my pages include : //--- Date dateHeader = new Date(); System.out.println(dateHeader.toString() + SessionID : + session.getId()); //- A call to menunewtask will result in a new session id. What am I doing wrong??? Sylvain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Resource References for DataSources
I have configured the sybase jdbc 2.0 driver to work with tomcat as a resource. Unfortunately, there is no true pooling (min, max, timeout) feature and I need to wrap it with a real pooler. The JBoss pooler works in other servlet containers but I can't figure out how to get it to work here. I have tried various combinations of DataSources, parameter names and values to no avail. I either get null or throw a tyrex exception (when type != javax.sql.DataSource). The JBossPooler impelements DataSource, Referenceable and ObjectFactory so I though I would be able to just plug it in. I saw one posting where a person loaded and registered the connections in their own servlet but that seems to defeat the purpose. server.xml !-- works but doesn't support min/max -- Resource name=jdbc/test auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/test parameter namedriverClassName/name valuecom.sybase.jdbc2.jdbc.SybDataSource/value /parameter parameter namedriverName/name valuejdbc:sybase:Tds:192.168.0.15:1498/telestaff/value /parameter parameter nameuser/name valuedba/value /parameter parameter namepassword/name valuesql/value /parameter /ResourceParams !-- doesn't work (returns null on lookup) -- Resource name=jdbc/webdemo auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/webdemo parameter namedriverClassName/name valueorg.jboss.pool.jdbc.JDBCPoolDataSource/value /parameter parameter namepoolName/name valuejdbc/webdemo/value /parameter parameter nameJDBCURL/name valuejdbc:sybase:Tds:192.168.1.11:1498/telestaff/value /parameter parameter nameJDBCUser/name valuedba/value /parameter parameter nameJDBCPassword/name valuesql/value /parameter parameter nameminSize/name value1/value /parameter parameter namemaxSize/name value2/value /parameter /ResourceParams web.xml resource-ref res-ref-namejdbc/test/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref resource-ref res-ref-namejdbc/webdemo/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I do a ctx.lookup I see a ResourceRef but when I to a ctx.lookup I get a null. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]