Send a GET request then get results.

admin

Administrator
Staff member
I am trying to create an applet that communicates with the server. I'm notsure if I am going to have to go to the socket level. I would rather usethis code:try{url = new URL(getDocumentBase(), strCallPage);input = url.openStream();}catch (MalformedURLException e){System.out.println("bad url");return;}catch (IOException e){System.out.println("error opening stream");return;}In this code "strCallPage" has all the information for the GET request. Theproblem is when I call this it gives me a file not found. When I don'tinclude the "?ID=sda" to the ASP page name it works fine. The problem is itis looking for a file with the "?ID=sda" as part of the file name. I couldprobably get around this by using cookies, but I would prefer not to haveto. I want to use 1 page as a general function page, and the resultspopulate fields in the Applet. If I have to use cookies how can I createcookies using Java in my Applet?Thanks,Eric Renken
 
Back
Top