Resend my activation email : Register : Log in 
BCF: Bike Chat Forums


any java programers out there?

Reply to topic
Bike Chat Forums Index -> The Geek Zone
View previous topic : View next topic  
Author Message

c-2501
Scooby Slapper



Joined: 14 Feb 2006
Karma :

PostPosted: 23:03 - 04 Apr 2006    Post subject: any java programers out there? Reply with quote

ok basicaly the problem is this;
i have to create a java program that will access and run the URL of a script the way puting the url into a web browser would
heres what i have so far:
Code:

import java.net.*;
import java.io.*;

public class main{
   public static void main(String[] args){
      
      try{
         URL light1 = new URL("http://<IP goes here>?<path>\\<path>.<blah>?ea2_1");
         URLConnection light1connection = light1.openConnection();
      }
      
       catch (MalformedURLException e) {   
       
       System.out.println("bad URL");
   
      }
       catch (IOException e) {             
          
          System.out.println("bad connection");
          
      }
   }
}


the prog compiles without errors and seems to be properly opening the connection, im unsure where to go from here though, as the script does not seem to be run by this code alone.

any ideas what im missing here Question
____________________
I am, therefor I are!
 Back to top
View user's profile Send private message You must be logged in to rate posts

Mrs Kickstart
Brolly Dolly



Joined: 06 Apr 2004
Karma :

PostPosted: 18:17 - 05 Apr 2006    Post subject: Reply with quote

Hi,

You need to set up the http connection, I have some code that does it but I am not at work until Monday. I post it then if you are strill stuck

Regards
C
____________________
Help fight the safety camera partnerships Twisted Evil -- www.pepipoo.com
 Back to top
View user's profile Send private message You must be logged in to rate posts

c-2501
Scooby Slapper



Joined: 14 Feb 2006
Karma :

PostPosted: 19:46 - 05 Apr 2006    Post subject: Reply with quote

thanks, glad someone replied.

heres a better example url https://xxx.xxx.xxx.xxx/cgi-bin/camctrl.cgi?move=left

sorry to nag, but i need this kinda urgent, could you post a link to a useful tutorial or something, its difficult to search when your not sure what your looking for :/
____________________
I am, therefor I are!
 Back to top
View user's profile Send private message You must be logged in to rate posts

Mrs Kickstart
Brolly Dolly



Joined: 06 Apr 2004
Karma :

PostPosted: 12:40 - 06 Apr 2006    Post subject: Reply with quote

Hi,

Here is a version of the code but not the final copy, I cant get that till next week but I think this worked it is slightly different between HTTP and HTTPS. _repsonse has the page in it

HTH

C
____________________
Help fight the safety camera partnerships Twisted Evil -- www.pepipoo.com
 Back to top
View user's profile Send private message You must be logged in to rate posts

c-2501
Scooby Slapper



Joined: 14 Feb 2006
Karma :

PostPosted: 15:12 - 06 Apr 2006    Post subject: Reply with quote

it worked \o/ thanks you know how many java forums i posted on and didnt get a responce nearly as good as this

i might actually have a chance of passing this module now Very Happy Thumbs Up
____________________
I am, therefor I are!
 Back to top
View user's profile Send private message You must be logged in to rate posts

Mrs Kickstart
Brolly Dolly



Joined: 06 Apr 2004
Karma :

PostPosted: 16:51 - 06 Apr 2006    Post subject: Reply with quote

Hey.

If I doing your homework handover over bribes Laughing

Its not a well documented feature, to get it working in HTTPS it took a few days of playing but it has been useful code since.

I am usually to idle to read the instructions and mess, my boss read the instructions but wont mess, we kind balance each other out.

Hope you do pass, what are trying to do ?

Regards
C
____________________
Help fight the safety camera partnerships Twisted Evil -- www.pepipoo.com
 Back to top
View user's profile Send private message You must be logged in to rate posts

c-2501
Scooby Slapper



Joined: 14 Feb 2006
Karma :

PostPosted: 17:52 - 07 Apr 2006    Post subject: Reply with quote

its a crappy uni project, i have to build a control panel for a 'smart house' connected to the internet.

but judging by the job ive done im going to have the pleasure of doing it all again next year when im forced to retake the whole year Sad
____________________
I am, therefor I are!
 Back to top
View user's profile Send private message You must be logged in to rate posts
Old Thread Alert!

The last post was made 19 years, 320 days ago. Instead of replying here, would creating a new thread be more useful?
  Display posts from previous:   
This page may contain affiliate links, which means we may earn a small commission if a visitor clicks through and makes a purchase. By clicking on an affiliate link, you accept that third-party cookies will be set.

Post new topic   Reply to topic    Bike Chat Forums Index -> The Geek Zone All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Read the Terms of Use! - Powered by phpBB © phpBB Group
 

Debug Mode: ON - Server: birks (www) - Page Generation Time: 0.06 Sec - Server Load: 0.54 - MySQL Queries: 13 - Page Size: 52.58 Kb