Servlets & Servers
the content
// length is the length of the byte array
con.setDoOutput(true);
con.setDoInput(true);
con.setRequestMethod("POST");
con.setRequestProperty("Content length", String.valueOf(bytes.length));
// Write the parameters to the URL output stream
OutputStream out = con.getOutputStream();
out.write(bytes);
out.flush();
// Read the response
BufferedReader in = new BufferedReader(
                new InputStreamReader(con.getInputStream()));
   while (true) {
       String line = in.readLine();
       if (line == null) break;
       System.out.println(line);
   }
in.close();
out.close();
con.disconnect();
  
Phil Hanna
Author of Instant Java Servlets
http://www.philhanna.com
I am writing an application, using Java Servlets, which requires me to set and
read cookies. It works okay, but fails if I set the domain of the cookie to something
other than the current server.
I am writing an application, using Java Servlets, which requires me to set and read
cookies.
Using the servlet API, and the javax.servlet.http.Cookie class. 
I created a new cookie, and added it to the http response, using its addCookie()
method. It works okay, but fails if I use the setDomain method, on the newly created
cookie, to set the domain of the cookie to something other than the current server.
Answer:  I suspect that is not a legal operation for any browser to 
accept a cookie that has a domain inconsistent with the source
of the cookie.
by William Brogden
I am working on weblogic server 5.1 with MsSQLSERVER7 i am able to load the
driver but it says unable to get socket connection
I am working on weblogic server 5.1 with MsSQLSERVER7 i am able to load the
driver but it says unable to get socket connection.It says connect to the
MSSQLSERVER s host and port no.
How do I get these name and value.
Answer: The MS Sql Server s host is usually the name or ip of the server that run
SQL Server, if you know the IP (ping ), put the IP in it, it will be
file:///F|/a_jsite/350_tips/servlets_servers.htm (4 of 7) [2001 07 08 11:24:58]






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java web hosting

 

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved