Newbee help: applet sends itself to sock server!!!

hi all,
im a c# developer 'n new to java applets,
my client have a server and a web java applet that connects to server using socket
i've got a task to create a c# windows application to do same as the applet.
im just confused, when i saw the applet code, it connects to server, and sends itself to the server!!!
here's the code, can anyone plz help me what's actually happening...
               try
                    to_server = new Socket(getCodeBase().getHost(), port_of_server);
                    _OOS = new ObjectOutputStream(to_server.getOutputStream());
                    is = new DataInputStream(new BufferedInputStream(to_server.getInputStream()));
                    os = new PrintStream(new BufferedOutputStream(to_server.getOutputStream(), 1024), false);
                    txtAreaMessages.setText("");
                    txtMessage.setEnabled(true);
                    txtMessage.setText("");
                catch(Exception exception)
                    _logout();
                    txtAreaMessages.appendText("Could not Connect...");
                    return;
                // THIS IS THE CODE WHERE IM CONFUSED!!!
                _OOS.writeObject(this);
                _OOS.flush();
                os.print(1);
                os.flush();
                ClientNew clientnew = new ClientNew(is, os, txtAreaMessages);
                clientnew.start();
                btnLogin.setEnabled(false);
                txtLoginName.setEnabled(false);
                btnSend.setEnabled(true);
                btnMobMessage.setEnabled(true);
                ch_thread = new Thread(this, "abc");
                ch_thread.start();alll is well, but what's with ObjectOutputStream, and why its sending (this) to server??
im asking this question here because i wanna learn it as well :D
it'll be really great help if someone can tell me same to do in c#
// chall3ng3r //

the decompiled source code should tell you what you need to rewrite the client-server communications, which you will unfortunately have to do.
is it some kind of trick to allow only connection from the applet not from c# or vb??no, its an easy, java-specific method of communication.
if it is, how to do same in c#, (just gimme a hint, not the full solution)yes, you would have to do work to allow any other language to emulate this.
no, its not impossible to do.
i know nothing about c#

Similar Messages

  • Can someone help me send mail using SMTP server?

    I am having the most frustrating problem with SMTP outgoing email account.  I use GoDaddy's Webmail (smtp.secureserver.net) and I receive all my emails through Apple Mail but I cannot send any.  I haven't been able to for about two weeks now, aside from 3 or 4 fleeting windows of time when I could.  Almost all of the time I try to send my emails, an error message says my outgoing account is offline.  I've been on the phone with GoDaddy's tech support three times this week and did everything we could think of, which include these steps:
    -Force Quit Apple Mail --> Restart Computer
    -Change Default Ports to a specific one and uncheck "Use Secure Sockets Layer (SSL)"
    -Check "Use only this server"
    -Delete account completely from Apple Mail and re-load (which I had to go into Time Machine to recover messages, and lots a bunch in the process ugh!)
    Nothing works!  I depend on this email for my business, and I rely heavily on Apple Mail for this account.  All of my other email accounts that I pull through Mail work fine, but of course they are not SMTP outgoing.  Please help...I feel like I've tried everything and nothing works permanently. 

    At this point there are 2 possible causes to your problem:
    Apple Mail
    Connectivity between you and the SMTP server
    I can't help with (1) as I use Thunderbird as my mail client (the biggest advantage being I can take my mail files and move between different versions of Mac OS X). If you suspect that your problem is due to Apple Mail, then using another email client to send a test message will prove the point. If it works, then the problem lies with Apple Mail and somebody else will have to chip in. If it still fails, then there may be connectivity issue between you and the mail server.
    If you google "telnet smtp test" (without the quotes), you will find many articles showing you how to test an SMTP connection using telnet. Don't be put off by the fact that many of the articles assume you are running Windows. The only Mac bit you need to know is that telnet is a command line utility accessed via Terminal. The rest is generic.
    Telnet will allow you to interact with the mail server a line at a time and show you exactly what and where the problem is. If you get an unexpected response from the server, go back to GoDaddy and show them the output. If you don't get any response at all (i.e. "telnet smtpout.secureserver.net 25" just hangs), then take it up with your ISP as you are simply not getting through to the server.
    Good luck.

  • Send string to socket server from applet

    Am trying to send a string to socket server from my applet:
    Server:
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Server extends JApplet
    ServerSocket srvr;
    Socket skt;
    PrintWriter out;
    BufferedReader in;
    Server()
    String data = "server";
    try
    srvr = new ServerSocket(5555);
    skt = srvr.accept();
    out = new PrintWriter(skt.getOutputStream(), true);
    in = new BufferedReader(new InputStreamReader(skt.getInputStream()));
    while (in.ready())
    System.out.println(in.readLine());
    out.print(data);
    out.close();
    in.close();
    skt.close();
    srvr.close();
    catch(Exception e)
    System.out.print(e);
    public static void main(String[] aslan)
    new Server();
    My applet where I have my client:
    Socket skt;
    BufferedReader in;
    PrintWriter out;
    try
    skt = new Socket("localhost", 5555);
    out = new PrintWriter(skt.getOutputStream(),true);
    in = new BufferedReader(new InputStreamReader(skt.getInputStream()));
    while (in.ready())
    System.out.println(in.readLine());
    in.close();
    catch(Exception e)
    System.out.print(e);
    public void actionPerformed( ActionEvent e )
    if(e.getSource() == button)
    out.println("test");
    But when the button is pushed the client is supposed to send the string "test" to the server but nothing happens can someone plz help me with this?

    Am trying to send a string to socket server from my
    applet:
    Server:
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Server extends JApplet
    ServerSocket srvr;
    Socket skt;
    PrintWriter out;
    BufferedReader in;
    Server()
    String data = "server";
    try
    srvr = new ServerSocket(5555);
    skt = srvr.accept();
    out = new PrintWriter(skt.getOutputStream(), true);
    in = new BufferedReader(new
    InputStreamReader(skt.getInputStream()));
    while (in.ready())
    System.out.println(in.readLine());
    out.print(data);
    out.close();
    in.close();
    skt.close();
    srvr.close();
    catch(Exception e)
    System.out.print(e);
    public static void main(String[] aslan)
    new Server();
    My applet where I have my client:
    Socket skt;
    BufferedReader in;
    PrintWriter out;
    try
    skt = new Socket("localhost", 5555);
    out = new PrintWriter(skt.getOutputStream(),true);
    in = new BufferedReader(new
    InputStreamReader(skt.getInputStream()));
    while (in.ready())
    System.out.println(in.readLine());
    in.close();
    catch(Exception e)
    System.out.print(e);
    public void actionPerformed( ActionEvent e )
    if(e.getSource() == button)
    out.println("test");
    But when the button is pushed the client is supposed
    to send the string "test" to the server but nothing
    happens can someone plz help me with this? Your server code while (in.ready()) is going to block indefinitely.
    Remove the while loop and just write your ouput and close the connection on the server.

  • Can any one help me sending Oracle application server Cloning  document 9.0.4 version

    Can any one help me sending Oracle application server  Cloning document 9.0.4 version (Mail id removed by moderator)
    Many Thanks in advance
    Deepak

    Hi Deepak,
    In first place application server 9.0.2 is desupported since 30th June 2007.So oracle would always recommend its customer to be on the latest versions.
    Please follow the below URL for cloning Appplciation Server 9.0,.4
    Cloning Application Server Middle-Tier Instances
    Regards,
    Prakash.

  • Cannot send message using the server (null)

    i use mail 2.1.
    i have a .mac account and have three other email accounts attached to my mail account.
    lately, i cannot send any email.
    the switchiing ports fix hasn't helped either.
    this is the error message:
    CANNOT SEND MESSAGE USING THE SERVER (null)
    The server response was: 5.1.0 <email [email protected]>...
    From address does not match authentication.
    Use the pop-up menu below to try a different outgoing mail server. All messages will use this server until you quit Mail or change your network settings.
    Message from: email <[email protected]>
    Send message using: [there is a combo box here with all the four accounts servers listed]
    no matter which one i pick it doesn't work and no email is sent.
    anyone have this error before? or now how to fix it?
    i'd be appreciative.
    thanks
    1.67 GHz Power PC PowerBook G4   Mac OS X (10.4.6)   Sony HDR HC3 HD HandyCam MiniDV

    I was having a similar problem (don't feel like typing all the details)
    I was about to to delete my com.apple.mail.plist, when finally it hit me.
    I ran ethereal (again, I'm sorry, but learning how to use ethereal is a topic unto itself). Following the TCP stream (ie. looking at the smtp messages being sent back and forth) I came across two problems. For some reason my port number was set to 567 or something like that, when it's supposed to be 25, as I had originally set it to.
    Once I corrected the port number I started receiving an error message from the smtp server. It said the return email address could not be authenticated. (using xyz.com as an example) The correct return email address was supposed to be [email protected], but for some reason it was changed to john@xyz in the account settings.
    Anyway, to get to the point, another thing to check is that your return address has been set correctly, and if all else fails, make sure you have X11 installed and use fink to install and run ethereal. This will let you know if you are actually connecting to the server, and will show you any error messages.
    PS. I think this problem started occurring with the last update made to mail. I believe it somehow corrupted my settings. This would explain how my port number could have been changed to the default port number of .mac mail.

  • Firewall: Error sending to the socket, server is not responding.

    Hi all,
    I'm trying to connect AIX machine to NT DB2 Database through JDBC with a firewall. I'm using the standard port 6789 in JDBC Applet Server in NT DB2. But I've gotten the following message:
    COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0614E Error sending to the socket, server is not responding. SQLSTATE=08S01
    The connection chain I'm using for AIX side is:
    jdbc:db2://192.168.3.4:6789/DATABASE
    I've configured the firewal to allow the port 6789 to be used, and also the other port 51544 (it's for remote administration, I think). I've also checked that wires and other stuff is working fine, but stil I cannot connect to the Database.
    I don't know if there's something missing on the firewall configuration. Before, everything was working without the firewall.
    Any help will be apreciated, THanks.
    Rodrigo, SPAIN

    It looks like no port problem is happening, because we freed all the ports just to see if client tried to use some of them without our knowing. But it was still the same.
    We were thinking about routing issues, but we were able to ping from client to server, and ports 6789 and 51544 were open as well. Maybe JDBC Client Driver is looking for an different IP address than 192.168.3.4. We know the firewall doesn't receive any query from JDBC Client, and that's very strange because if you see the routing tables in AIX machine, the default route is the firewall. Of course, there's not any other static defined route for the server (192.168.3.4), so it's supposed that default route is going to be used. But it's not.
    We also restarted client machine from scratch but nothing. Maybe this problem happens because there's something wrong in AIX networking settings.
    Rodrigo

  • EEM sending mail by authenticated server

    Hi,
    we use EEM 3.2 to send email whenever interface goes down/up. But it doesnt work.
    We need to use authenticated SMTP server, so command for sending mail is following
    action 1.0 mail server "cisco:[email protected]" to "[email protected]" from
    "[email protected]" subject "something"
    But it doesnt work. Log is following
    Mar 22 12:55:34.316: %HA_EM-6-LOG: INTERFACE_CHANGED_STATE : DEBUG(smtp_lib) : smtp_connect_attempt: 1
    Mar 22 12:55:34.333: %HA_EM-6-LOG:  INTERFACE_CHANGED_STATE : DEBUG(smtp_lib) : smtp_read 220  relay2.domain.local HE relay mail server Fri, 22 Mar 2013 13:55:34 +0100
    Mar 22 12:55:34.333: %HA_EM-6-LOG: INTERFACE_CHANGED_STATE : DEBUG(smtp_lib) : smtp_write HELO DP-SW1.dp.local
    Mar 22 12:55:34.752: %HA_EM-6-LOG:  INTERFACE_CHANGED_STATE : DEBUG(smtp_lib) : smtp_read 250  relay2.domain.local Hello [90.185.130.170]
    Mar 22 12:55:34.752: %HA_EM-6-LOG: INTERFACE_CHANGED_STATE : DEBUG(smtp_lib) : smtp_write AUTH LOGIN Y2lzY28=
    Mar 22 12:55:35.298: %HA_EM-6-LOG: INTERFACE_CHANGED_STATE : DEBUG(smtp_lib) : smtp_read 503 5.5.2 Send hello first.
    Mar 22 12:55:35.298: %HA_EM-6-LOG:  INTERFACE_CHANGED_STATE : DEBUG(smtp_lib) : buffer no reply code  matched: 503 5.5.2 Send hello first.
    Mar 22 12:55:35.298: %HA_EM-3-FMPD_SMTP: Error  occurred when sending mail to SMTP server: cisco:[email protected]: error in reply from SMTP server
    Mar 22 12:55:35.298: %HA_EM-3-FMPD_ERROR: Error executing applet INTERFACE_CHANGED_STATE statement 1.0
    Do you have any idea? I changed domain names. I figured out, that when I manually connect to SMTP server and istead of HELO command I use EHLO, it works. Do you think it can be a problem? And how to solve it then?
    Any help appreciated.
    thanks
    John

    Looks like an incompatibility with your SMTP server.  If you get a sniffer trace of a working app sending email through this server what is different versus the debug output here?

  • Send Message from RMI Server to RMI Client

    Hi,
    I want to send message to RMI Client throw RMI server to refresh client's data object as it is database application. I guessed i could implement an interface on client side and i can register my client to the server by sending object to the server. It is not helping it is throwing NULL Pointer exception on server side and it is not refreshing. It seems like it is not passing by reference.
    Can any one please guide me with how to send messages to clinet. What is the best way to do it?
    -A Thakkar.

    You need to elaborate the object model of your client. When you run into this situiation where you might have to sublass two different objects, then you should take a look at breaking the client itself into more than one object.
    Let me put it another way: A JFrame is a GUI object; why would you ever try to callback a GUI object? Can't you create - say - a CallbackHandler, and let it initiate further action in the client?

  • OSX Mail - Cannot send message using the server ....

    Hi there,
    Mac Pro with OSX 10.6.
    *Can receive mail, but can no longer send email* using the program Mail.
    Been getting the popup "Cannot send message using the server [shawmail.vc.shawcable.net] for the past 3 days. I hadn't changed anything about my computer, and have had the Mac for 2+ years. So this just started doing it on it's own.
    I had a technical support guy from my service provider even interface with my computer, where he could see my desktop right over the internet, and he couldn't get it fixed either.
    I googled this problem, and found solutions like:
    1. Uncheck "Use SSL" (Done that, and it was never checked "on" to begin with)
    2. Make sure Authentication is set to none, with no password (done that, and it wasn't set with a password to begin with)
    3. Delete [user]/Library/Preferences/com.apple.mail.plist (done that, didn't do anything)
    4. We even totally deleted my account, and started a new fresh one. Didn't work
    The tech support guy did show me a way to email online, using the same email account. That worked, but it's a hassle to go onto a web-based email program -- it's not my preference. So, with great certainty, it's not my service provider, because I was able to send emails on this web-based email program using my email account.
    So there, I'm stumped.
    Hopefully someone can help. What's bizarre is that googling this problem, I have found many other people that say it happens arbitrarily, out of nowhere.

    I can't believe how ridiculous this issue is. i have been searching for days for a solution to this. i have tried EVERY recommendation on these forums and nothing works. It appears that this issue dates back to TIGER. I had this problem back in January and just bagged figuring it had something to do with iweb. I bought a new html program and was able to send out my newsletter last month no problem. Suddenly, one month later- here i am again, unable to send out my newsletter with no help from Apple or verizon, or these forims, or anyone else. To think that a company that I have stood behind and loved so much can't be be bothered fixing such a simple issue that has been going on now through  5 OS's (I am using Lion but I had the issue using leopard as well)  is a disgrace.

  • How to email text from a text component in my applet on a the host server ?

    How to email text from a text component in my applet on a the host server, back to my email address ?
    Assuming I have Email Form on the host server.
    Help will be appreciated.

    You can do like below
    =REPLACE(Fields!Column.Value," " & Parameters!ParameterName.value & " ","<b>" & Parameters!ParameterName.value & "</b>")
    The select the expression and  right click and choose placeholder properties
    Inside that set Markup type as HTML 
    then it will highlight the passed parameter value in bold within the full xml string
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to send File on application server for Attachment

    Hi,
    Friends in my application file is to be sent with Email as an attachment.
    all this to be done via servlet for that i have to send the file to application server from there servlet will send mail via Email server.
    How can send this file to server.
    plz help me .
    Thanks

    Hi,
    The following program illustrates the creation of ifle in app server and reading the file from appli server:
    DATA: ITAB LIKE vbakOCCURS 0 WITH HEADER LINE.
    PARAMETERS: P_VBELN LIKE VBAP-VBELN.
    START-OF-SELECTION.
      SELECT *
        FROM VBAP
        INTO TABLE ITAB
    WHERE VBELN = P_VBELN
        PERFORM WRITE_DATA.
        PERFORM READ_DATA.
    *&      Form  WRITE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM WRITE_DATA.
    OPEN DATASET 'VBAP_DATA' FOR OUTPUT IN TEXT MODE.
    LOOP AT ITAB.
    TRANSFER ITAB TO 'VBAP_DATA'.
    ENDLOOP.
    CLOSE DATASET 'VBAP_DATA'.
    CLEAR: ITAB, ITAB[].
    ENDFORM.                    " WRITE_DATA
    *&      Form  READ_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM READ_DATA.
    OPEN DATASET 'VBAP_DATA' FOR INPUT IN TEXT MODE.
    DO.
    READ DATASET 'VBAP_DATA' INTO ITAB.
    IF SY-SUBRC <> 0.
    EXIT.
    ENDIF.
    APPEND ITAB.
    ENDDO.
    CLOSE DATASET 'VBAP_DATA'.
    LOOP AT ITAB.
    WRITE:/ ITAB-VBELN,
            ITAB-POSNR.
    ENDLOOP.
    ENDFORM.                    " READ_DATA
    If it is helpful rewards points
    Regards
    Pratap.M

  • Re-encode and send to Flash Media Server?

    Hi all,
    I hope this is not a basic question - I'm in a bit of a loop
    with this.
    I need to do two things:
    grab a live video feed from a
    professional DV camera - the feed would be a standard BNC
    (composite) video cable + XLR mic cable or similar. I need to take
    that feed and somehow convert it to feed and broadcast live through
    Flash Interactive Streaming server (...a reliable hardware solution
    would be great!)
    I will also be receiving Windows
    Media MMS feeds from our parent company - can I re-encode live and
    send through Flash Streaming Server in real-time?
    Also - just in case it makes a difference, the camera is PAL
    - not NTSC. So far I've had no problem running tests with a camera
    connected directly via firewire.
    Thank you for any help you can offer.

    My first message got screwed up - so trying again.....
    Hi all, I hope this is not a basic question - I'm in a bit of
    a loop with this.
    I need to do two things:
    1. grab a live video feed from a professional DV camera - the
    feed would be a standard BNC (composite) video cable + XLR mic
    cable or similar. I need to take that feed and somehow convert it
    to feed and broadcast live through Flash Interactive Streaming
    server (...a reliable hardware solution would be great!)
    2. I will also be receiving Windows Media MMS feeds from our
    parent company - can I re-encode live and send through Flash
    Streaming Server in real-time?
    Also - just in case it makes a difference, the camera is PAL
    - not NTSC. So far I've had no problem running tests with a camera
    connected directly via firewire.
    Thank you for any help you can offer.

  • I have 2 email accounts the second one i have only recently added, i have sent one email from my second account but i cant seem to send anymore, it says "cant send email with selected server" i am still able to send emails from my first account. Any ideas

    I have 2 email accounts, the second i only just recently added, i was able to send an email from this account after i added the account but am not able to send anymore emails. It says "unable to send email with selected server" there are no other servers to choose from. please help! TIA

    Hi apmichael,
    If you are having issues sending email from one of your mail accounts on your iPhone, you may find the following article helpful:
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    Regards,
    - Brenden

  • SOAP Receiver- Error While Sending Message: 500 Internal Server Error

    Hello,
    Our scenario: IDoc to SOAP
    I have added a third party system in the SLD and have used the same in my ID configuration.
    An idoc will be triggered from R/3, which will received in PI, PI will transform the IDoc into SOAP message for the third party system.
    I have tested the scenario in ID from Interface Determination and its successful.
    But when i try to try to test it from RWB, using Test Message in Adapter Engine, I get an error,
    "Error while sending message:500 Internal server error"
    If we test it using a testing software like SOAP UI, it works fine but from PI we get the error mentioned above.
    Regards,
    Abhishek

    Hello,
    Since the IDOC adapter resides on the ABAP stack, you can use this URL instead (it will be sent to the integration engine as Venkata suggested)
    http://host:port/sap/xi/engine?type=entry
    Also check your firewall settings from PI to the third-party system.
    Hope this helps,
    Mark
    Edited by: Mark Dihiansan on Feb 7, 2012 11:48 AM

  • " Error while sending message: 500 Internal Server Error" RNIF Adapter

    Hi,
    I have configured B2B integration as   Sender : RNIF adapter &  Receiver: XI Adapter.
    I am  able to test the configuration successfully in ESR and ID. But, whille testing with RWB using same test data, i am getting the following error:
    Error while sending message: 500 Internal Server Errot.
         Could you anybody help me, what could be the reason? Even i am not getting any error messages in SXMB_MONI.
    Thanks
    Laxman

    Hope this helps..
    -Is the 500 internal SErver Error in RWB is only for this issue and the message is successfully processed in SXMB_MONI?
       Could be the PI Service User :PIAFUSER(Adapter framework user) login crendential issue or run out time error.
    Try taking the payload from sxmb_moni and enter  it in RWB > Adater engine> Test Message Tab > give proper sender interface information , enter payload and try sending message.   check what is behaviour

Maybe you are looking for

  • Possible to connect an external monitor to HP Pavilion dv4t-4200 CTO Entertainment Notebook PC

    I have a HP Pavilion dv4t-4200 CTO Entertainment Notebook PC model # A1M02AV and it has a VGA port, one that looks like a phone/broadband cable port, and one that looks like a USB port but indented on either side at the bottom. Can I even connect an

  • Error in CHARM_CREATE when using a Z partner determination procedure

    Hi, I use SDCR and needed to create a new partner determination procedure ZDCR0001. I don't need to change anything else in this Change Request transaction type, so everything else is standard. When I run CHARM_CREATE now, the program is using the pa

  • TS1702 How can i report an app for their coding

    Hi, i just wonder how can i report space ape for making bad game? Their samurai siege constantly have bad coding, one instance where they advice their users to change the device clock to "work around their bugs" and do not advice other of potential h

  • MBA, Thunderbolt and firewire

    i am now the happy owner of a MBA 13" 94gb memory)...i cannot expouse how mush i love it.... but i use an 800 firewire drive foe work, i have several VM images on it and use VMware fusion. so heres the question; on my MBP (8gb memory) running the ima

  • Java client to MS CRM 3.0 webservice via SOAP : empty credentials received

    Hi,I've been trying to connect to a webservice hosted on a MS platform where IIS runs on and CRM.Based on the WSDL file the project has been built up using a proxy to get it done. a source file is generated by Oracle tools ( is a utility client for i