|
|
| Author |
Message |
| c-2501 |
This post is not being displayed .
|
 c-2501 Scooby Slapper

Joined: 14 Feb 2006 Karma :   
|
 Posted: 23:03 - 04 Apr 2006 Post subject: any java programers out there? |
 |
|
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  ____________________ I am, therefor I are! |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Mrs Kickstart |
This post is not being displayed .
|
 Mrs Kickstart Brolly Dolly
Joined: 06 Apr 2004 Karma :  
|
 Posted: 18:17 - 05 Apr 2006 Post subject: |
 |
|
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 -- www.pepipoo.com |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| c-2501 |
This post is not being displayed .
|
 c-2501 Scooby Slapper

Joined: 14 Feb 2006 Karma :   
|
 Posted: 19:46 - 05 Apr 2006 Post subject: |
 |
|
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 |
|
You must be logged in to rate posts |
|
 |
| Mrs Kickstart |
This post is not being displayed .
|
 Mrs Kickstart Brolly Dolly
Joined: 06 Apr 2004 Karma :  
|
 Posted: 12:40 - 06 Apr 2006 Post subject: |
 |
|
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 -- www.pepipoo.com |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| c-2501 |
This post is not being displayed .
|
 c-2501 Scooby Slapper

Joined: 14 Feb 2006 Karma :   
|
 Posted: 15:12 - 06 Apr 2006 Post subject: |
 |
|
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  ____________________ I am, therefor I are! |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Mrs Kickstart |
This post is not being displayed .
|
 Mrs Kickstart Brolly Dolly
Joined: 06 Apr 2004 Karma :  
|
 Posted: 16:51 - 06 Apr 2006 Post subject: |
 |
|
Hey.
If I doing your homework handover over bribes
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 -- www.pepipoo.com |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| c-2501 |
This post is not being displayed .
|
 c-2501 Scooby Slapper

Joined: 14 Feb 2006 Karma :   
|
 Posted: 17:52 - 07 Apr 2006 Post subject: |
 |
|
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  ____________________ I am, therefor I are! |
|
| Back to top |
|
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? |
 |
|
|