This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes IO Exception :Connection timed out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "IO Exception :Connection timed out " Watch "IO Exception :Connection timed out " New topic
Author

IO Exception :Connection timed out

varkala prabhakar
Ranch Hand

Joined: Sep 08, 2001
Posts: 54
hai,
I have a mail servlet and when i try to run that servlet i get this error:,kindly tell me how to correct the error.
thanx
prabhakar
code:

Added code UBB tags
-Mike C
[ January 07, 2002: Message edited by: Mike Curwen ]
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Hi varkala,

Could you provide a bit more detail in your stack trace? It's helpful to see the full stack trace when diagnosing a problem.

There are a few things I will comment on:

You seem to be accessing mail.yahoo.com on port 25. Does Yahoo provide smtp service on this port?

Is there a reason you're not using JavaMail API to send/receive emails? It hides some of the Sockets and Streams details, and is a bit easier to use.
 
Consider Paul's rocket mass heater.
 
subject: IO Exception :Connection timed out