Often there is a html file in client , and upload a file to servlet. But I have a question, if I have a big file that want to upload a servlet by HttpURLConnection or other ,how to code in client?? PS:they are both java source code in client/Server.
It's easy. Write a servlet to catch the data coming from the client, then have the client open a URLConnection to that servlet and pass the data down the channel. A bigger problem is going to be the "sandbox". Java has safeguards to prevent applets from clandestinely opening the client's data files and passing them to an evil-intentioned server.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jul 12, 2001
Thanks for your answer~~~ I know that how to upload a file to servlet. But if have a sample code,is better~~~~~
"kaoalex", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.