Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!

Matt Howard

Greenhorn
+ Follow
since Jun 25, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Matt Howard

Can anyone think of an easy way to get my local IP Address for a specific network connection? I use several VPN's throughout the day, and when I sign on they change all my routes to send all traffic through them. So I run a batch file (I'm on Win 2K)with 2 lines like:
route change 0.0.0.0 MASK 0.0.0.0 222.22.2.2
(send all requests to my primary gateway)
route add 10.17.0.0 MASK 255.255.0.0 10.17.1.2
(only send requests to a 10.17 network through my VPN)
Well that's all fine and dandy except every time I sign on to the VPN I get a different address (10.17.1.2, 10.17.1.3 ...). I'd like to write a simple class to make the connection, get the IP Address assigned by that connection and then change the routes accordingly. I've tried java.net.InetAddress.getLocalHost() but that only returns my primary address. Is there any way to get an array of all the local IPs?
The only thing I can think of is to use Runtime to execute an ipconfig, and parse the results with a regex or something. Any ideas would be much appreciated.

the document.open() and close() methods should replace the existing document.
I use reguar expresssions for stuff like that...
Using that with String.prototype would be the best, but how is browser support for editing the prototype? I've only used it fo IE...
[ August 08, 2002: Message edited by: Matt Howard ]
Well, with the release of CFMX ColdFusion will be entirely based on Java. All cfml pages will be compiled into Servlets (just like JSP's) and you will be able to call JSP tag libraries from cfml. I'm a CF developer foaming at the mouth for the opportunity to upgrade to MX and move my business logic out of cfml and into beans.
I'd check out Macromedia.com for some good info about CFMX... you'll probably be able to convince clients that the transition isn't really much of a transition anyway. You may even find a way to use CF for some of them without really moving away from Java. The benchmarks look like CFMX is very stable, too.
Does anybody have any suggestions for a good database for an e-commerce web app? I don't need anything that will handle millions of records (I'm anticipating the DB won't grow beyond 200 MB anytime soon), but I'd like it to support things like transactions, stored procs, triggers... I'm looking at deploying on Solaris 8 (or 9), but my development env is WinXP, so I'd like something that would make the transition smoothly.
Cloudscape seemed like it would work, but I was informed by a sales person at IBM that they don't know how to sell anything to individuals or small businesses, only large corporations (well, not so much in those words.. :roll: ). So I thought about mySQL, but it doesn't support stored procs or triggers. I may look at Daffodil, but I'm worried I'll need to fork over too much $$ to have a decent number of concurrent connections.
Am I asking too much? All I want is an inexpensive, stable, feature-rich database! And it wouldn't hurt if it were platform-independent, scalable and low-maintenance...
I'm asking too much, aren't I?
I had the same problem, and after mucking through a bunch of out-dated links I found a message board saying that the version of cloudscape that came with the J2EE download was buggy. Go to cloudscape.com (it'll take you to IBM) and click on downloads. Grab the "Cloudview for 4.0 J2EE". Hope this helps.
I also needed to reconfigure my firewall to allow any requests from 127.0.0.1, which you may want to check if you're running one. I'm not sure which port it uses, though.
Actually, I had started to write an ftp client and decided to look around and see if anyone else had written one. I found the same package you have, but I haven't had the chance to put it to use yet. I read through all the source code, and it does look pretty good, although I want to use it to create an "interruptable" ftp stream so I can grab a file(s) as the connection is available. I'll probably need to add a little bit to the enterprisedt package. I'll let you know how it works out.
It looks like a very simple package to use... I like that it has support for both active and passive ftp.
17 years ago
Well, they won't see the JSP code if they view source- they can only see the HTML that has been produced. I don't know of any way to completely prevent a user from viewing the html & javascript.
In IE, you can disable right-clicking by setting document.oncontextmenu = new Function("return false;"); This won't disable the View > View Source menu option, and I'm not sure about Netscape.
If you open a window (with document.open), you can specify that the new window should not have a menubar or toolbar.
I'm not sure if any of that really gets at what you want. Do you really have html and javascript that you don't want users to see?
17 years ago
Thanks... that makes sense. RMI will probably work out best anyway because I'd be able to administer the service from virtually anywhere, not just the machine it is running on.
17 years ago
I get the feeling that I'm missing something obvious here, but I can't seem to figure out how I would create an interface to administer something like a web server. For example, suppose I have a simple web server listening on port 8888. If I want an interface to control that service (maybe start/stop it or change the default document root...), is there a way to somehow get a reference to that service object?
The only thing I can think of is to create a handle to the service when it is instantiated and then serialize that. Then when I start the UI, I could read that handle back in.
I guess the short question is how do I have 2 applications running in 2 instances of the JVM communicate with each other?
17 years ago