| Author |
setDoInput() & setDoOutput()
|
Friend
Ranch Hand
Joined: Nov 23, 2000
Posts: 67
|
|
Please tell me why should we use setDoInput() & setDoOutput() in making jdbs connection with applets(using Serializable) &servlets? Thank You. Jyotsna.
|
 |
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
|
|
Did you know. . . that there are over 2500 classes released with Java 2 and each of those have MANY methods. Would you do a favor for us poor under-enlightened folks and give us a clue as to what class these methods are in. Then we might stand a chance of figuring out what you might want to use them for.
|
"JavaRanch, where the deer and the Certified play" - David O'Meara
|
 |
Friend
Ranch Hand
Joined: Nov 23, 2000
Posts: 67
|
|
The following code is used to include the methods which I asked earlier to you "setDoInput() & setDoOutput()". private URL url; URLConnection ucon; Uconnection(String Serv) { try{url=new URL("http://localhost:8080/servlet/"+Serv); ucon=url.openConnection(); ucon.setUseCaches(false); ucon.setDoOutput(true); ucon.setDoInput(true); Now can you identify? or eable to understand my doubt? Then please give the solution. Thank you Jyotsna.
|
 |
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
|
|
setDoInput
public void setDoInput(boolean doinput) Sets the value of the doInput field for this URLConnection to the specified value. A URL connection can be used for input and/or output. Set the DoInput flag to true if you intend to use the URL connection for input, false if not. The default is true unless DoOutput is explicitly set to true, in which case DoInput defaults to false. Parameters: doinput - the new value.
From: http://java.sun.com/j2se/1.3/docs/api/java/net/URLConnection.html#setDoInput(boolean)
|
 |
 |
|
|
subject: setDoInput() & setDoOutput()
|
|
|