Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Autocomplete over telnet connection

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Autocomplete over telnet connection

    Some of the servers I work with lets me autocomplete particular commands.

    For example, when I type:

    PHP Code:
    ch[space
    it autocompletes it for me as:

    PHP Code:
    change 
    So by typing

    PHP Code:
    ch[space]do[space][space
    in essence, i get:

    PHP Code:
    change document attributes 
    (attributes is the only valid argument after document, so it was autofilled as the second space)

    I know how to do this if i gave it in as an input for a function, but I don't know how to do this over a telnet connection. Is it possible for Java to even do this? are there any libraries or packages I should be looking at in particular?

    At this point, any sort of hint or theory will be most helpful. Thanks


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Autocomplete over telnet connection

    How does this relate to java programming?

  3. The Following User Says Thank You to Norm For This Useful Post:

    April (June 16th, 2010)

  4. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Autocomplete over telnet connection

    I'm writing a server in Java and I'm wondering whether I can duplicate this effect.

  5. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Autocomplete over telnet connection

    I'm not familiar with what port telnet connects to? Is it a general purpose tool that can connect to any port?
    How does it get feed back from the server to auto complete?
    What kind of server does the auto complete for you?

  6. #5
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Autocomplete over telnet connection

    Telnet - Wikipedia, the free encyclopedia is more of a network protocol really and does not have any designated port. Sometimes applications/servers expose a telnet port for administrating the server, such an example is mail servers which also allow you to connect to port 25 in most cases and actually type in your email.

    // Json

  7. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Autocomplete over telnet connection

    That's interesting. I'll have to research it.
    On WinXP telnet is a command: open a command prompt and enter telnet and it says:
    Welcome to Microsoft Telnet Client

    Escape Character is 'CTRL+]'

    Microsoft Telnet>
    Microsoft Telnet> ?

    Commands may be abbreviated. Supported commands are:

    c - close close current connection
    d - display display operating parameters
    o - open hostname [port] connect to hostname (default port 23).
    q - quit exit telnet
    set - set set options (type 'set ?' for a list)
    sen - send send strings to server
    st - status print status information
    u - unset unset options (type 'unset ?' for a list)
    ?/h - help print help information
    Microsoft Telnet> o 127.0.0.1 8080
    Connecting To 127.0.0.1...
    I thought telnet was a general purpose tool that would allow you to do FTP manually for example.

  8. #7
    Junior Member
    Join Date
    Jan 2010
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Autocomplete over telnet connection

    Well, the most common application of telnet/SSH is remote management. For example, if you're on the road and you need to say, read log files, or install new software, you would telnet in. There isn't really a web interface for everything, and even if there was, SSH is less resource intensive than a full featured browser. The servers I work with are to manage commercial printers. They don't have a full variety of commands (like mkdir, chmod, ls, etc etc), but instead, they have their own command set (start printing, stop printing, list documents, change document, etc).

    In a way, you can think of the autocompletion like when you're on the command prompt (since it looks like you're in WinXP) and you type cd <folder name> .... but instead of typing out the entire folder name (say, cd myfolder), simply type cd my[tab] (press tab), and WinXP should autocomplete the folder name and show cd myfolder instead.

    If you'd like an example of a telnet server that people won't mind you connecting to, you can try googling for 'MUDs' ... these are telnet servers made for entertainment purposes, and they more or less won't mind a random connection

Similar Threads

  1. jdbc connection with phpmyadmin
    By anand_fevi in forum JDBC & Databases
    Replies: 1
    Last Post: May 13th, 2010, 02:26 AM
  2. Thread and connection
    By Param in forum Threads
    Replies: 0
    Last Post: April 26th, 2010, 03:43 AM
  3. Connection refused: connect
    By kirts in forum Java Networking
    Replies: 0
    Last Post: April 16th, 2010, 11:53 AM
  4. cant get rid of http connection
    By kartik in forum Java Networking
    Replies: 1
    Last Post: July 21st, 2009, 03:09 AM
  5. opening Telnet Command Session
    By voyager in forum Java Networking
    Replies: 3
    Last Post: June 23rd, 2009, 10:34 AM