Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Filtering JSP page based on client IP

Reply
Thread Tools

Filtering JSP page based on client IP

 
 
Mich
Guest
Posts: n/a
 
      01-11-2007

"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Mich wrote:
>> Because of local content rules I have to make some website pages
>> unavailable
>> for browsers in Canada. ...

>
> As an aside. What content would be *not* allowed
> in Canada, but *allowed* in other places?
>
> I never got the impression of the Canadians as being
> overly keen on censorship, and thought they were
> more permissive than (for e.g.) their neighbours
> immediately "south o' the border".
>
> Andrew T.



In this case it's just a 'problem' with some product descriptions. The
products themselves aren't even sold in Canada, but since the company is
based in Canada a gov official has sent as letter arguing about that. It's
most likely that the gov decision is illegal, but blocking access from
Canada solves the problem.



 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      01-11-2007
Mich wrote:
> "Andrew Thompson" <(E-Mail Removed)> wrote in message

...
> > As an aside. What content would be *not* allowed
> > in Canada, but *allowed* in other places?

.....
> In this case it's just a 'problem' with some product descriptions. The
> products themselves aren't even sold in Canada, but since the company is
> based in Canada a gov official ..


*

>...has sent as letter arguing about that. It's
> most likely that the gov decision is illegal, but blocking access from
> Canada solves the problem.


* gov. officials, riiiIIiight!! You should have said so in
the first place. Only a (nasty, officious, small minded,
power hungry, sediment feeding & scum-sucking)
government official could prompt such a silly situation.

I say go for the 'I am not Canadian' click-thru*, since
I feel it shows the correct level of contempt for such
officialdom (of course, your lawyers may advise
otherwise).

* I think the term for it is 'plausible deniability'.

Andrew T.

 
Reply With Quote
 
 
 
 
Mich
Guest
Posts: n/a
 
      01-11-2007

"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Mich wrote:
>> "Andrew Thompson" <(E-Mail Removed)> wrote in message

> ..
>> > As an aside. What content would be *not* allowed
>> > in Canada, but *allowed* in other places?

> ....
>> In this case it's just a 'problem' with some product descriptions. The
>> products themselves aren't even sold in Canada, but since the company is
>> based in Canada a gov official ..

>
> *
>
>>...has sent as letter arguing about that. It's
>> most likely that the gov decision is illegal, but blocking access from
>> Canada solves the problem.

>
> * gov. officials, riiiIIiight!! You should have said so in
> the first place. Only a (nasty, officious, small minded,
> power hungry, sediment feeding & scum-sucking)
> government official could prompt such a silly situation.
>
> I say go for the 'I am not Canadian' click-thru*, since
> I feel it shows the correct level of contempt for such
> officialdom (of course, your lawyers may advise
> otherwise).
>
> * I think the term for it is 'plausible deniability'.
>
> Andrew T.


What I am thinking of doing is to post a disclaimer such as "This product
description does not apply to Canadian residents." I will add a link such
as "Canadian Product Description" that will go to a page that explains why
there is no product description. I might even add a link to bring up an
email that will be sent to the government department and perhaps flood them
....



 
Reply With Quote
 
Mich
Guest
Posts: n/a
 
      01-11-2007

"Lew" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Mich wrote:
>>> Because of local content rules I have to make some website pages
>>> unavailable for browsers in Canada. Since I am in Canada and I obviously
>>> need to view those pages I need some code such as

>
> Nigel Wade wrote:
>> The first thing you need to determine is what you mean by "browsers in
>> Canada".
>> Do you mean the location of the computer which is executing the code for
>> the
>> browser, or perhaps a proxy which is downloading your page on behalf of
>> the
>> browser, or where the browser window is actually being displayed and
>> presumably
>> where a "user" is located.
>>
>> Each could be in an entirely different country. So you need to ask
>> yourself if
>> what you are trying to do is either achievable, or meaningful.

>
> What about a cellphone registered to a non-Canadian location but used
> whilst in Canada? or vice versa?



Good point, and it seems that the whole thing is not very practical ... But
I would think that being able to filter out the vast majority of visists
would be enough (I hope!!)


 
Reply With Quote
 
Mich
Guest
Posts: n/a
 
      01-11-2007

"bjeremy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>
> Mich wrote:
>> Because of local content rules I have to make some website pages
>> unavailable
>> for browsers in Canada. Since I am in Canada and I obviously need to view
>> those pages I need some code such as
>>
>>
>> if(IP==canada) {
>> if(IP!=my IP) {
>> This page is not available in Canada
>> }
>> }
>>
>>
>> I did a Google search on this and everything I found was about filtering
>> the
>> complete website; and I would really like to be able to do this for
>> individual pages.
>>
>>
>> Any help would be very appreciated!

>
> This rant won't solve your problem, but this kind of stuff needs to be
> done at the l4 layer with a Firewall service. It really is unreliable
> to try and solve it at an application layer level. Also, just knowing
> the IP address really will not help all that much, since I can be
> located inb Canada and use a proxy server in Minnesota in order to get
> your page in canada...


Exactly ... but I would think that in my situation being able to block most
connections from Canada would be enough to fulfil the 'legal' requirements.
It would be like a product not being sold in Canada, but that would not
prevent someone from buying it in Vermont and then bringing it into Canada.




 
Reply With Quote
 
Chris Uppal
Guest
Posts: n/a
 
      01-11-2007
Mich wrote:

> Good point, and it seems that the whole thing is not very practical ...
> But I would think that being able to filter out the vast majority of
> visists would be enough (I hope!!)


Presumably the important point is that you have made a "best effort" to avoid
pressing your nefarious product descriptions upon the unfortunate citizens of
Canada.

I have no idea whether that would satisfy legal requirements as regard your
(potential) dispute with the government, but there is also the issue of your
responsibility to share holders, etc. They might want to reduce the chance of
a dispute with the government in the first place, or their exposure should the
dispute actually occur (and be lost).

BTW, have you sorted out the technical half of your problem -- how to get the
client's IP address ?

-- chris


 
Reply With Quote
 
bjeremy
Guest
Posts: n/a
 
      01-11-2007

Mich wrote:
> "Andrew Thompson" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
> > Mich wrote:
> >> Because of local content rules I have to make some website pages
> >> unavailable
> >> for browsers in Canada. ...

> >
> > As an aside. What content would be *not* allowed
> > in Canada, but *allowed* in other places?
> >
> > I never got the impression of the Canadians as being
> > overly keen on censorship, and thought they were
> > more permissive than (for e.g.) their neighbours
> > immediately "south o' the border".
> >
> > Andrew T.

>
>
> In this case it's just a 'problem' with some product descriptions. The
> products themselves aren't even sold in Canada, but since the company is
> based in Canada a gov official has sent as letter arguing about that. It's
> most likely that the gov decision is illegal, but blocking access from
> Canada solves the problem.


Ahh... this just proves my conspiracy theory that the Canucks are
keeping all the good hockey skates for themselves, while selling us
Americans the cheap knock-offs....

 
Reply With Quote
 
Mich
Guest
Posts: n/a
 
      01-11-2007

"Chris Uppal" <(E-Mail Removed)-THIS.org> wrote in message
news:45a6a3ff$1$757$(E-Mail Removed)...
> Mich wrote:
>
>> Good point, and it seems that the whole thing is not very practical ...
>> But I would think that being able to filter out the vast majority of
>> visists would be enough (I hope!!)

>
> Presumably the important point is that you have made a "best effort" to
> avoid
> pressing your nefarious product descriptions upon the unfortunate citizens
> of
> Canada.
>
> I have no idea whether that would satisfy legal requirements as regard
> your
> (potential) dispute with the government, but there is also the issue of
> your
> responsibility to share holders, etc. They might want to reduce the
> chance of
> a dispute with the government in the first place, or their exposure should
> the
> dispute actually occur (and be lost).
>
> BTW, have you sorted out the technical half of your problem -- how to get
> the
> client's IP address ?



I am the only shareholder, so things are ok on that side. I am convinced
that the government position is wrong, and I have sent a polite letter back
to them indicating that since the product is not sold in Canada - its
shipped outside of Canada - the description itself is not subject to
Canadain rules.

For right now I am putting on hold trying to block access to the site, since
I expect that the government will reverse its decision. I have been told
that in the tomcat configuration there are blocking parameters available;
but the site is changing servers, so I will look into that afterwards.





 
Reply With Quote
 
Mich
Guest
Posts: n/a
 
      01-11-2007

"bjeremy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>
> Mich wrote:
>> "Andrew Thompson" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) oups.com...
>> > Mich wrote:
>> >> Because of local content rules I have to make some website pages
>> >> unavailable
>> >> for browsers in Canada. ...
>> >
>> > As an aside. What content would be *not* allowed
>> > in Canada, but *allowed* in other places?
>> >
>> > I never got the impression of the Canadians as being
>> > overly keen on censorship, and thought they were
>> > more permissive than (for e.g.) their neighbours
>> > immediately "south o' the border".
>> >
>> > Andrew T.

>>
>>
>> In this case it's just a 'problem' with some product descriptions. The
>> products themselves aren't even sold in Canada, but since the company is
>> based in Canada a gov official has sent as letter arguing about that.
>> It's
>> most likely that the gov decision is illegal, but blocking access from
>> Canada solves the problem.

>
> Ahh... this just proves my conspiracy theory that the Canucks are
> keeping all the good hockey skates for themselves, while selling us
> Americans the cheap knock-offs....


.... and if you even knew about the maple syrup ...my home province of Quebec
has strict rules about the marketing of maple syrup to "maintain" a stable
price. The results is that because of the high price maple syrup is being
warehoused for years and is spoiled while producers are going out of
business.




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3-tier design; sorting and filtering object-based data Sjaakie ASP .Net 10 09-21-2006 08:42 AM
[JSP] difference between jsp:forward and jsp:include alexjaquet@gmail.com Java 0 06-02-2006 01:21 PM
XSLT filtering based on attribute value sp XML 2 01-24-2006 05:17 AM
XSLT for filtering XML based on attribute value? elora_c@yahoo.com XML 4 05-19-2005 09:09 PM
Filtering one set of elements based on another RogerTBrick XML 2 03-04-2005 11:39 AM



Advertisments