You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by karthikn <ka...@xius-bcgi.com> on 2008/09/17 12:58:07 UTC

Browser Limited web application

Hi

Spec :  TOMCAT 6.0.18
O/s    :  HP UNIX 11i
J2SDK : j2sdk1.6  or jre 1.6


An application deployed on the env  as 'XYZ.war'

Question 1 :  How  to  implement a  Filter in the application for  Browsers  limitation
                    The web application should be visible only in IE-6  or Fire Fox 2.0  ?

Question 2:  How to fetch the MAC address (Physical address) of
                  the clients using web application  ?


Note:- Spent 3 days on Google / yahoo for the same ....yet no answers.


Please  suggest me ...

With regards
Karthik




[OT] RE: Browser Limited web application

Posted by Peter Crowther <Pe...@melandra.com>.
[Marked off-topic as this now has nothing to do with Tomcat]

> From: karthikn [mailto:karthik.nanjangude@xius-bcgi.com]
> But some Browsers provide modification of "User-Agent"
>
> Is this fool proof ?

No.  You have no control over the client; you cannot determine what it really is, only what it says it is.  AVG8, for example, can pretend pretty convincingly to be Internet Explorer.

The only way to be relatively certain is to send a page to the browser that uses Javascript to check for known bugs or quirks in the browser, and sends back to you a status report.  Of course, a hacker has control over the client, so could change the Javascript code you send (or run it under a debugger) to report whatever they wanted... you can never be *certain*.

If you told us what you were trying to do, and what is an acceptable level of confidence in the result, we might be able to help more.

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Browser Limited web application

Posted by Mark Thomas <ma...@apache.org>.
karthikn wrote:
> Hi
> 
> Some experimentation was done for the same
> 
> But some Browsers provide modification of "User-Agent"
> 
> Is this fool proof ?

No.

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Browser Limited web application

Posted by karthikn <ka...@xius-bcgi.com>.
Hi

Some experimentation was done for the same

But some Browsers provide modification of "User-Agent"

Is this fool proof ?


With regards
Karthik

-----Original Message-----
From: bhooshanpandit@aol.com [mailto:bhooshanpandit@aol.com]
Sent: Wednesday, September 17, 2008 5:09 PM
To: users@tomcat.apache.org
Subject: Re: Browser Limited web application

For # 1, try this in your filter:

             if(httpservletrequest.getHeader("User-Agent").indexOf("MSIE
6.0")!= -1)
                filterchain.doFilter(servletrequest, servletresponse);
            else
                httpservletresponse.getWriter().print("This browser
version is not supported!!!");

This will ensure that your app is only accessible on IE 6.

-----Original Message-----
From: karthikn <ka...@xius-bcgi.com>
To: users@tomcat.apache.org <us...@tomcat.apache.org>
Sent: Wed, 17 Sep 2008 4:28 pm
Subject: Browser Limited  web application










Hi

Spec :  TOMCAT 6.0.18
O/s    :  HP UNIX 11i
J2SDK : j2sdk1.6  or jre 1.6


An application deployed on the env  as 'XYZ.war'

Question 1 :  How  to  implement a  Filter in the application for
Browsers
limitation
                     The web application should be visible only in IE-6
or Fire
Fox 2.0  ?

Question 2:  How to fetch the MAC address (Physical address) of
                  the clients using web application  ?


Note:- Spent 3 days on Google / yahoo for the same ....yet no answers.


Please  suggest me ...

With regards
Karthik








________________________________________________________________________
You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Browser Limited web application

Posted by bh...@aol.com.
For # 1, try this in your filter:

             if(httpservletrequest.getHeader("User-Agent").indexOf("MSIE 
6.0")!= -1)
                filterchain.doFilter(servletrequest, servletresponse);
            else
                httpservletresponse.getWriter().print("This browser 
version is not supported!!!");

This will ensure that your app is only accessible on IE 6.

-----Original Message-----
From: karthikn <ka...@xius-bcgi.com>
To: users@tomcat.apache.org <us...@tomcat.apache.org>
Sent: Wed, 17 Sep 2008 4:28 pm
Subject: Browser Limited  web application










Hi

Spec :  TOMCAT 6.0.18
O/s    :  HP UNIX 11i
J2SDK : j2sdk1.6  or jre 1.6


An application deployed on the env  as 'XYZ.war'

Question 1 :  How  to  implement a  Filter in the application for  
Browsers
limitation
                     The web application should be visible only in IE-6  
or Fire
Fox 2.0  ?

Question 2:  How to fetch the MAC address (Physical address) of
                  the clients using web application  ?


Note:- Spent 3 days on Google / yahoo for the same ....yet no answers.


Please  suggest me ...

With regards
Karthik








________________________________________________________________________
You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Browser Limited web application

Posted by karthikn <ka...@xius-bcgi.com>.
Hi

>> For computers in the local network you could execute "ping ip", and then
"arp -a", and parse the result. Or you could look for an Java ARP
implementation, there are some of them on the internet, but are not very
simple to use.

Correct but HOW via a JSP at run time ....


With regards
Karthik

-----Original Message-----
From: Ognjen Blagojevic [mailto:ognjen@etf.bg.ac.yu]
Sent: Wednesday, September 17, 2008 5:57 PM
To: Tomcat Users List
Subject: Re: Browser Limited web application

Peter Crowther wrote:
>> From: karthikn [mailto:karthik.nanjangude@xius-bcgi.com]
>> Question 2:  How to fetch the MAC address (Physical address) of
>>                   the clients using web application  ?
>
> You can not do this at the server.  Some clients may not even have one - a computer with no network card using a dial-up modem to access the Internet has no MAC address.  If you look at the OSI 7-layer model, the MAC address exists in some Datalink (layer 2) implementations, but need not exist on all.
>
> If you really, *really* need the MAC address, you would have to write a piece of code to download to the client computer and run on the client computer to get it.  I suspect most anti-malware programs would recognise that software as spyware and stop it running.

In other words, you can only get the mac address from the computers in
LAN. Everything that comes outside your LAN does not have mac address.

For computers in the local network you could execute "ping ip", and then
"arp -a", and parse the result. Or you could look for an Java ARP
implementation, there are some of them on the internet, but are not very
simple to use.

Regards,
Ognjen

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Browser Limited web application

Posted by Ognjen Blagojevic <og...@etf.bg.ac.yu>.
Peter Crowther wrote:
>> From: karthikn [mailto:karthik.nanjangude@xius-bcgi.com]
>> Question 2:  How to fetch the MAC address (Physical address) of
>>                   the clients using web application  ?
> 
> You can not do this at the server.  Some clients may not even have one - a computer with no network card using a dial-up modem to access the Internet has no MAC address.  If you look at the OSI 7-layer model, the MAC address exists in some Datalink (layer 2) implementations, but need not exist on all.
> 
> If you really, *really* need the MAC address, you would have to write a piece of code to download to the client computer and run on the client computer to get it.  I suspect most anti-malware programs would recognise that software as spyware and stop it running.

In other words, you can only get the mac address from the computers in 
LAN. Everything that comes outside your LAN does not have mac address.

For computers in the local network you could execute "ping ip", and then 
"arp -a", and parse the result. Or you could look for an Java ARP 
implementation, there are some of them on the internet, but are not very 
simple to use.

Regards,
Ognjen

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Browser Limited web application

Posted by Peter Crowther <Pe...@melandra.com>.
> From: karthikn [mailto:karthik.nanjangude@xius-bcgi.com]
> Question 2:  How to fetch the MAC address (Physical address) of
>                   the clients using web application  ?

You can not do this at the server.  Some clients may not even have one - a computer with no network card using a dial-up modem to access the Internet has no MAC address.  If you look at the OSI 7-layer model, the MAC address exists in some Datalink (layer 2) implementations, but need not exist on all.

If you really, *really* need the MAC address, you would have to write a piece of code to download to the client computer and run on the client computer to get it.  I suspect most anti-malware programs would recognise that software as spyware and stop it running.

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Browser Limited web application

Posted by Jim Cox <sh...@gmail.com>.
On Wed, Sep 17, 2008 at 6:58 AM, karthikn
<ka...@xius-bcgi.com>wrote:

>
> Question 1 :  How  to  implement a  Filter in the application for  Browsers
>  limitation
>                    The web application should be visible only in IE-6  or
> Fire Fox 2.0  ?
>

You can write & deploy a Filter that examines the "User-Agent" HTTP request
header field, though that's far from foolproof -- see 14.43 of:
  http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html


> Question 2:  How to fetch the MAC address (Physical address) of
>                  the clients using web application  ?
>

Can  you map the client IP via the ARP cache? See "man arp" and:
  http://en.wikipedia.org/wiki/Address_Resolution_Protocol