Harry Jones

Greenhorn
+ Follow
since Mar 19, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Harry Jones

I'll pursue your recommendation. Thanks to all who responded. I appreciate it.
11 years ago
I'm not sure whether this will address your particular problem, but I had to exclude index.jsp from the test of the null session. Otherwise I created an infinite loop.
11 years ago
I'm not sure whether your question is directed to me or Mr. Venkatasamy. After I close resources and invalidate the session, I send the user to a JSP with "A system error interrupted processing ..."
But, no, I don't try to recover from the error itself.
11 years ago
Try replacing /teams in destination with /com/test
11 years ago
I know a lot has been written about this subject and I have tried to educate myself. The API and most people, it seems, state that you should not catch an error because they are too serious to recover from. But some people make exceptions, and I am unsure about my situation.

I have a small web application that accesses and updates MySQL without pooled connections and sends out emails from time-to-time using multiple threads. This is the general form of my servlets:

Is trying to catch an error like this a reasonable approach? Will it even work? If I stop doing this in my servlets, what will happen if an error occurs?
Thank you.
11 years ago
Are these two statements the same, or is one better than the other?


Thanks.
11 years ago
Thanks very much. I appreciate everyone's help.
11 years ago
And it will probably happen again at the worst possible time, as it did the first time. What is a snapshot dump? Thanks.
11 years ago
The difficulty with monitoring the application is that the crash was an isolated incident. The application has been up for a couple years without this kind of problem, although I have redeployed the application from time-to-time for other reasons.
I do create a thread pool for sending out emails, but there are only 3 threads in it, and there were only 2 users on line when the application crashed. But the traffic that day had been heavy.
Thank you for your feedback. I will look into the app. Could the problem be related to memory or garbage collection up?
11 years ago
I have a small production web application on a virtual dedicated server with CentOS 5.4, java 1.6.0, apache-tomcat-6.0.18, and mysql 5.0.77.
After very heavy traffic, I could no longer access my website. I got a blank screen. The catalina log said only that contextDestroyed() of the ContextListener was called.
I redeployed the application and everything seems fine. Did I hit a limit of some kind in Tomcat or Java that caused the application to crash?
11 years ago
I actually cut this out to keep the post short:

I would like to use try/catch /finally with the Transport.send, but I don't know how to write to the log from there. Any help would be appreciated.
13 years ago
I ran this in NetBeans and it compiled for me without an exception.
13 years ago
I send an email once in a while from my web application on a virtual dedicated server. Usually the email works. But sometimes Transport.send hangs up. Processing just stops at that statement. I don't get anything from debug.

Here is the call:

Here is the sendmail:
What could be causing the problem with Transport.send? I researched this but can't find an answer. Thanks.
13 years ago
Based on the guidance provided, here is my solution. After a successful logon, I invalidate the existing session and create a new one, followed by this code:


As a greenhorn, this was a major problem for me. I really appreciate the help and want to thank everyone who replied.
13 years ago
JSP
Thanks for the explanation. I have really been struggling to understand what was happening.

How do people deal with this situation? Is there some way to convert a www.mysite.com request to mysite.com? Or is there some other way to handle it so as not to trigger a new session?
13 years ago
JSP