RE: High load on CPU from upload attempts

2004-09-09 Thread Peter Guyatt
Hi There, you can get an evaluation version of JProfiler or netbeans now comes with a free profiler. Thanks Pete -Original Message- From: Holly, Michael [mailto:[EMAIL PROTECTED] Sent: 09 September 2004 16:35 To: Tomcat Users List Subject: RE: High load on CPU from upload

Trouble running Tomcat using Sun's JDK1.4.2_05

2004-07-09 Thread Peter Guyatt
Hi There, Has anyone come across this problem. All Iam am doing is starting tomcat and then attempting to use my web app. The exception I am getting is as follows: Exception report message description The server encountered an internal error () that prevented it from fulfilling this

RE: Trouble running Tomcat using Sun's JDK1.4.2_05

2004-07-09 Thread Peter Guyatt
:15:22 +0100, Peter Guyatt [EMAIL PROTECTED] wrote: Hi There, Has anyone come across this problem. All Iam am doing is starting tomcat and then attempting to use my web app. The exception I am getting is as follows: Exception report message description The server encountered

Trouble running Tomcat using Sun's JDK1.4.2_05

2004-07-08 Thread Peter Guyatt
Hi There, Has anyone come across this problem. All Iam am doing is starting tomcat and then attempting to use my web app. The exception I am getting is as follows: Exception report message description The server encountered an internal error () that prevented it from fulfilling this

RE: jspc

2004-06-25 Thread Peter Guyatt
Hi There, The memory leak was in JDK1.4.1 and was to do with Strings and StringBuffer sharing memory for performance. Use JDK1.4.2 to ensure that this problem does not happen. Pete -Original Message- From: Nick Curry [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 11:08 To: Tomcat

RE: TC5 / Solaris CPU usage

2004-06-25 Thread Peter Guyatt
Hi There, Try running in client mode. Thanks Pete -Original Message- From: David Parfitt [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 11:33 To: Tomcat Users List Subject: RE: TC5 / Solaris CPU usage I've tried 5.0.25 - same results + other non-related issues so we ended up

RE: TC5 / Solaris CPU usage

2004-06-25 Thread Peter Guyatt
:50 To: Tomcat Users List Subject: RE: TC5 / Solaris CPU usage No luck. Same results. Cheers- Dave --- Peter Guyatt [EMAIL PROTECTED] wrote: Hi There, Try running in client mode. Thanks Pete -Original Message- From: David Parfitt [mailto:[EMAIL PROTECTED] Sent: 25

RE: how to check if a String is empty?

2004-06-24 Thread Peter Guyatt
Hi There, You could do the check test.length() 0 Pete -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 24 June 2004 17:18 To: 'Tomcat Users List' Subject: RE: how to check if a String is empty? There is a trim() funtion in java.lang.String ?

RE: Apps terminating abruptly

2004-05-18 Thread Peter Guyatt
Hi There, This exception is thrown when the Method.invoke method is called. The actual reason for this exception occurring is that the method invoked by this call has thrown an Exception. For more information on the exception an the Method class please look at the API documentation:

RE: XSLT in Tomcat apps

2004-05-05 Thread Peter Guyatt
Hi There, We use the Xerces XML parser and the Xalan XSLT processor. all are downloadable from http://xml.apache.org We usually just add the jar files to the WEB-INF/lib directory or in the j2sdk1.4.2_xx/jre/lib/endorsed directory is we are using a JDK later than 1.3 Hope this helps

RE: Accessing Dll's

2004-04-23 Thread Peter Guyatt
); }catch(Exception e){ System.out.println(Error in Validating Address + e.toString()); } return (csReturnErrorMsg.toString()); } } Peter Guyatt wrote: Hi There, Can I see you native code and your class that declares you native methods. Thanks Pete -Original

serving static HTML pages from a servlet

2004-04-22 Thread Peter Guyatt
Hi There, I would like to serve a static web page using Tomcat. The problem I have is that a use must have been authencated before they can view this page. I have a servlet that takes care of this and then it should forward the user to the static page. E.g.

RE: Accessing Dll's

2004-04-22 Thread Peter Guyatt
Hi There, Put you DLL's in the /winnt/system32 directory. Thanks Pete -Original Message- From: Annamalai Ramasamy [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 15:44 To: Tomcat Users List Subject: Re: Accessing Dll's Hi., Again Same Error.. Actually after the

RE: Accessing Dll's

2004-04-22 Thread Peter Guyatt
Hi There, Can I see you native code and your class that declares you native methods. Thanks Pete -Original Message- From: Mark Schmeets [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 16:13 To: Tomcat Users List Subject: Re: Accessing Dll's Hi, Is it possible that this dll is

RE: Tomcat 5 : java.lang.OutOfMemoryError

2004-04-20 Thread Peter Guyatt
Hi There, I have seen this before. It is when your page is going to be over a certain size. (I believe its around 4MB) Just use a Servlet to display the result of the query Thanks Pete -Original Message- From: Francesco Pellegrini [mailto:[EMAIL PROTECTED] Sent: 20 April 2004

RE: Tomcat 5 : java.lang.OutOfMemoryError

2004-04-20 Thread Peter Guyatt
the result by SERVLET ? Thans Francesco. -Messaggio originale- Da: Peter Guyatt [mailto:[EMAIL PROTECTED] Inviato: martedì 20 aprile 2004 12.19 A: Tomcat Users List Oggetto: RE: Tomcat 5 : java.lang.OutOfMemoryError Hi There, I have seen this before. It is when your page is going

RE: SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH

2004-04-12 Thread Peter Guyatt
Hi There, The NPE is coming from the { if (session == null || session.isNew()) } since even if session is null then you are still trying to call a method of session. a safer alternative would be if (session == null) { //error } else { if (session.isNew()) { }

RE: calling native code

2004-04-05 Thread Peter Guyatt
Hi there, What OS are you using ? If windows just copy the dll to the windows/system32 directory or solaris to the use/lib directory. That way you dont have to specify the location of the library Thanks Pete -Original Message- From: Astrid Wagner [mailto:[EMAIL PROTECTED]

PDF Files

2004-03-26 Thread Peter Guyatt
Hi All, Does anyone know how to jump directly to a specific page in a PDF document if you have manually loaded it and served it through a servlet ? Thanks Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: How can I get a method to be called every 60 seconds in Tomcat?

2004-03-16 Thread Peter Guyatt
Hi There, How about writing your own timer task, that performs a callback on an on class implementing TimerListener. Thanks Pete -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: 16 March 2004 07:29 To: Tomcat Users List Subject: Re: How can I get a method to

RE: Tomcat 4.1 hangs on File Reading

2004-03-10 Thread Peter Guyatt
Hi There, This read of the file? are you doing it a character at a time (ie via the read() method?) If so try reading more than one charcter at a time. Ie. public void readFile (String filename) { try { File f = new File(filename); FileReader fr

Using tomcat to serve PDF files

2004-03-05 Thread Peter Guyatt
Hi, I was hoping that someone would be able to point me in the direction of an example for using tomcat to serve PDF files. Thanks Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: Using tomcat to serve PDF files

2004-03-05 Thread Peter Guyatt
Hi There, Thanks, I forgot to use get output stream. Cheers Pete -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 05 March 2004 16:15 To: Tomcat Users List Subject: RE: Using tomcat to serve PDF files Hi, I was hoping that someone would be able

RE: Invalidate User Session

2004-03-04 Thread Peter Guyatt
Hi There, Not very easily, There is no onClose event for the window object in the DOM model. I found some javascript code that would mimic the onClose function but if you refreshed the page via F5 or the refresh button then it assumed it was closing the window. If this is not a problem

RE: addShutdownHook in Tomcat does not seem to get called on shutdown

2004-03-03 Thread Peter Guyatt
Hi There, Why not use the ServletContextListener interface to do all of your cleanup stuff when the contextDestroyed method is called ? Pete -Original Message- From: Elie Medeiros [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 10:44 To: [EMAIL PROTECTED] Subject: addShutdownHook

RE: printStackTrace throwing java.lang.StackOverflowError

2004-02-19 Thread Peter Guyatt
Hi There, It looks like an exeception to do with either a recursive method call or a problem with inheritenance. HTH Pete -Original Message- From: Unnikrishnan C [mailto:[EMAIL PROTECTED] Sent: 19 February 2004 08:22 To: [EMAIL PROTECTED] Subject: printStackTrace throwing

RE: Stopping repeating requests

2004-02-19 Thread Peter Guyatt
Hi All, Thanks for the replys. The form is processed by my servlet and the user is directed to another page (in this case a summary list of all of the data that they have entered). The problem occurrs when they hit refresh on this summary page and the last action was to add a new entry

Stopping repeating requests

2004-02-18 Thread Peter Guyatt
Hi, I have a problem where a user enters data into a form and then submits this to the server, which in turn wrights this content into a database. The problem I have is that if the user then refreshes the page via F5 then it adds the same data in again. Is there any way to ensure that

RE: How to know when Tomcat has completed startup?

2004-02-16 Thread Peter Guyatt
What about using a session listener. Why not call your method in the constructor for the SessionListsner Pete -Original Message- From: James Neville [mailto:[EMAIL PROTECTED] Sent: 16 February 2004 12:38 To: [EMAIL PROTECTED] Subject: How to know when Tomcat has completed startup? Hi

XForms processor

2004-02-11 Thread Peter Guyatt
Hi, Does anyone know of an XForms processor other than OXF that can be used with Tomcat ? Thanks Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: How can I limit ( or reduce) the max Mb of RAM for tomcat?

2004-01-21 Thread Peter Guyatt
Hi There, the -Xmx is what is used to limit the maximum amount of memeory that java uses. I have heard of problems in the JVM itself when using the -server, try removing this and see if this memory problem resolves itself. It could be that there is a memory leak in your code, do you

RE: Keeping servlet thread awake

2004-01-20 Thread Peter Guyatt
Hi There, It sounds to me like you have deadlock, not that tomcat is killing your thread Can your post the source so that I can take a look at it. Thanks Pete -Original Message- From: Allan Bruce [mailto:[EMAIL PROTECTED] Sent: 20 January 2004 14:08 To: Tomcat Users List

RE: Memory Leaks

2004-01-14 Thread Peter Guyatt
Hi There, You can invoke the garbage collector by using the System.gc() method. The memory is never returned to OS but the JVM keeps it in a pool used for object creation, it would make no sense in releasing this back to the OS as it will probably need to use it at some point or another.

Maximum page size before JasperException

2003-12-17 Thread Peter Guyatt
Hi There, Can anyone possibly tell me what the maximum page size allowed when compiling/presenting JSP page. The question arises when I try and display a 4meg file. If there is a limit is there any way to increase the maximum allowed size? Thanks Pete

RE: Maximum page size before JasperException

2003-12-17 Thread Peter Guyatt
Hi there, Its an XML file Pete -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: 17 December 2003 11:12 To: Tomcat Users List Subject: Re: Maximum page size before JasperException What are you displaying in a JSP page that takes up 4 megs ? Peter Guyatt

RE: Maximum page size before JasperException

2003-12-17 Thread Peter Guyatt
Subject: Re: Maximum page size before JasperException Hmm maybe you can just write out the file to the response body in a servlet ? Or do you need to do something in the jsp ? Peter Guyatt wrote: Hi there, Its an XML file Pete -Original Message- From: Kwok Peng Tuck [mailto

RE: Tomcat Dies

2003-11-24 Thread Peter Guyatt
Hi There, It looks like there is a memory lieak in your code, do you have any listeners, and if so are you storing the session objects in a collection and not removing them from the collection when they are being invalidated. Thanks Pete -Original Message- From: Rob Wichterman

RE: [OT] Synchronising database access

2003-11-21 Thread Peter Guyatt
Hi There, Use a singleton class to manage the database transactions. Then implement a owner mechanism. E.g. class DbTxMgr { String owner = null; public synchronized boolean lockMgr (String threadId) { if (owner == null) { owner =

RE: Tomcat Crashing

2003-11-19 Thread Peter Guyatt
Hi There, Which platform are you running on if its linix or solaris then it could be either the SIGINT (ctrc-c) or SIGHUP (your console closing) causing it to exit. Thanks Pete -Original Message- From: Bender, Christopher [mailto:[EMAIL PROTECTED] Sent: 19 November 2003 14:42

RE: How to tune Tomcat and Java?

2003-11-12 Thread Peter Guyatt
Hi There, Java and Tomcat are both multi-threaded applications. So they are both using more than one CPU. If it is using 50% of one processor then it is using 100% CPU on that processor, since its 50% of the actual processing capacity. Thanks Pete -Original Message- From: Jens

RE: How to tune Tomcat and Java?

2003-11-12 Thread Peter Guyatt
Hi There sorry sent the last one before it was ready ;-) Java and Tomcat are both multi-threaded applications. So they are both using more than one CPU (if available). If it is using 50% of one processor then it is using 100% CPU on that processor, since its 50% of the actual

Creation of HttpServlets

2003-11-10 Thread Peter Guyatt
Hi All, I am hoping someone can help answer me this quick question. If I had a web app with one servlet for processing all requests would that one servlet be used by every thread or is it a one to one relation (each thread uses its own instance of the servlet). Thanks Pete

RE: problems with dbcp

2003-11-03 Thread Peter Guyatt
Hi, Why dont you override the finialize method so that when your objects fall out of scope and are garbage collected then you close the connections ? Thanks Pete -Original Message- From: Florian Ebeling [mailto:[EMAIL PROTECTED] Sent: 03 November 2003 13:27 To: Tomcat Users

RE: Intermittent Performance Problems

2003-10-31 Thread Peter Guyatt
Hi There, Change to either the 1.4.2 or 1.3.1 branch of Java. Pete -Original Message- From: icewind [mailto:[EMAIL PROTECTED] Sent: 30 October 2003 20:42 To: [EMAIL PROTECTED] Subject: Intermittent Performance Problems Hello, I'm having performance issues that are hard to pin

RE: Tomcat stops handling HTTP connections, socket is SYN_RECV

2003-10-27 Thread Peter Guyatt
Hi There, Can you let me know which version of Tomcat has this problem ? I have seen a similar problem, I thought that it could be connected to deadlock, but it now does not appear to be the case. Thanks Pete -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

RE: Tomcat stops handling HTTP connections, socket is SYN_RECV

2003-10-27 Thread Peter Guyatt
handling HTTP connections, socket is SYN_RECV On Mon, Oct 27, 2003 at 11:54:48 -, Peter Guyatt wrote: Hi There, Can you let me know which version of Tomcat has this problem ? I have seen a similar problem, I thought that it could be connected to deadlock, but it now does not appear

RE: JSP question

2003-10-21 Thread Peter Guyatt
Hi There, Why dont you change the button back to a submit and then add a onSubmit='return validation();' to you form ? Thats what we do Eg. Script function valid () { if (document.form.val.value.length 1) { alert(Please enter a value);

Tomcat not shutting down correctly

2003-10-14 Thread Peter Guyatt
Hi There, I was hoping someone will be able to shed some light on a problem I am having with stopping tomcat. I use the attached shell script to start/stop tomcat, the problem is that when I use the stop argument Tomcat just seems to hang. The Catalina socket is closed, however the HTTP

RE: Tomcat not shutting down correctly

2003-10-14 Thread Peter Guyatt
), why aren't you using the standard tomcat one? Yoav Shapira Millennium ChemInformatics -Original Message- From: Peter Guyatt [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 10:46 AM To: Tomcat Users List Subject: Tomcat not shutting down correctly Hi There, I was hoping

RE: Instantiate a bean on startup

2003-10-07 Thread Peter Guyatt
Hi There, If you only want to have one instance of a class for many objects then use the following class myClass { private static myClass c = null; public myClass () { //set stuff } public static myClass Instance () { if

RE: auto refresh pages and session timeout

2003-10-07 Thread Peter Guyatt
Hi There, I had a similar problem and basically started an internal timer that was only reset if the page requested was not the same as the previous page. I could forward you the code if required. Thanks Pete -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent:

RE: Accessing objects with any servlets, where the object is already pre-created

2003-10-07 Thread Peter Guyatt
Hi there, Use somthing like this public calss stringHolder { private static stringHolder instance; private Vector v; public static stringHolder Instance() { if (instance == null) { instance = new stringHolder(); }

RE: Accessing objects with any servlets, where the object is already pre-created

2003-10-07 Thread Peter Guyatt
Hi there, I beleive that using the setAttribute adds the object to a hashtable. If when the hashtable reaches a certian limit (usually 75% of its total size) it re-hashs which can be expensive and cause performance problems. The solution is to ensure that the limit is never reached. Is there a

RE: Accessing objects with any servlets, where the object is already pre-created

2003-10-07 Thread Peter Guyatt
Hi there, It will be a direct reference thanks Pete -Original Message- From: Vidar Langberget [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 14:00 To: Tomcat Users List Subject: Re: Accessing objects with any servlets, where the object is already pre-created I understand that you

RE: auto refresh pages and session timeout

2003-10-07 Thread Peter Guyatt
to see the code. Thank you. Peter Guyatt wrote: Hi There, I had a similar problem and basically started an internal timer that was only reset if the page requested was not the same as the previous page. I could forward you the code if required. Thanks Pete -Original Message- From

RE: Tomcat on Netware

2003-09-30 Thread Peter Guyatt
Yeah, The fact that you need to have the call to the method synchronized its the same as using the wait() method implemented in the Object class you need to own the lock before you can call this method eg. some method { synchronized (this) { //this is ok

RE: Tomcat on Netware

2003-09-30 Thread Peter Guyatt
2003 15:08 To: [EMAIL PROTECTED] Subject: RE: Tomcat on Netware Thanks... do you know why tomcat would be doing this on startup?? Peter Guyatt [EMAIL PROTECTED] 30/09/2003 11:04:36 pm Yeah, The fact that you need to have the call to the method synchronized its the same as using the wait() method

RE: Desperation! Tomcat crashing inexplicably. :- Fresh ideas needed.

2003-09-18 Thread Peter Guyatt
Hi, Have you tried moving to a new version of Tomcat? We had problems with earlier versions crashing, We also moved from JDK1.2 to 1.3.1_07 Thanks Pete -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 18 September 2003 15:55 To: Tomcat Users List Subject: Desperation!

RE: Desperation! Tomcat crashing inexplicably. :- Fresh ideas needed.

2003-09-18 Thread Peter Guyatt
We did on our last project. But it was the JVM crashing and taking Tomcat down with it. We just moved to a newer version just to make sure. Try and upgrade the JVM, what version are you using ? -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 18 September 2003 16:12 To:

Obtaining client connection

2003-09-12 Thread Peter Guyatt
Hi There, I am not too sure if you are actually able to do this but I have a need to get the IP address/hostname of the client that has accessed a page in our web application. This is mainly for security/auditing purposes, however I really need to get the client Socket connection and not