Re: Can a java program know what kind of server it is running on?
Lew wrote:
...
In practice, I've seen reliance on a vendor-defined string reach back and bite
the team.
This entire thread has me thinking if the very faulty
JavaScript based 'browser sniffing' that some JS/web
developers rely, rather than the very effective 'feature
detection' that should be used.
In Java it would probably come down to asking
for any particular feature expected to be unique
to some servers, when it is needed*, within an
appropriate try/catch construct.
* If it might be asked for often, probably best to
cache the result and use that for the run.
But all this is relatively up in the air until we find out
why the OP thinks it is necessary or advantageous
to know one flavor of vanilla from another.
Like people have been stressing, it should not
really matter to the web app. itself, what server
it is running on.
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200709/1