RE: I would like a new session each time I start my application

2007-06-04 Thread Bachler, Elisabeth \(Elisabeth\)
Hi, Thanks for your quick answer When I say each time I run my application, I mean each time I start my application. Let's say my application is : $TOMCAT_HOME/webapps/my_app/index.html Each time I execute: $TOMCAT_HOME/webapps/my_app/index.html, I would like a new sessionID to be

Strange MySQL-Behaviour with JDBC-Realm

2007-06-04 Thread Gregor Schneider
Hi guys, we're running Tomcta 5.5 and MySQL 5 (InnoDB), OS is Debian. Tomcat authentication is done via a JDBC-Realm. Every now and then FormAuthenticator is throwing the following Exception: 2007-06-04 01:41:02,762 ERROR localSearch.log [TP-Processor2]:Exception performing

Track down which app has memory leak.

2007-06-04 Thread Jacob Rhoden
Hi, In a tomcat instance (6.0.13) with multiple apps, how do can I easily track down which app has a memory leak. For example, can I just get a dump of all objects and grep the output (i relize there are a lot but I am not afraid of that!), or do I have to resort to installing and learning

RE: Strange MySQL-Behaviour with JDBC-Realm

2007-06-04 Thread David Short
Shouldn't your connection URL look something like this: jdbc:mysql//db:3306/apacheSSO instead of jdbc:mysql://db/apacheSSO? Not sure if this means anything, since you say it's already working... It just looks strange. -Original Message- From: Gregor Schneider [mailto:[EMAIL PROTECTED]

Re: Track down which app has memory leak.

2007-06-04 Thread David Delbecq
Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS En l'instant précis du 04/06/07 09:56, Jacob Rhoden s'exprimait en ces termes: Hi,

Re: Strange MySQL-Behaviour with JDBC-Realm

2007-06-04 Thread Gregor Schneider
Hi David, from http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html: [snipp]= If the hostname is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers.

RE: Strange MySQL-Behaviour with JDBC-Realm

2007-06-04 Thread David Short
You may want to try it with explicit values to see if that makes a difference. I know NetBeans (different subject) has a problem when the port number is specified and is other that 3306 (default). Just an idea. -Original Message- From: Gregor Schneider [mailto:[EMAIL PROTECTED] Sent:

Re: Strange MySQL-Behaviour with JDBC-Realm

2007-06-04 Thread Gregor Schneider
Hi David, will give that a try. If the exception persists, I'll go for autoreconnect, will report here. Cheers Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

Re: Strange MySQL-Behaviour with JDBC-Realm

2007-06-04 Thread David Smith
I don't think autoReconnect would help. It'd still throw the exception and then re-connect to the database so the code can retry. Unfortunately it doesn't just silently reconnect and perform the query. You have configured both testOnBorrow and a validation query, so the connection is

Re: I would like a new session each time I start my application

2007-06-04 Thread Johnny Kewl
Liz, please tell us what you actually doing and why you need this? I think there is a conceptual problem... - Original Message - From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, June 01, 2007 6:57 PM Subject: I would like a new session

Re: Track down which app has memory leak.

2007-06-04 Thread Jacob Rhoden
David Delbecq wrote: Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS Hi, Thanks for your reply however I cant find anything

Re: Track down which app has memory leak.

2007-06-04 Thread Foo Shyn
Hmm i'm not sure whether it can track memory leak or not, since i'm not a frequent user of it, but you can try JMeter from Apache: http://jakarta.apache.org/jmeter/ Its testing and monitoring module helps me a lot though... HTH FooShyn Jacob Rhoden wrote: David Delbecq wrote: Java comes

Strange Error Tomcat 6

2007-06-04 Thread Davide Manca
HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile

Re: Track down which app has memory leak.

2007-06-04 Thread David Delbecq
Add this (java 1.5) to your CATALINA_OPTS -agentlib:hprof=heap=dump From doc: This option causes the greatest amount of memory to be used because it stores details on every object allocated, it can also impact the application performance due to the data gathering (stack traces) on object

Re: Track down which app has memory leak.

2007-06-04 Thread David Delbecq
It tracks performances under workload, not memory leaks. To track and locate memory leak, you need profiling tools or be able to load/unload several time all modules separately. En l'instant précis du 04/06/07 11:49, Foo Shyn s'exprimait en ces termes: Hmm i'm not sure whether it can track

Programmatic set up for logging

2007-06-04 Thread Corobitsyn Roman
Hello list, Does anybody know how to set up programmatic logging? Result of this tunning must be identical with logging.properties? Thank - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL

Re: tomcat temp directory

2007-06-04 Thread Chris Pat
Hi Martin, David Thanks. Where/syntax to set the tmpdir? Below is the syntax I use and when run from local host it puts the files in the root tomcat directory, at the same level as the all the subdirectories. Even outside the webapp directory. However it is accessible. When I switch to

Re: Track down which app has memory leak.

2007-06-04 Thread Foo Shyn
IC, Thanx for clearing that out :) FooShyn David Delbecq wrote: It tracks performances under workload, not memory leaks. To track and locate memory leak, you need profiling tools or be able to load/unload several time all modules separately. En l'instant précis du 04/06/07 11:49, Foo Shyn

RE: I would like a new session each time I start my application

2007-06-04 Thread Bachler, Elisabeth \(Elisabeth\)
The thing is that my application access a database. When the user wants to modify the db, I lock the access to this particular action (and let the user only view the data) using the sessionID. Now, if the user is bad... He can log on once and get the modify action... Then he can open a new screen

Re: tomcat temp directory

2007-06-04 Thread Chris Pat
Hi Further I see in catalina.bat where it is setup and all the defaults are unchanged. This still does not explain why it is NOT putting the files in \temp and rather in just the root dir of the TC installation. I could explicitly force it, however that doesnt seem right. Chris Pat [EMAIL

How to customize the context paths for several web application.

2007-06-04 Thread Guofeng Zhang
Hi, We have four web applications that deployed on Tomcat 6.0 at the same time. Some special customers want to use special context paths to access them, so I think the easiest way is to use context.xml to define the context paths. I do not know how to do it? Can you kindly give me a

Re: Strange Error Tomcat 6

2007-06-04 Thread David Smith
${sbean.totProgrammi0} This expression should be ${sbean.totProgrammi gt 0} or ${sbean.totProgrammi gt; 0} as the '' character is probably messing up the parsing. --David Davide Manca wrote: HTTP Status 500 -

jsp-output in wrong frames

2007-06-04 Thread Norbert Hirneisen
Hello list, We are using Apache Tomcat/5.5.17 with jvm 1.5.0_07-b03 on Linux Kernel 2.6.19.2-monolithic (suse) together with Apache2 using the httpd2-worker configuration. Tomcat is given 512-1024 MB Ram by java with permGemMem of 256 MB. The application is a struts-app using frames

Re: jsp-output in wrong frames

2007-06-04 Thread David Delbecq
En l'instant précis du 04/06/07 13:32, Norbert Hirneisen s'exprimait en ces termes: Hello list, We are using Apache Tomcat/5.5.17 with jvm 1.5.0_07-b03 on Linux Kernel 2.6.19.2-monolithic (suse) together with Apache2 using the httpd2-worker configuration. Tomcat is given 512-1024 MB Ram by

Re: I would like a new session each time I start my application

2007-06-04 Thread Johnny Kewl
Cant say I do understand... Session ID's are almost untouchables... they used by too many things, authentication, SSO, load balancing, and I'm worried that when the user does something as simple as a right click and opens a new page, the app breaks. I'm not sure what you saying but I would

Re: tomcat temp directory

2007-06-04 Thread David Smith
In the code below, let's just ignore the logic for the string 'tempdir' ... looks like noise to me as it isn't used in the creation of a file. The call to create the temp file looks good and should store it in the path specified by java.io.tmpdir. You can write out the system property to see

Re: I would like a new session each time I start my application

2007-06-04 Thread David Smith
As an alternative, you could incorporate one time tokens. Generate on every page request, stored in both session and request parameters and compare on every submission. If they go out of sync (ie and old one shows up) you know they spawned a new window. In that case the old window should be

Re: jsp-output in wrong frames

2007-06-04 Thread Johnny Kewl
Is there a struts mailing list? I think this is a coding issue, just wondering if there is a place someone can post a struts program so that people can see the errors in the code. Struts guys will be able to tell you where connections are not been returned to the dB pool, and why page

RE: I would like a new session each time I start my application

2007-06-04 Thread Bachler, Elisabeth \(Elisabeth\)
Thanks for your response Are you saying that everytime the index.html is executed, I should generate a random number and send it to the other files. Then compare it with the one I have in the stack ? Elisabeth -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent:

Re: tomcat temp directory

2007-06-04 Thread Chris Pat
Hi David Thanks for further engaging this with me. Yes, I am creating the file in an Action, dropping it in the tmpdir and reading it with a jsp that calls a servlet that reads the parameters and displays. What I find odd is everything works perfectly when executed from localhost:8080...

AW: jsp-output in wrong frames

2007-06-04 Thread Norbert Hirneisen
David, thanks for your response. I will check the app regarding session scope objects. Regards, Norbert -Ursprüngliche Nachricht- Von: David Delbecq [mailto:[EMAIL PROTECTED] Gesendet: Montag, 4. Juni 2007 13:43 An: Tomcat Users List Betreff: Re: jsp-output in wrong frames En

RE: I would like a new session each time I start my application

2007-06-04 Thread kempo bob
Elisabeth, 1) To see what the context tag looks like, see the server-example.xml file that ships with the Tomcat distribution. You're probably running under a minimal configuration that lets most items default. 2) That being said, I don't think its going to fix your problem to turn off session

RE: I would like a new session each time I start my application

2007-06-04 Thread Bachler, Elisabeth \(Elisabeth\)
Thank you so much! -Original Message- From: kempo bob [mailto:[EMAIL PROTECTED] Sent: lunes, 04 de junio de 2007 16:40 To: users@tomcat.apache.org Subject: RE: I would like a new session each time I start my application Elisabeth, 1) To see what the context tag looks like, see the

RE: tomcat temp directory

2007-06-04 Thread Tim Lucia
I'm not sure what the impact of Tomcat is on this, but I've used syntax similar to this: try { File tf = File.createTempFile(pattern, .suffix); tf.deleteOnExit(); BufferedWriter out = new BufferedWriter(new FileWriter(tf)); out.write(This temporary file is deleted on close);

RE: I would like a new session each time I start my application

2007-06-04 Thread Tim Lucia
I do not have any idea *why* you want to do this, but you can use session.invalidate() to guarantee the next request will have a new session ID. http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html#in validate() Tim -Original Message- From: Bachler, Elisabeth

RE: tomcat temp directory

2007-06-04 Thread Caldarale, Charles R
From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: Re: tomcat temp directory Or is there a better way to create a tmpdir and random file under the webapp. Look at section 4.7.1 of the servlet spec: A temporary storage directory is required for each servlet context. Servlet containers

RE: tomcat temp directory

2007-06-04 Thread Chris Pat
Hi Chuck Thanks. But how to I get at it programatically? Is workDir an actual context param that I can access and build a File from? Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: Re: tomcat temp directory Or is there a better way to

RE: tomcat temp directory

2007-06-04 Thread Caldarale, Charles R
From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE: tomcat temp directory But how to I get at it programatically? Is workDir an actual context param that I can access and build a File from? It's not a param, it's an attribute - read the servlet spec and the servlet API doc. Use the

Trying to get Tomcat to run as a service..

2007-06-04 Thread Wilson Lam
Hello all I am trying to get my war file using Tomcat 5.5.17 running as a daemon. Currently, my /etc/init.d/tomcat file looks like this --- #!/bin/sh # # Startup script for the Jakarta Tomcat Java Servlets and JSP server # # chkconfig: - 85

RE: tomcat temp directory

2007-06-04 Thread Chris Pat
Hi Chuck Great. However may I ask the naive question? How do I get the servletContext within a method, within an Action. Do I have to pass in the request, and dig it out from there? tia. Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE:

RE: tomcat temp directory

2007-06-04 Thread Caldarale, Charles R
From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE: tomcat temp directory How do I get the servletContext within a method, within an Action. Assuming your code is part of a servlet, use the GenericServlet.getServletContext() method. If the servlet is hidden by some framework, you'll

Re: comet read event

2007-06-04 Thread Peter Warren
Hi Filip, Somehow I missed your response a while back. Below are two test clients and one comet servlet. One client works, and the other doesn't. I found out the failing client doesn't work because HttpURLConnection doesn't seem to allow writing to the output stream after the input stream has

Re: comet read event

2007-06-04 Thread Filip Hanik - Dev Lists
I doubt it works properly with the HttpUrlConnection, its better if you use a socket connection, as you have no idea how the underlying implementation works in HttpUrlConnection Filip Peter Warren wrote: Hi Filip, Somehow I missed your response a while back. Below are two test clients and

Re: Tomcat Hogging CPU

2007-06-04 Thread Omar Eljumaily
John, I'm using 5.5.17. I'm actually not using it right now for the 15,000 visits per day site, though. I just develop these things and usually kick my clients off my server when their bandwidth gets too high. I remember lots of problems with 5.0 including race conditions like you've

Tomcat 6 and AjaxAnywhere

2007-06-04 Thread jvosloo
I have an JSF Appfuse based app which uses AjaxAnywhere to perform search functions on certain JSPs. This worked fine in Tomcat 5.5, but since upgrading to version 6, my form fields seems to be no longer submitted and I get the following warning in the Tomcat log: 2007/06/04 08:36:36

Jasper crashes with nullpointerexception

2007-06-04 Thread kempo bob
Very often, when precompiling JSP's that have custom tags in them with jasper2, the compiler will just crash with a nullpointerexception. I end up spending a lot of time trying to figure out what I've done wrong, because the compiler doesn't give any useful information. The mistakes are usually

Re: Tomcat 6 and AjaxAnywhere

2007-06-04 Thread jvosloo
I realized that the problem is actually being caused by the MyFaces upgrade I did from version 1.1.4 to 1.1.5 - it had nothing to do with Tomcat 6. The reason I suspected Tomcat 6 was that Tomcat 6 now logs warning about parameters, which Tomcat 5.5. didn't do. jvosloo wrote: I have an JSF

RE: tomcat temp directory

2007-06-04 Thread Caldarale, Charles R
From: Chris Pat [mailto:[EMAIL PROTECTED] Subject: RE: tomcat temp directory Why however do I get null when I do the following? File tempDir = (File) sc.getAttribute(workDir); String tempDirStr = (String) sc.getAttribute(workDir); The attribute name for the API is

RE: tomcat temp directory

2007-06-04 Thread Chris Pat
Hi Chuck Thankyou. Why however do I get null when I do the following? Should I be getting the context specific temp directory in the form of a directory or casted as a string? ServletContext sc = getServlet().getServletContext(); File tempDir = (File) sc.getAttribute(workDir); String

context.xml locations and servlet mappings

2007-06-04 Thread Angelov, Rossen
Hi, I am experiencing a weird problem; when configuring my context in META-INF/context.xml, the servlet mappings stop working. I am trying to migrate web applications setup to run on Tomcat 5.0 to Tomcat 5.5 or 6. Currently one or more contexts are configured inside a host in server.xml. When I

Re: context.xml locations and servlet mappings

2007-06-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross, Angelov, Rossen wrote: META-INF/context.xml Context path= docBase=html debug=0 privileged=true Take out the path and docBase parameters. They are either illegal or ill-advised when using META-INF/context.xml. This might

RE: context.xml locations and servlet mappings

2007-06-04 Thread Angelov, Rossen
Chris, This didn't help. Removing them is not generating errors, the servlet still loads on startup, but then the mapping don't work. It doesn't make sense to remove the path and the docBase. Especially the docBase, it specifies the Context Root. If it's empty, it probably uses the host appBase

Re: context.xml locations and servlet mappings

2007-06-04 Thread Pid
One META-INF/context.xml per Context is the intended usage. The appBase ../your/app/base should contain: .../app/base/ROOT/index.jsp .../app/base/ROOT/WEB-INF/web.xml .../app/base/ROOT/META-INF/context.xml .../app/base/Other/index.jsp .../app/base/Other/WEB-INF/web.xml

RE: context.xml locations and servlet mappings

2007-06-04 Thread Angelov, Rossen
Thank you for explaining about the META-INF location. Mine is following exactly the same pattern as you described, but still the servlet mappings are not functioning when using the META-INF/context.xml. Do you have any clues why this could be happening? The mappings work fine when inside the

Re: context.xml locations and servlet mappings

2007-06-04 Thread Pid
Angelov, Rossen wrote: Thank you for explaining about the META-INF location. Mine is following exactly the same pattern as you described, but still the servlet mappings are not functioning when using the META-INF/context.xml. When you define a Context inside the Host, the path attribute is

JDBCRealm with IP address filtering?

2007-06-04 Thread Dean Ashby
Has anyone come across an extension of JDBCRealm that allows users to be associated with an IP address and subnet mask as well as a password? Basically what I'm looking for is a way to restrict specific users to be able to log in from a specific IP address or address range, i.e. from work but

virtual Hosts multiple IP's (one to one mapping)

2007-06-04 Thread Mon Cab
I will hosting several domains on tomcat, and have configured each domain with it's own IP address through DNS, such that domain1.com, as well as www.domain1.com resolve to the ip address of the domain1. (I.e. multiple hosts for each domain on each IP address). I am trying to get tomcat to

Re: virtual Hosts multiple IP's (one to one mapping)

2007-06-04 Thread Mon Cab
Just found the answer: Hostname Aliases http://tomcat.apache.org/tomcat-5.0-doc/config/host.html#Host%20Name%20Aliases --- Mon Cab [EMAIL PROTECTED] wrote: I will hosting several domains on tomcat, and have configured each domain with it's own IP address through DNS, such that