Hopbot log for 2007-08-23 - Helma IRC channel: #helma on irc.freenode.net

2007-08-23:

[12:51] <mho> hey, hat jemand ein beispiel wie des jala/listrenderer funktioniert?
[15:59] <msimoni> does anyone know a good way to find your own IP address from a Java/Helma app?
[16:00] <msimoni> I can get the IP by broadcasting a packet to myself, but it seems stupid: http://helma.pastebin.com/f764a0303
[16:00] <msimoni> (I'm broadcasting, because if i unicast, the sender address of the packet is 127.0.0.1)
[16:04] <earl> msimoni: java.net.InetAddress#getLocalHost
[16:05] <earl> which may be borked in some cases and certainly does not work with multi-homed hosts
[16:07] <earl> the "more proper" way is to walk thru java.net.NetworkInterface#getNetworkInterfaces and do #getInetAddresses for each
[16:08] <msimoni> earl: thanks --- java.net.InetAddress#getLocalHost returns 127.0.0.1 but I will check out the NetworkInterface
[16:10] <msimoni> hm, then I only have to decide which interface to take ;)
[16:10] <earl> yep :)
[16:18] <msimoni> Is there a way to find the HTTP port at which Helma is running?
[16:19] <msimoni> (I'm testing with multiple Helmas on one machine.)
[16:30] <earl> hm, as far as i can tell from the sources, i fear not
[16:31] <earl> what about configuring those things in app.properties?
[17:03] <msimoni> earl: then I'd have to keep track of the port in start.sh AND app.properties
[18:26] <earl> msimoni: i think you can set the port also via server.properties
[18:27] <earl> still, you'd have to keep track of it in server.props and app.props, then ;)
[18:29] <earl> ah, yes
[18:29] <earl> webPort in server.properties
[18:29] <earl> and in javascript you should be able to acess this via the global app variable (app.properties)
[18:30] <earl> at least if http://helma.zumbrunn.net/reference/core/app.html#properties is correct: "Map of any specified application or server properties"
[18:37] <msimoni> earl: great, setting webPort in server.props and commenting it in start.sh works!
[18:37] <msimoni> plus accessing it via app.properties.webPort, too
[21:41] <rjb> hey, i didn't know that jdk1.6 already comes with a rhino built in ;-)
[21:42] <rjb> (rhino 1.6r2 is fairly old though, isn't it?)
[21:44] <rjb> http://java.sun.com/javase/6/docs/technotes/tools/share/jrunscript.html
[21:49] <rjb> $ jrunscript -q
[21:49] <rjb> Language ECMAScript 1.6 implemention "Mozilla Rhino" 1.6 release 2
[21:50] <rjb> also of interest: http://java.sun.com/javase/6/docs/technotes/tools/share/jsdocs/index.html
[21:57] <rjb> (note the spello "implemention", heh)

 

 

In the channel now:

Logs by date: