Set URL of another Sever | Download Server homepage

To implement in java program
Set the URL of another server
Download the Home page of the Server CS1404 INTERNET PROGRAMMING LABORATORY
Start the program for Home page of the server
Declare the argument in the main function for the passing URL
Get the argument in the variable then assign the URL to that variable
Through the while loop get the data and display
Terminate the program for home page of the server
Source Code Java Program for Download the Home Page of the Server in
public class ViewSourceUrl {
public static void main (String[] args) {
if (args.length > 0) {
try {
URL rl = new URL(args[0]);
InputStream in = rl.openStream( );
in = new BufferedInputStream(in);
Reader r = new InputStreamReader(in);
int c;
while ((c = )) != -1) {
System.out.print((char) c);
catch (MalformedURLException er) {
System.err.println(args[0] +
" is not a parseable URL");
catch (IOException er) {

When you compile you must pass the augment in the command mode
Compile the program for Set URL of another Sever Download Server homepage
Javac ViewSourceUrl
Run the program

Set URL of another Sever  Download Server homepage


Aiden Thomas said...

Thanks for this informative blog. These is also a really informative website where you can share your opinions and a lot of good projects and e-Books available for NCERT, MBA, BBA, MCA, BCA and B.Tech students. Interview Tips and study materials are also available. Do check it out........