CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2001
    Posts
    27

    How to send data from Applet to Server

    In my applet I have a HashMap object, I want to send that data to ASP file on Server. How I can send Applet data to ASP file? How I can call ASP file from Applet?


  2. #2
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,877

    Re: How to send data from Applet to Server

    Do you have a URL that will access your ASP code on the server? You can use that with the URLConnection class or with the AppletContext.showDocument() method to send it to the server that the applet was loaded from.
    For example using HTTP GET: http://server/aspfile?theData
    With HTTP POST, the you need to use the URLConnection class and use setDoOutput(true); and then getOutputStream() and write your data. You'll probably have to extract the data to be sent, I don't expect ASP to be able to read java Objects.


    Norm
    Norm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured