Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

To validate telnet connectivity in java code

 
Greenhorn
Posts: 5
Eclipse IDE Tomcat Server Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to check whether telnet connectivity is available in my java code
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sesha Sathish
Greenhorn
Posts: 5
Eclipse IDE Tomcat Server Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 69859
278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and welcome to the Ranch
 
Sesha Sathish
Greenhorn
Posts: 5
Eclipse IDE Tomcat Server Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved

 
Campbell Ritchie
Marshal
Posts: 69859
278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please always use the code button. Since you are new, I shall edit your post and you can see how much better it looks
 
Acetylsalicylic acid is aspirin. This could be handy too:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic