JSP Code to capture HTTP headers

2006-07-31 Thread Kaushal Shriyan
Hi ALL I have a sample php code, ENV $value) { echo "Key: $key, value: $value"; echo ""; } ?> SERVER $value) { echo "Key: $key, value: $value"; echo ""; } ?> COOKIE $value) { echo "Key: $key, value: $value"; echo ""; } ?> GLOBALS $value) { echo "Key

Re: Password retries

2006-07-31 Thread Simon O'Malley
Hi Chris, Maurice Thanks for the replies. Was hoping someone would have already done something as I am under a pretty tight deadline. Dont think the denyhosts route will be a goer as hosts.deny will only be writeable as root and dont want to have to run tomcat as root, change permissions, or st

Re: Tomcat and OCSP

2006-07-31 Thread Velpi
Does the new support for OCSP in Java 5.0 have any impact on how certificates are handled in Tomcat? http://java.sun.com/j2se/1.5.0/docs/guide/security/pki-tiger.html It looks like it might just work if it is set up right in the java property files. I checked the mailing list archives and foun

Re: [Tomcat] Looking ofr JSESSIONID in Tomcat

2006-07-31 Thread gaston . azerty
Thanks a lot, Christopher, for your answer, but I am looking for a solution the most generalizable possible. Does it exist an interface or a Mbean in Tomcat responsible for managing the session (and so my cookie JSESSIONID)? Thomas PS: I am currently looking for a Tomcat's test where the develo

答复: An exception, would anybody tell m e the reason?

2006-07-31 Thread Zhang, Peng
Thank u, it seems I misunderstood the meaning of thread dump. The thread dump was created when the tomcat hang, could you find any clue of the reason? Best Regards - pzhang 张鹏 Server Dept. Telenav Shanghai Inc. Tel:(21)6337 2220 www.telenav.com

Re: JSP Code to capture HTTP headers

2006-07-31 Thread Shinya Koizumi
use these methods <%= request.getParameter() %> <%= request.getParameterNames() %> or you look up javax.serlvet.HttpServletRequest - Original Message - From: "Kaushal Shriyan" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Monday, July 31, 2006 12:10 AM Subject: JSP Code to ca

[ANN] LambdaProbe 1.6 is released

2006-07-31 Thread Vlad.Ilyschenko
I am pleased to announce availability of LambdaProbe 1.6 a monitoring tool for Apache Tomcat and JBoss. The new release amongst other things include all-new web based sql console for testing of datasources, which I hope you will find useful. For the full list of changes visit http://www.lambdapr

RE: programmatically sending tomcat a socket?

2006-07-31 Thread Peter Crowther
> From: Adam Fisk [mailto:[EMAIL PROTECTED] > I'm embedding Tomcat, and I'd like to have programmatically > send it a socket > I've created (could be a reliable UDP socket subclass, some > other special > "socket"), and have Tomcat handle it as if it were a normal socket, > expecting incoming HT

Weird Issue with Tomcat 4.1.31

2006-07-31 Thread Kaushal Shriyan
Hi when i hit http://localhost:8080/ I get on the web pasge HTTP Status 404 - / type Status report message / description The requested resource (/) is not available. Apache Tomcat/4.1.24

Re: Response time banding

2006-07-31 Thread Kurt Overberg
Do your 2 second requests happen at a particular time of day? In the early morning, when my database vacuum is running, my response times shoot way up (to around 5 seconds). Check to see what else is going on with your system during the times the page response times increase. /kurt On Ju

RE: Tomcat and Sun's Application server

2006-07-31 Thread Jon Hoffman
The thing is, I already have the EJB working and a number of different apps already connect and use them. I would also like to be able to use them through my servlets running in a tomcat cluster (then I could move most of my stuff to tomcat), but I really do not have the time to rewrite everything

Re: JSP Code to capture HTTP headers

2006-07-31 Thread Kaushal Shriyan
On 7/31/06, Shinya Koizumi <[EMAIL PROTECTED]> wrote: use these methods <%= request.getParameter() %> <%= request.getParameterNames() %> or you look up javax.serlvet.HttpServletRequest - Original Message - From: "Kaushal Shriyan" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent:

Re: servlet and HTTP authentication

2006-07-31 Thread Kristian Rink
Hey there; and, at first, thanks a lot for the hint. [EMAIL PROTECTED] schrieb: > WWW-Authenticate: Basic realm="My Document Management System" > > I'm not sure if tomcat will interpret the resulting "Authorization" header > in the next request, given that you asked him not to authenticate, b

RE: Tomcat and Sun's Application server

2006-07-31 Thread Jon Hoffman
I tried removing javax.servlet from the j2ee.jar (that was my "I have tried "cutting" out portions of the j2ee.jar that interferes with the servlet.class" portion of the last e-mail) but that did not work. I will probably end up having to scrap tomcat :O( since I do not have time to rewrite all o

Re: Weird Issue with Tomcat 4.1.31

2006-07-31 Thread Kaushal Shriyan
On 7/31/06, Kaushal Shriyan <[EMAIL PROTECTED]> wrote: Hi when i hit http://localhost:8080/ I get on the web pasge HTTP Status 404 - / type Status report message / description The requested resource (/) is not available. Apache Tomc

[OT] A question on garbage collecting

2006-07-31 Thread Leon Rosenberg
Hi, I have a question regarding a weird behaviour of the garbage collector, maybe someone here, has more experience with it, and can answer the question. Otherwise sorry for the OT. We have a cache for caching 1000.000 user objects along with many (some hundred thousand) not existing objects (ne

Re: JSP Code to capture HTTP headers

2006-07-31 Thread Velpi
http://shib.kuleuven.be/download/sp/test_scripts/shibenv.jsp.txt -- Velpi Kaushal Shriyan wrote: Hi ALL I have a sample php code, ENV $value) { echo "Key: $key, value: $value"; echo ""; } ?> SERVER $value) { echo "Key: $key, value: $value"; echo ""; } ?> COOKIE $v

Re: JSP Code to capture HTTP headers [includes shameless plug]

2006-07-31 Thread Christopher Schultz
Kaushal, > I have a sample php code, [snip] > I wanted this to work in JSP(Java Server Pages) How about the SessionSnooper.jsp from this page: http://www.christopherschultz.net/projects/java/ I am the author. -chris signature.asc Description: OpenPGP digital signature

Re: 答复: An exception, would anybody te ll me the reason?

2006-07-31 Thread Christopher Schultz
Peng, > Thank u, it seems I misunderstood the meaning of thread dump. > The thread dump was created when the tomcat hang, could you find any clue of > the reason? What you gave was was called a "stack trace". Stack traces are generated when exceptions are thrown but not caught (they are caught b

DNS

2006-07-31 Thread Juba
Hello, How do I configure my dns to point to the server where my application is installed in Tomcat? thanks Juba - Mensagem verificada pelo software de Anti-Virus McAfee. FAMERP - STI --

Can GlobalNamingResources be accessed without a ResourceLink

2006-07-31 Thread David Uctaa
I am running Tomcat 5.5.16, and I have a couple of DataSources set up in the GobalNamingResources section of my server.xml. Now, I preferably want to be able to access these resources without having to set up a separate section for each application, so I can deploy new applications that access t

Re: Tomcat and Sun's Application server

2006-07-31 Thread Christopher Schultz
Jon, > The thing is, I already have the EJB working and a number of different > apps already connect and use them. I would also like to be able to use > them through my servlets running in a tomcat cluster (then I could move > most of my stuff to tomcat), but I really do not have the time to > re

Re: Weird Issue with Tomcat 4.1.31

2006-07-31 Thread Christopher Schultz
Kaushal, > Thanks ALL > > I fixed this issue on my own :-) Please post the analysis and solution, in case someone else has this problem. -chris signature.asc Description: OpenPGP digital signature

Re: Can GlobalNamingResources be accessed without a ResourceLink

2006-07-31 Thread Hassan Schroeder
On 7/31/06, David Uctaa <[EMAIL PROTECTED]> wrote: I am running Tomcat 5.5.16, and I have a couple of DataSources set up in the GobalNamingResources section of my server.xml. Now, I preferably want to be able to access these resources without having to set up a separate section for each applica

Re: DNS [OT]

2006-07-31 Thread Edmund Urbani
Juba wrote: > Hello, > > How do I configure my dns to point to the server where my application is > installed in Tomcat? > > thanks > > Juba > That depends on your DNS server and its config files/administration tools. That's about all I can tell you, since I don't know what DNS software you are

RE: Tomcat and Sun's Application server

2006-07-31 Thread Jon Hoffman
Thanks for the reply but I already have the EJBs running in Sun's Application server. I also already have a number of applications (both web based and swing) that access those EJBs, I do not want to change all those other applications to access something else. I also only want one version of the

Re: [OT] DNS

2006-07-31 Thread Christopher Schultz
Juba, > How do I configure my dns to point to the server where my application is > installed in Tomcat? That depends. What operating system are you running on the machine that you want to modify? ...and do you have a DNS server running on your Tomcat server? DNS configuration on UNIX is usually

Re: Tomcat and Sun's Application server

2006-07-31 Thread Christopher Schultz
Jon, > What I need is a way to acces the EJB that are running in the Suns > Application Server container from servlets running on a Tomcat > Cluster. Thanks again for the reply I think that's what they're talking about. Instead of using j2ee.jar itself (which contains more stuff than necessary -

Re: Can GlobalNamingResources be accessed without a ResourceLink

2006-07-31 Thread David Uctaa
Worked like a charm. I never claimed to be an expert. Or even to know what the hell I was doing :) Thanks much! On 7/31/06, Hassan Schroeder <[EMAIL PROTECTED]> wrote: On 7/31/06, David Uctaa <[EMAIL PROTECTED]> wrote: > I am running Tomcat 5.5.16, and I have a couple of DataSources set up i

mod_jk not compiling correctly (apparently) - 'garbled' error

2006-07-31 Thread Tim Hunt
Hi, I can't get mod_jk to work - getting 'garbled' error suggesting it's not compiled against same version of apache? Here's the specifics: Got fresh install of CentOS 4.3 Installed Apache 2.2.2 with # ./configure --enable-rewrite=shared --enable-deflate=shared --enable-alias

Re: Tomcat 5.5.17 can connect to any webserver without mod_jk ?is this true?

2006-07-31 Thread David Smith
In that context, yes. Basically you are setting up a reverse proxy from your Apache/IIS front-end to tomcat. In that event, each connector in tomcat dedicated to a specific Apache/IIS front-end will need the proxyName and proxyPort attributes so it can correctly generate URL links. As for th

Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Markus
Hi, I've got the following problem on one server using Apache 2.0.54-5 (Debian x86) with mod_jk 1.2.15 (self-compiled) and tomcat 5.5.17: I try to create a redirect to a page with a session-id if there is no session. Seems to be easy, but in combination with apache/mod_jk my servlet redirects unli

RE: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Markus
Markus wrote on Monday, July 31, 2006 5:34 PM: > I've got the following problem on one server using Apache 2.0.54-5 (Debian > x86) with mod_jk 1.2.15 (self-compiled) and tomcat 5.5.17: I try to > create a redirect to a page with a session-id if there is no session. > Seems to be easy, but in combin

Re: Tomcat Upgrade

2006-07-31 Thread Ibrahim . Siddiqui
Andrew, Our application is currently employed Tomcat 4.0.6. I'd like this to be upgraded to version 4.1.12. Is there documentation which explains a step by step process of how to do this? Thanks, Ibrahim Andrew Miehs <[EMAIL PROTECTED]> 07/28/2006 09:59 AM Please respond to "Tomcat U

Re: Missing Request Parameters

2006-07-31 Thread rache
This is how the code redirects: if (redirectURL.toUpperCase().startsWith("/SERVLET")) { // routing to another request to the servlet... response.sendRedirect(request.getContextPath() + redirectURL); }

Initializing Parameter

2006-07-31 Thread Ryan O'Hara
Is there a way to initialize an array (or any other Java object, for that matter), so that it is available to all users? I would like to execute some Java methods to precompute and store two arrays to avoid creating them every visit for every user. I read something about param-name and pa

Re: Tomcat Upgrade

2006-07-31 Thread Leon Rosenberg
On 7/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Andrew, Our application is currently employed Tomcat 4.0.6. I'd like this to be upgraded to version 4.1.12. Is there documentation which explains a step by step process of how to do this? ok, step by step: download and install (unp

Servlet/session becoming null

2006-07-31 Thread rache
I have this error occuring when loading a jsp: 2006-07-28 17:33:01 StandardWrapperValve[debugjsp]: Servlet.service() for servlet debugjsp threw exception java.lang.NullPointerException at com.premier.ofa.core.TransactionSession.getAttribute(TransactionSession.java:34) at com.premi

Re: mod_jk not compiling correctly (apparently) - 'garbled' error

2006-07-31 Thread Christopher Schultz
Tim, > I can't get mod_jk to work - getting 'garbled' error suggesting it's > not compiled against same version of apache? Here's the specifics: [snip] > Installed Apache 2.2.2 with > # ./configure --enable-rewrite=shared --enable-deflate=shared \ > --enable-alias=shared --e

Re: Tomcat Upgrade

2006-07-31 Thread Ibrahim . Siddiqui
Andrew, Our website is developed using Vignette Content Management components. These comprise of VCMS and VMCM. We need to upgrade these two versions and due to matrix compatibility issues, we are forced to upgrade Tomcat to 4.1.12. In this upgrade, we don't want to do a parallel installa

Re: Tomcat Upgrade

2006-07-31 Thread Andrew Miehs
Hi Ibrahim, What do you mean you don't want to do a parallel installation?! How do you want to check if it works?! Install TC 5.5 and java 1.4+compat libs or JVM 1.5 on the test machine, copy the stuff across, and start it and see what happens. You do have a test system? don't you?! Worried..

Re: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Christopher Schultz
Markus, >> I try to create a redirect to a page with a session-id if there is >> no session. Seems to be easy, but in combination with apache/mod_jk >> my servlet redirects unlimited because it doesn't recognizes the >> created session. >> >> Btw: Cookies are disabled, this is important. It look

Tomcat does not sense the source modifications!!!

2006-07-31 Thread Ach
Hi all, I have a really bad problem with tomcat 5.5.x. I deploy an app (developed in Eclipse 3.1.2 using tomcat sysdeo plugin) to tomcat. Now I have a index.jsp that is just a: OK? Now it works but I change above line to something like: I remove login.jsp, stop tomcat, deploy this, sta

Re: Initializing Parameter

2006-07-31 Thread Christopher Schultz
Ryan, > Is there a way to initialize an array (or any other Java object, for > that matter), so that it is available to all users? I would like to > execute some Java methods to precompute and store two arrays to avoid > creating them every visit for every user. I read something about > param-na

Re: Missing Request Parameters

2006-07-31 Thread Jon Wingfield
Erm. ok. Where does the redirectURL variable come from? Unless it has parameters encoded into it that will be your problem. Also, be a bit wary in using the RequestDumperValve with non-ascii charset data as it can corrupt some parameters: http://marc.theaimsgroup.com/?l=tomcat-user&m=112530311

Re: Tomcat does not sense the source modifications!!!

2006-07-31 Thread Pulkit Singhal
You could remove the war while tomcat is running and then redeploy it On 7/31/06, Ach <[EMAIL PROTECTED]> wrote: Hi all, I have a really bad problem with tomcat 5.5.x. I deploy an app (developed in Eclipse 3.1.2 using tomcat sysdeo plugin) to tomcat. Now I have a index.jsp that is just a: O

RE: Problem while submiting the page

2006-07-31 Thread Propes, Barry L
you've got two different action values but using the same elements to get it there. Don't think you can do that! Probably need to set some conditional in there to make document.formMain.action = '../..' + actionPath + '/' + link + '?uniqeId='+uniqeId + '&ref=' + refName; one time and documen

RE: Tomcat running as service on XP? Runtime.getRuntime().exec(commandLine)

2006-07-31 Thread Propes, Barry L
you'll need to set Tomcat to run as a service under a username that has Admin rights to the XP box. That should work. I'm doing something similar but with Win2k. -Original Message- From: Warren [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 4:17 PM To: users@tomcat.apache.org Subj

Re: Tomcat does not sense the source modifications!!!

2006-07-31 Thread Ach
Thanks, But I do not have a war yet. I just deploy it by eclipse's sysdeo tomcat plugin and a context file. Any suggestion? -- View this message in context: http://www.nabble.com/Tomcat-does-not-sense-the-source-modifications%21%21%21-tf2028692.html#a5580046 Sent from the Tomcat - User forum at

Re: Missing Request Parameters

2006-07-31 Thread rache
Parameters are either set this way: 1. from the page itself: 2. from building xmls which are then integrated into the page itself which a user can click on for links: href="../servlet/tpservlet?transactiontype=sessionProfileActionBean&ACTIVITY_

Re: mod_jk not compiling correctly (apparently) - 'garbled' error

2006-07-31 Thread Tim Hunt
THANKS Chris, here are some answers/clarifications: >> Installed Apache 2.2.2 with >> # ./configure --enable-rewrite=shared --enable-deflate=shared \ >> --enable-alias=shared --enable-cache=shared \ >> --enable-dbd=shared --enable-disk-cache=shared \ >>

Re: Tomcat Upgrade

2006-07-31 Thread David Smith
For what it's worth, I don't think the changes between 4.0.x and 4.1.x are all that significant -- same servlet spec, same deployment as I remember. I wouldn't be a bit surprised if the point difference in releases had more to do with internal restructuring than anything else. Start with a re

Re: mod_jk not compiling correctly (apparently) - 'garbled' error

2006-07-31 Thread Christopher Schultz
Tim, > Perhaps you're right about the multiple copies of Apache - that's what > has been the problem when others got the same error. However, it doesn't > look like another copy is there. Perhaps make output above suggests > just a problem with building mod_jk? I'm using Apache 2.0.58 and mod_j

RE: Tomcat Upgrade

2006-07-31 Thread Propes, Barry L
I can tell you one thing: 4.0 uses the HTTP connector, 4.1 uses the Coyote connector. At least the flavor of 4.1 I have. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 12:51 PM To: Tomcat Users List Subject: Re: Tomcat Upgrade For what it's wo

Re: Initializing Parameter

2006-07-31 Thread Ryan O'Hara
You're looking for . You can add these parameters to any filter or servlet, or at the top-level for the entire webapp, and get them when the filter or servlet runs (or any time you can get an instance of the ServletContext which represents the webapp). The usual way of doing this is to create a Se

Alternative to error 404 during redeploiement?

2006-07-31 Thread Henri Dupre
To monitor tomcat I current have a script in a crontab that checks an URL every 5 minutes. This works quite well except during the redeploiement... Tomcat throws an error 404 but the detailed message says that the application is not available. Would there be a way to throw a different error code d

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Hi there: I am using tomcat 5.5.17 and SQL Server 2000 database with SQL Server 2005 JDBC Driver. OS is Windows XP professional. I have configured web.xml in WEB-INF directory and context.xml in META-INF directory of my application. Both are attached below with this email. I have a login.jsp p

Re: Initializing Parameter

2006-07-31 Thread David Smith
ServletContextListener is a new feature of servlet spec 2.4 (tomcat 5.0.x, 5.5.x). The essential parts are: 1. write a class implementing the javax.servlet.ServletContextListener interface. The interface itself requires two methods -- contextInitialized() [see below] and contextDestroyed().

Re: Initializing Parameter

2006-07-31 Thread Christopher Schultz
Ryan, > Where would this code go that gets and sets the value, so that it > would only run once collectively for all users (not once per user)? It's right here: >> The usual way of doing this is to create a ServletContextListener >> which implements the init() method, grabs the values from the >

Re: Initializing Parameter

2006-07-31 Thread Christopher Schultz
David, > ServletContextListener is a new feature of servlet spec 2.4 (tomcat > 5.0.x, 5.5.x). Correction: this is available in servlet spec 2.3 (Tomcat 4.x). -chris signature.asc Description: OpenPGP digital signature

Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread David Smith
Is your SQL JDBC driver in common/lib? It has to be there for tomcat to set it up as a resource. Also drop the tag from your context definition. Not needed when the resource is defined inside the tag and may confuse tomcat. --David Aynalem, Seblewengel (Trawick) wrote: Hi there: I am

Re: Initializing Parameter

2006-07-31 Thread Ryan O'Hara
You are creating a ServletContextListener, which must be configured in the "listeners" section of your web.xml file: simply mention the ServletContextListener in there, and the contextInitialized() method will be called when the webapp is initialized (i.e. once for the life of the webapp). If

RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Yes I do have SQL JDBC driver in common/lib as sqljdbc.jar and did drop from context.xml file. Another error comes ups as follows: Jul 31, 2006 3:01:05 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in pr

Re: Servlet/session becoming null

2006-07-31 Thread Filip Hanik - Dev Lists
if you are saying the tomcat session is dropped then, two reasons could be: 1. the session cookie is dropped 2. the session has expired (been idle longer than your timeout setting) but your stack trace show TransactionSession, and it could be that your TransactionSession is holding a reference

Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread Filip Hanik - Dev Lists
looks like your context XML file is not a valid XML format Filip Aynalem, Seblewengel (Trawick) wrote: Yes I do have SQL JDBC driver in common/lib as sqljdbc.jar and did drop from context.xml file. Another error comes ups as follows: Jul 31, 2006 3:01:05 PM org.apache.catalina.core.AprLife

Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread David Smith
The stack traces mention that the tag is in web.xml (and apparently not well formed xml to boot). Please remove it. It should only be in context.xml with a tag in web.xml. If there are further stack traces, could you post your new context.xml and web.xml? --David Aynalem, Seblewengel (Tr

RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Hi Filip: I checked it... what is it missing? Many thanks your help. -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 3:12 PM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver

RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread Saha Rabindra N
You could open your context.xml file using IE browser and that will tell you the syntax problem, if any. -Original Message- From: Aynalem, Seblewengel (Trawick) [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 3:18 PM To: Tomcat Users List Subject: RE: org.apache.tomcat.dbcp.dbcp.S

RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Hi David: Thanks for your quick reply. I don't have tag in web.xml. Here is the updated context.xml, dropped from it and web.xml as it were before. context.xml file web.xml file http://java.sun.com/dtd/web-app_2_3.dtd";> ISOTrack

Re: Initializing Parameter

2006-07-31 Thread Ryan O'Hara
One more question: What is the best method for retrieving the values? Thanks again. -Ryan On Jul 31, 2006, at 2:47 PM, David Smith wrote: ServletContextListener is a new feature of servlet spec 2.4 (tomcat 5.0.x, 5.5.x). The essential parts are: 1. write a class implementing the java

RE: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Markus
Christopher Schultz wrote on Monday, July 31, 2006 6:42 PM: > Markus, > >>> I try to create a redirect to a page with a session-id if there is no >>> session. Seems to be easy, but in combination with apache/mod_jk my >>> servlet redirects unlimited because it doesn't recognizes the created >>> se

RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Thanks a lot... I do need to have a space in context.xml file. That solved the problem with xml syntax. I now seem to have problem with database connection. Here is the code I use to connect... InitialContext ic=null; DataSource ds=null; Connection conn = null; try { // testing

Re: Initializing Parameter

2006-07-31 Thread Christopher Schultz
Ryan, > One more question: What is the best method for retrieving the values? You only have one option: ServletContext.getInitParameter There are, however, some tools that can help you load data that is not String-based. Jakarta commons beanutils package (specifically the 'converters' portion)

Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread David Smith
Hmmm connection refused. Is your server listening for connections at jdbc:sqlserver://localhost:1433 ? Can you verify it independently? --David Aynalem, Seblewengel (Trawick) wrote: Thanks a lot... I do need to have a space in context.xml file. That solved the problem with xml synt

Re: Servlet/session becoming null

2006-07-31 Thread rache
Hi Filip or anyone, I got lost in this?: "but your stack trace show TransactionSession, and it could be that your TransactionSession is holding a reference to the Tomcat session, but the reference it is actually holding is a facade object, and the facade loses it connection to the delegate, he

Re: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Christopher Schultz
Markus, >> If the session is mandatory, I recommend changing: >> >> request.getSession(false) >> to >> request.getSession(true) > > Thanks for your quick answer. The problem I want to solve is only to create > a session if it is really needed, so #redirectToURLWithSID is a little bit > mo

RE: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Markus
Christopher Schultz wrote on Monday, July 31, 2006 9:54 PM: >>> If the session is mandatory, I recommend changing: >>> >>> request.getSession(false) >>> to >>> request.getSession(true) >> >> Thanks for your quick answer. The problem I want to solve is only to >> create a session if it is

RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Sorry to ask this... how do you verify server connection independently. This is my first time configuring doing database connection. Thanks a lot, -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 3:49 PM To: Tomcat Users List Subject: Re: org.apa

Re: Initializing Parameter

2006-07-31 Thread David Kerber
Where are you getting the parameter from? Is it going to change a lot? I store parameters in the server.xml in the section as entries, and then retrieve them with a call to this routine: public static String getEnvironmentVariable( String envVarName, String varDefault) { String

Re: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Christopher Schultz
Markus, If the session is mandatory, I recommend changing: request.getSession(false) to request.getSession(true) >>> Thanks for your quick answer. The problem I want to solve is only to >>> create a session if it is really needed, so #redirectToURLWithSID is a >>>

Re: Initializing Parameter

2006-07-31 Thread David Smith
Christopher Schultz wrote: Ryan, One more question: What is the best method for retrieving the values? You only have one option: ServletContext.getInitParameter There are, however, some tools that can help you load data that is not String-based. Jakarta commons beanutils package (s

Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-07-31 Thread David Smith
Well this is supposed to be an "SQL Server 2000" database server. Use it's client tool to connect to the database. If successful, your server is running. I'm not familiar with the product, but if you can find it in the preferences, make sure you connect via TCP just like tomcat would.

Re: Initializing Parameter

2006-07-31 Thread Ryan O'Hara
Thanks a lot, David. Ryan Christopher Schultz wrote: Not really. If the question is "how do I retrieve the stuff I put in servletcontext?", the answer is getServletContext().getAttribute ( attributeName ). Then just cast the result to the type it's supposed to be (String, Array, Hashtabl

configuring 2 servlets on different ports

2006-07-31 Thread Williams, Jim
can anybody tell me if it is possible to configure 2 servlets so that they are only available on separate ports within the same tomcat instance? I'm using tomcat 5.5, and tried creating 2 services, each with a connector that used a different port. Whatever I try for the context within these

Re: Initializing Parameter

2006-07-31 Thread Christopher Schultz
Ryan, >> Not really. If the question is "how do I retrieve the stuff I put in >> servletcontext?", the answer is getServletContext().getAttribute( >> attributeName ). > > Thanks a lot, David. Yeah, sorry. I misunderstood the question the first time :( So, your only option is to use ServletConte

mod_jk without worker.properties?

2006-07-31 Thread robert
So I have a rather nice dynamic configuration using mod perl stanzas the only thing standing in my way of making it 100% dynamic is the worker port for mod_jk. Why oh why must this be configured via a separate properties file? This

Re: configuring 2 servlets on different ports

2006-07-31 Thread Christopher Schultz
Jim, > I'm using tomcat 5.5, and tried creating 2 services, each with a > connector that used a different port. > > Whatever I try for the context within these services, it appears as > if both servlets are available on both ports. > > Is there a magic combination of Context elements that woul

Re: mod_jk without worker.properties?

2006-07-31 Thread Christopher Schultz
Robert, > So I have a rather nice dynamic configuration using mod perl stanzas > the > only thing standing in my way of making it 100% dynamic is the worker port for > mod_jk. > > Why oh why must this be configured via a separate properties file? The changelog for mod_jk says this under mod_jk

Filtering responses

2006-07-31 Thread todd runstein
I'm trying to set up a response filter, but am running into problems. My main page and some jsps render properly. Others don't return anything at all (I hate getting back plain white pages). Anyway, I'm not sure what makes some jsps work and others fail. I'm also not sure how to troubleshoot th

clustering problem

2006-07-31 Thread Sharma, Siddharth
Hi We have a 4 machine configuration. Each machine has: 1. 3 Tomcat instances (so total 12 instances) 2. 1 Apache with mod_jk (so total 4 Apaches) The Apaches/mod_jks are fronted by a hardware load balancer. Each mod_jk load balances across all 12 tomcats. In other words, you could hit any one of

Re: clustering problem

2006-07-31 Thread Rainer Jung
Have a look at our new version mod_jk 1.2.18, especially at the worker attribute "distance". This should be used in combination with an lb worker. It enables you to define preferences. If you want to route to different tomcats for probing, configure jvmRoute on the Tomcats (most likely you already

RE: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Markus
Christopher Schultz wrote on Monday, July 31, 2006 10:08 PM: > Markus, > > If the session is mandatory, I recommend changing: > > request.getSession(false) > to > request.getSession(true) Thanks for your quick answer. The problem I want to solve is only to cr

Re: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Christopher Schultz
Markus, >> Some part of your logic is missing: you do not have a case where it is >> known that you MUST create a session. Therefore, you never create a >> session. Your code tries and tries again (redirecting continuously) but >> never creates a session because you are not handling the case where

RE: clustering problem

2006-07-31 Thread Sharma, Siddharth
" This request will be routed to the worker with name/jvm_route "my_jvmroute". Is that what you were looking for?" Exactly what I needed. It works. Thanks Rainer -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 5:12 PM To: Tomcat Users List S

RE: Apache, mod_jk and Tomcat looses sessions

2006-07-31 Thread Markus Meissner
Christopher Schultz wrote on Monday, July 31, 2006 11:55 PM: >>> Some part of your logic is missing: you do not have a case where it >>> is known that you MUST create a session. Therefore, you never create >>> a session. Your code tries and tries again (redirecting continuously) >>> but never creat

mod_jk and Perl Sections?

2006-07-31 Thread robert
So am I correct in assuming that you cannot use Perl stanza's to configure mod_jk? I'm getting the following when I try command_rec for directive `JkOptions' not found! command_rec for directive `jkMount' not found! command_rec for directive `JkMount' not found! command_rec for directive `JKWorke

Re: mod_jk and Perl Sections?

2006-07-31 Thread robert
I want to be able to do this in order to dynamically specify the worker port push @JkWorkerProperty [qw(worker.myWorker.port $workerPort)]; Quoting [EMAIL PROTECTED]: > So am I correct in assuming that you cannot use Perl stanza's to configure > mod_jk? > > I'm getting the following when I try

Re: Tomcat 5.5.17 can connect to any webserver without mod_jk ?is this true?

2006-07-31 Thread Mark Thomas
Raju Balugu wrote: > Hi Mark ,I have a doubt on this again ,I got one more link stataing we can > use this feature by acting as the proxy.. > http://tomcat.apache.org/tomcat-5.5-doc/proxy-howto.html just have a look > and let me know ur idea. This isn't *any* web server as per your previous post i

MaxClients - MaxThreads relationship

2006-07-31 Thread Ramdas . Hegde
I am using Apache with mod_jk 1.2.10(prefork MPM) running against Tomcat 5 within JBoss on Linux using JDK 1.4.2.07 Reading thru some of the postings within this Forum, it looks like we would expect to see as many threads in tomcat as the number of MaxClients defined in Apache. In our setup, we ha

HTTPS connector and clientAuth=want: how to retrieve client cert in servlet?

2006-07-31 Thread Shankar Unni
I'm using Tomcat 5.5.17's HTTPS connector, with clientAuth set to "want". (Note: I don't want Tomcat to do the authentication itself - I simply want to pass the client cert to the servlet for its own use; I'm trying to set up an *optional* client-cert-based authentication setup that can fall b

  1   2   >