Doooh! That's what I was trying to think of! Thanks for keeping me straight.
Tom Kochanowicz -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED] On Behalf Of Chris Pratt Sent: Friday, September 17, 2004 3:38 PM To: [EMAIL PROTECTED] Subject: Re: General strategy for determining current server, or specific for WebLogic? Is there a reason you're not just using request.getServerName()? (*Chris*) Original Message ----------------------- David, One way you could determine the server it is running on is to us the IP address. You could do this in a servlet of jsp. If this example doesn't go deep enough (actually getting the IP address or web address) ... you get the concept? String PREURI = request.getContextPath()+request.getServletPath().substring(0,request.ge tServletPath().lastIndexOf("/")); Tom Kochanowicz -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED] On Behalf Of Karr, David Sent: Friday, September 17, 2004 11:25 AM To: [EMAIL PROTECTED] Subject: General strategy for determining current server, or specific for WebLogic? I have a situation where an mbean needs to determine what server it is running on. The mbean is registered from a servlet. This application is running on WebLogic 8.1. I would have thought this was simple, but I can't figure out any way in the mbean or the servlet to determine the name of the host the code is running in. Is anyone aware of a general way to do this, or anything specific to WebLogic? ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.764 / Virus Database: 511 - Release Date: 9/15/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.764 / Virus Database: 511 - Release Date: 9/15/2004 ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.764 / Virus Database: 511 - Release Date: 9/15/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.764 / Virus Database: 511 - Release Date: 9/15/2004 ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html