aspose file tools*
The moose likes Servlets and the fly likes dynamic link for internet and intranet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "dynamic link for internet and intranet" Watch "dynamic link for internet and intranet" New topic
Author

dynamic link for internet and intranet

mark fritschen
Greenhorn

Joined: Jul 26, 2001
Posts: 2
Hi I use a dynamic include for my top "header" (by header I mean many urls that pertain to either internal or external users) of my web page, and I use
String agent = request.getRemoteAddr();
......
to get either a intranet header or internet header,
but, if inside the body I have a link that I want to go to either internet or genet users when it is clicked.
What would be the best way to do this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

Well, there's no absolute answer for that, since your "intranet" can be implemented as a WAN over the Internet. In practice, depending on how things are mapped, you might be able to test the incoming ip address, or failing that, the domain name of the incoming request.


Customer surveys are for companies who didn't pay proper attention to begin with.
Sam Dalton
Author
Ranch Hand

Joined: Jul 26, 2001
Posts: 170
Create a custom tag that you pass the URLs to (to intranet URL and the internet URL).
This URL can test the ip address and output the correct URL for the user. Better still put the URL in a scripting variable and use that on the page.
For more help on Tags and Scripting variables, check ot the JavaOne presentations on my website (www.samjdalton.com)
S


<a href="http://www.samjdalton.com" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of [http://www.amazon.com/exec/obidos/tg/detail/-/1590592255/qid=1068633302//ref=sr_8_xs_ap_i0_xgl14/104-4904002-9274339?v=glance&s=books&n=507846]Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861007701/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/186100561X/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic link for internet and intranet
 
Similar Threads
Portlet for an internet application
login and jsp
Extranet
Oracle License issue
redirect a response to a intranet page