This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes To validate telnet connectivity in java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "To validate telnet connectivity in java code" Watch "To validate telnet connectivity in java code" New topic
Author

To validate telnet connectivity in java code

Sesha Sathish
Greenhorn

Joined: Mar 01, 2011
Posts: 5

How to check whether telnet connectivity is available in my java code
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39543
    
  27
It doesn't make sense to speak of "Telnet connectivity in Java code". You might ask whether there is Telnet connectivity to some other machine - that depends on whether the other machine is set up to be a Telnet host, and whether there's a network connection to that machine that allows Telnet traffic to go through. You can test this using a Telnet client such as Apache Commons Net.


Ping & DNS - updated with new look and Ping home screen widget
Sesha Sathish
Greenhorn

Joined: Mar 01, 2011
Posts: 5

As in there is a web site run by us.There are several protocols used http,https,ftp,ftps,ssh.My requirement is it i should check for generic protocol connectivity using telnet in local pc
for example:
if(ftp.isConnected()){
SFTLogger.writeToTraceLog(className,SFTConstants.INFO,
methodName,
userId+SFTConstants.HYPHEN_SEPERATOR+userName,
transmitterID + SFTConstants.HYPHEN_SEPERATOR + transmitterName,
fileTrackingID,
"Disconnecting from FTP Server ",null);
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39543
    
  27
So you'd attempt a Telnet connection and handle any exceptions accordingly.

Note that Telnet should no longer be used over connections that go through untrusted networks (in other words, the public internet, unless it's over a VPN). That's what SSH is for.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36468
    
  16
. . . and welcome to the Ranch
Sesha Sathish
Greenhorn

Joined: Mar 01, 2011
Posts: 5

Solved

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36468
    
  16
Please always use the code button. Since you are new, I shall edit your post and you can see how much better it looks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To validate telnet connectivity in java code
 
Similar Threads
which textbook / pdf / site is good to learn servlets and jsp in detail
JDBC
How to connect the mysql data base through JSP in Eclipse?
how to create tablespace in java dbms
Bar Chart In Excel file using Java