-
Servlets and IP addresses
I'm trying to create servlets that will only handle requests from recognised
clients. Is there a way for a servlet to know where a particular request
is originating from? I venturing into networking for the first time so I'm
not too sure about things. I was thinking of using the IP address as a way
to recognise computers, but I think IP addresses are not constants. The reason
I need to recognise clients is because I want the servlet to only handle
a request if that request is made at a particular place, such as in the office
rather than at home. Please help.
-
Re: Servlets and IP addresses
Not only are IP addresses not necessarily constant, they don't identify
computers either. For example, everyone in my company is identified by the
single IP address of our proxy server. To identify an individual computer,
one way is to use a cookie and store a user ID in it.
(You can't tell where the request is coming from in any way, because I carry
my laptop from office to home and still use the same IP address.)
David <aberrant80@yahoo.com> wrote in message
news:39a53a7e$1@news.devx.com...
>
> I'm trying to create servlets that will only handle requests from
recognised
> clients. Is there a way for a servlet to know where a particular request
> is originating from? I venturing into networking for the first time so I'm
> not too sure about things. I was thinking of using the IP address as a way
> to recognise computers, but I think IP addresses are not constants. The
reason
> I need to recognise clients is because I want the servlet to only handle
> a request if that request is made at a particular place, such as in the
office
> rather than at home. Please help.
-
Re: Servlets and IP addresses
You can also use another session tracking mechanism like URL rewriting which
is supported by several application servers (users may disable cookies in
their browsers).
Take a look at your web server security features and, if they are worth,
consider taking the most from them by using a proxy to forward requests for
servlets and JSP files to your application server and sending the output
stream back.
fribeiro
"Paul Clapham" <pclapham@core-mark.com> wrote:
>Not only are IP addresses not necessarily constant, they don't identify
>computers either. For example, everyone in my company is identified by
the
>single IP address of our proxy server. To identify an individual computer,
>one way is to use a cookie and store a user ID in it.
>
>(You can't tell where the request is coming from in any way, because I carry
>my laptop from office to home and still use the same IP address.)
>
>David <aberrant80@yahoo.com> wrote in message
>news:39a53a7e$1@news.devx.com...
>>
>> I'm trying to create servlets that will only handle requests from
>recognised
>> clients. Is there a way for a servlet to know where a particular request
>> is originating from? I venturing into networking for the first time so
I'm
>> not too sure about things. I was thinking of using the IP address as a
way
>> to recognise computers, but I think IP addresses are not constants. The
>reason
>> I need to recognise clients is because I want the servlet to only handle
>> a request if that request is made at a particular place, such as in the
>office
>> rather than at home. Please help.
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|