🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.language
4 messages
4 total messages Started by Jeff Wed, 13 Jul 2005 18:04
ReferrURL\RedirectPage
#403
Author: Jeff
Date: Wed, 13 Jul 2005 18:04
17 lines
1606 bytes
The index page of one of my websites is set as the starting document in 
IIS.  I have another website the user has to log into and if the login 
is valid I redirect them to this site.  I only want this site to be able 
to be opened from my other website.  Does anyone have the code to do 
this?  I was going to use the following java script in the index page, 
but not sure if this was correct, and not sure how to redirect back to 
the website that called it.  Someone mentioned using a server side 
method for this.

<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">

if   (document.referrer != "http://www.mysite/launch.html")
       location.href = "";

</SCRIPT>

TIA
Re: ReferrURL\RedirectPage
#405
Author: Paul Nichols (TeamB)
Date: Sat, 16 Jul 2005 15:28
7 lines
1226 bytes
"Jeff" <jbarr62307@worldnet.att.net> wrote in message
news:42d557d1@newsgroups.borland.com...
> The index page of one of my websites is set as the starting document in
> IIS.

You stated you were using IIS.. Are you using a servlet container as well?
Re: ReferrURL\RedirectPage
#407
Author: Jeff
Date: Sun, 17 Jul 2005 01:51
24 lines
1909 bytes
Paul:

The java web application was purchased by my client from another 
company.  I am new to java so I am trying to figure out the best 
approach for this. As fae as I can tell there is not any servelts with 
the application.  Currently I have a login page on an ASP.NET site where 
I validate the users login\password and if they are valid, I call the 
index page page of the java web app.  Everything is working, but we need 
to allow the java web site to be opened only from the ASP.NET page.  Any 
suggestions?

TIA

Paul Nichols (TeamB) wrote:
> "Jeff" <jbarr62307@worldnet.att.net> wrote in message
> news:42d557d1@newsgroups.borland.com...
> 
>>The index page of one of my websites is set as the starting document in
>>IIS.
> 
> 
> You stated you were using IIS.. Are you using a servlet container as well?
> 
> 
Re: ReferrURL\RedirectPage
#410
Author: Paul Nichols [TeamB]
Date: Fri, 22 Jul 2005 15:03
33 lines
2746 bytes
"Jeff" <jbarr62307@worldnet.att.net> wrote in message
news:42d9b99c$1@newsgroups.borland.com...
> Paul:
>
> The java web application was purchased by my client from another
> company.  I am new to java so I am trying to figure out the best
> approach for this. As fae as I can tell there is not any servelts with
> the application.  Currently I have a login page on an ASP.NET site where
> I validate the users login\password and if they are valid, I call the
> index page page of the java web app.  Everything is working, but we need
> to allow the java web site to be opened only from the ASP.NET page.  Any
> suggestions?
>
I would do this only via a POST method in your form, or by encoding a
C#/VB.NET (or whatever)
request method (something akin to RequestDispatcher in Java), and pass a
param to the Java page that must be in some type of valid range. If it is
invalid (aka because the page attempt access was outside the parameter),
then throw a page inmforming user of invalid access.

Of course another way is to have the .NET app write to a file somewhere and
place a value into the file. Modify the Java app to look for this file or a
setting in this file. If the value is absent (say a SessionID), then the
Java page will not be opened and an access denied page displayed instead,
informing the user they must login.

Of course, if you really want to get fancy, you could pass an Ajax request
from Java Script as an XML file to the Java app, and check for the value. Or
use a Web Service, etc.

The easiest method would be suggestion one and two above. Of these the file
method would be the most secure.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads