Neet to pass in the IP address of the HTTP server to my applet.

I do not want to hard code the IP address of the HTTP server into my html page. How can I provide this value dynamically?
LVL 2
dhymesAsked:
Who is Participating?
 
brunoConnect With a Mentor Commented:
Are you using ASP?


<%=request.servervariables("REMOTE_HOST")%>


BRUNO
0
 
CJ_SCommented:
Why do you need that? Why don't you just use relative paths?

<img src='images/myimage.gif'>

Regards,
CJ
0
 
dhymesAuthor Commented:
What would a relative path have to do with obtaining the IP address of the http server? Anyway, it is looking like this can't be done with straight html.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
aryuminCommented:
If you can use SSI directives in your html pages, use
<!-- #echo var="LOCAL_ADDR" -->
0
 
brunoCommented:
>>. How can I provide this
value dynamically?


>>Anyway, it is
looking like this can't be done with straight html.



those two things contradict.  I provided you a way to do it dynamically, which is what you asked for.  

If you want a way to do it with NO server side scripting language, or DHTML, that will not be possible I don't think.....


BRUNO

0
 
dhymesAuthor Commented:
I was hoping that I would not need any server-side scripting tools, but since HTP only passes static pages I guess scripting would be the only way.

So now the question becomes, does IIS provide server-side scripting (ASP) by default or will I need to install or setup additonal software in additon to IIS?
0
 
dhymesAuthor Commented:
I was hoping that I would not need any server-side scripting tools, but since HTP only passes static pages I guess scripting would be the only way.

So now the question becomes, does IIS provide server-side scripting (ASP) by default or will I need to install or setup additonal software in additon to IIS?
0
 
aryuminCommented:
IIS5 (Windows 2000) does, for NT 4 you need to install NT Option Pack.
If you have IIS3 (Windows NT4 + SP3 or above) you may use SSI directives without any upgrade.
Open regedit, go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters
and check the following:
1. The ServerSideIncludesEnabled key exists and set to 1 (REG_DWORD)
2. The ServerSideIncludesExtension key exists and set to .stm
For enable SSI directives rename your file to .stm or change the value of a corresponding key in registry.
0
 
brunoCommented:
more info on the way that aryumin proposed...

http://www.bignosebird.com/sdocs/echo.shtml


BRUNO
0
 
COBOLdinosaurCommented:
To close this out, I will be making a recommendation to CS
in about a week.  I would appreciate any comments from the
participants on how it should be disposed of.

Cd&
0
 
COBOLdinosaurCommented:
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
split brunobear and aryumin

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
0
 
Computer101Commented:
Points split for a split between experts.

aryumin, a question for you in this topic area.

Thank you
Computer101
Community Support Moderator
0
 
brunoCommented:
thank you.  :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.