• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

setDoInput() & setDoOutput()

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please tell me why should we use setDoInput() & setDoOutput() in making jdbs connection with applets(using Serializable) &servlets?
Thank You.
Jyotsna.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Friend
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
reply
    Bookmark Topic Watch Topic
  • New Topic