[Logo]
Forums Register Login
how to upload file using put in java
i want to upload a file using put but its giving mew output like this
run:
OK
98
47
104
111
--- (TimM: deleted hundreds of lines)
115
116
115
39
44
1010
41
BUILD SUCCESSFUL (total time: 0 seconds)
Why are you printing out those numbers? I don't see how they're relevant (and I'm going to delete most of them now, as they provide no insight, and take up lots of space).
Also, I've added code tags to your first post. See how much better it looks? Please do that in the future when posting code of any length.
thanks tim for the format and I'm printing the response code but file is not uploading to the web server
Those are not just the response codes - almost all of it is the output from line 46 - which is irrelevant for the purposes of uploading.

I see that in lines 36/37 you are suppressing an IOException without so much as printing a stack trace - how will you what problems there are? Don't ever do that.
(1 like)
 

I'm printing the response code


Those printed values look like the int values for ASCII characters.  Try casting the values that were read to char  to see what the contents of the server's response was:
thanks norm You save my day awsum
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 267 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jan 18, 2018 06:57:17.