web « Socket « Java Network Q&A

Home
Java Network Q&A
1.API
2.bluetooth
3.Client
4.connection
5.Cookie
6.Development
7.Email
8.File
9.ftp
10.http
11.HttpClient
12.https
13.ip
14.Network
15.OS
16.RMI
17.Security
18.Server
19.Socket
20.tcp
21.UDP
22.url
Java Network Q&A » Socket » web 

1. In Java a socket requesting a web page always times out    stackoverflow.com

I'm requesting a webpage with sockets like this:

Socket sock = null;
PrintWriter out = null;
BufferedReader in = null;

try {
    sock = new Socket( "www.overvprojects.nl", 80 );
    ...

2. How to write on web server in java    stackoverflow.com

HI I am having problem in java related to write on the web server from the client. I am using following code please help me where I am wrong For Server class

import ...

3. Server in web which allow test socket gathering info    stackoverflow.com

my question is quite hard to formulate. Well, is there any server in whole web which one would be able work with testing sockets? For example to send to server "somehow" and get ...

4. writting a chat program for a web site?    coderanch.com

hey guys was up.. i want to write a chat program for my web page. i know that i need to write a server/client program but im not sure on how to do this....is there any step by step tutorials out there or can some one email with and tell me how to actually do this thanx guy

5. HELP TO MAKE A WEB SERVER    coderanch.com

I HAVE TAKEN UP MAKING A WEB SERVER AS MY SEMESTER PROJECT BUT I AM FACING PROBLEM IN GETTING SUFFICIENT INFORMATION ABOUT IT. CAN ANYBODT HELP ME TO GATHER USEFUL MATERIAL WHICH CAN HELP ME OUT. ACTUALLY I WANT TO KNOW ABOUT A WEB SERVER FROM THE SCRATCH. HOW DOES THIS WORK,WHAT ARE THE MAIN FEATURES,WHAT ARE THE USES,HOW TO USE ...

6. Argent!!!!!!!!:Authenticating Web page hit    coderanch.com

Hi all I have an URL (say https://mycompany.com/download.exe) I want only authenticated users get this URL(This is actually an exe the user is trying to download) If I do application level authentication and redirect to the URL, then the user can see the URL and use it to download bypassing the authentication. Is these a way I can send the exe ...

7. Urgent: Socket problem when calling java function from Web Page    coderanch.com

Hi folks! I have found a java program that sends SMS (text message) alerts to mobile phones. Now, when I run this program on its own (i.e. through a main method), there are no problems. The message is sent correctly and the result code, indicating whether or not the message was sent and if not, why not is returned. However, when ...

8. Wanted: Minimal Web Server Example    coderanch.com

import java.io.*; import java.net.*; import java.util.StringTokenizer; final class Fileserver { public static void main( String[] args ) throws Exception { if( args.length < 2 ) printUsageAndExit(); int port = Integer.parseInt( args[0] ); String docRootName = args[1]; File docRoot = new File( docRootName ); if( !docRoot.exists() || !docRoot.isDirectory() ) { System.out.println( "Document root must be a directory that exists. Not starting..." ); ...

9. What is "semantic web"?    coderanch.com

10. How to implement Socket Chat in IIS web Server ????    coderanch.com

Attention pls Mr.Ravish Thanks for you iteresting response. But could u help further by tell ing teh reall steps needed to implemnt the Socket server. i.e pls let me know where should i put the my ChatAdminServer ,ChatClient(applet in html); do i have to get a Port from the Internet host .Becuase as such we dont have WEBSERVER for our company ...

11. Trouble in reading chunked Response from a web server    coderanch.com

Team , As you know, web servers adhering to Http 1.1 , can respond with chunked messages. This means that response from a web server can appear at the other side in chunks. Each chunk will have its own content length and content. It seems that Java Http Url Connection InputStream doesn't handle the chunked response. Though ACME provides classes to ...

12. Name of Web Server?    coderanch.com

13. are there any free java web servers    coderanch.com

14. Reading XML from Web    coderanch.com

Hi All, I need your help to solve a problem related to parsing XML Stream. We have an application which reads data in form of XML over HTTP.Earlier , I was using parse method of DocumentBuilder , something like document = builder.parse(PULL_URL); But every now and then , it hands at this line i.e. at parse method. I read good words ...

15. Read Text Web Page    coderanch.com

Here's some code I use. This gets the site content into a string. You may have to parse it to find what you want. public String fetchURL( ) throws SiteException { URL lURL; String lLine; StringBuffer lBuffer = new StringBuffer(); try { // 07/17/2002 JLS Added following statements to handle HTTPS java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); // 07/17/2002 end lURL = new ...

17. Simple Web Server    coderanch.com

Hi, I am trying to make a simple web server. I finally make a succesfull conection an server by a browser and the handling of GET methods works perfectlly! When i put on a browser http://localhost:80 i take my 'index.html' that i wanna take... All these are good until now... I want to develop more my simply server. Until now GET ...

19. listen to a web server port    coderanch.com

Only one listener can bind to a port at any time. In your case that listener is Tomcat. You can either write a proxy server to intercept requests (i.e. listen to port 8000, have people connect there, get their information and forward requests to port 8080) or work within Tomcat's framework. It's a pretty full-featured web server. I'd be surprised if ...

20. where can I find an example to use socket to read a web page?    coderanch.com

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - ...

21. Rendering dynamic web content    coderanch.com

The code for the Web Server is as such: import java.lang.*; import java.net.*; import java.io.File; import java.io.IOException; class Server { ThreadForTrans theThread; public static void main( String args[] ) { try { IO.Trace("STATE", "Web server 0.301" ); if ( args.length == 2 ) { int port = Integer.parseInt( args[0] );// Port number IO.Trace("STATE", "Base of file system : " + args[1] ...

22. Using a Java app for web page scraping.    coderanch.com

I'm gathering some data from a site using the HTMLEditorKit. The first page works all well and good, but from that page I get URLs that lead to me other pages that require a login. Normally my browser (Firefox) handles this so I don't have to sign in each time, but how do you do this using what Java has available? ...

23. Can snmp4j capture packet from web?    coderanch.com

24. Web page size calculation    coderanch.com

I dont think it is all that simple. You would have to recognize all the ways that the base HTML page can refer to resources from CSS to images and imported javascript. I actually tried to write a general web page analyzer that captured all the parts separately - HttpClient is certainly the way to go. Bill

25. retrieve images from the web    coderanch.com

Yes it is a bad idea. I have now added the System.out.println to each of them to see what error was caught. Going back to the images, so i will not only be have to call for the html file but the images the server uses?? any ideas on how to do it please

26. web server    coderanch.com

Hi I built a web server which outputs HTML. Now when i run it and call for the HTML on Internet Explorer the HTML is viewed, but when i call on Firefox no HTML is outputted... why is that??? here is the source code: package myservertrial1; package myservertrial1; /** * * @author marie-jose */ import java.net.*; import java.io.*; import Proxy.Proxy; public ...

27. GET html contents from a web server    coderanch.com

hi i am building a program to get the contents of html on an http website. The code is found below: //Get details of the url (RequestTrial) I would like to connect to //The 'RequestTrial' stands for the url, example, www.yahoo.com url = new URL(RequestTrial); String getHost = url.getHost(); int getPort = url.getPort(); if (getPort == -1) { ...

28. trouble retrieving html of all web sites    coderanch.com

Hey I am using low-level sockets to send a GET message to a Web server to retrieve the HTML content and plaxe it into a file. I am managing to do so with some websites for example http://www.naturenet.com But for some other websites such as http://www.google.com or yahoo's website it either tells me that the object moved or that it doesn't ...

29. why this web page cannot be crawled?    coderanch.com

I was trying to use an opensource web crawler "WebSPHINX" to crawl all the subwebpages of the url "http://www.kompass.com/guide/extraction-industries/services/GSENWW510109.html".however I failed to get any of its subwebpages. from the url I believe it is not a dynamic webpage. so could anyone tell me why subpages of this url cannot be crawled? I have tried other ready to use crawler(such as jobo,teleport ...

30. Manipulating static web pages to get dynamic results!    coderanch.com

I am using apache httpResponse and other API from org.apache.http to login into a secured web page by providing my ID/Password. The resultant page is getting stored in a folder as a static (.html) file Now, my aim is actually to go to a particular link on that web page and then another on result page and so on. Is there ...

31. Webstart subdomain socket permissions    coderanch.com

Hi! Before I get around to testing it out, I was wonder if anyone knew if I could use a webstart application to communicate with a subdomain that it came from without granting it socket permissions. Another way to phrase it, you know how it can communicate to the server (via a socket) that it is coming from without said permissions, ...

32. Mini Web Server: where the results appear in this case    coderanch.com

import java.io.*; import java.net.*; // javac TCPServer.java java TCPServer http://localhost:6789/new.html class TCPServer { public static void main(String argv[]) throws Exception { String clientSentence; ServerSocket welcomeSocket = new ServerSocket(6789); while(true) { Socket connectionSocket = welcomeSocket.accept(); BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream( ) ) ); clientSentence = inFromClient.readLine(); System.out.println("RECEIVED FROM CLIENT : " + clientSentence + "\n"); } } }

33. Read web page content via Sockets    forums.oracle.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.