Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Security on a multiple user site using JSP.

Reply
Thread Tools

Security on a multiple user site using JSP.

 
 
Dj Frenzy
Guest
Posts: n/a
 
      03-06-2004
Hi,
I am creating a website, which will have multiple users. Security
with JSP is quite new to me. I want to make it possible for users to
log in and then browse their information as they wish. In order to
make sure that they don't have to constantly confirm their password,
would I just use a cookie to hold their id and password for the
duration of their session?
Cheers,
Dave
 
Reply With Quote
 
 
 
 
Ryan Stewart
Guest
Posts: n/a
 
      03-06-2004
"Dj Frenzy" <> wrote in message
news: m...
> Hi,
> I am creating a website, which will have multiple users. Security
> with JSP is quite new to me. I want to make it possible for users to
> log in and then browse their information as they wish. In order to
> make sure that they don't have to constantly confirm their password,
> would I just use a cookie to hold their id and password for the
> duration of their session?
> Cheers,
> Dave


A session variable would be better. What if a user disables cookies?
(Answer: Then his/her session would be lost too, but you can get around
that.) Use session.setAttribute and session.getAttribute.


 
Reply With Quote
 
 
 
 
Richard Corfield
Guest
Posts: n/a
 
      03-06-2004
On 2004-03-06, Ryan Stewart <> wrote:
>
> A session variable would be better. What if a user disables cookies?
> (Answer: Then his/her session would be lost too, but you can get around
> that.) Use session.setAttribute and session.getAttribute.
>


I know that JSP provides authentication for you. Why not use
that? Then its the JSP container's responsibility to track the user
ID. I've experimented a little with custom login pages and HTTP Basic
authentication in JSP, setting up a restricted area of the site in the
WEB-INF/web.xml file. I also know that you can ask if the logged in
user is in a given role. I know more about old Apache authentication
than JSP specific, but would expect that current user ID is available
from the system.

I'll be looking at implementing some JSP helper apps to help me
be secretary of my local panto group, keeping track of things like
upcoming events and automailing myself or other members as appropriate.
Using Swing would be not be as educational as using JSP. I'll be logging
the user ID with records that the user creates, also using role based
authentication.

- Richard

--
_/_/_/ _/_/_/ _/_/_/ Richard dot Corfield at ntlworld dot com
_/ _/ _/ _/
_/_/ _/ _/ Time is a one way street,
_/ _/ _/_/ _/_/_/ Except in the Twilight Zone.
 
Reply With Quote
 
Ryan Stewart
Guest
Posts: n/a
 
      03-06-2004
"Richard Corfield" <> wrote in message
news: dale.dyndns.org...
> On 2004-03-06, Ryan Stewart <> wrote:
> >
> > A session variable would be better. What if a user disables cookies?
> > (Answer: Then his/her session would be lost too, but you can get around
> > that.) Use session.setAttribute and session.getAttribute.
> >

>
> I know that JSP provides authentication for you. Why not use
> that? Then its the JSP container's responsibility to track the user
> ID. I've experimented a little with custom login pages and HTTP Basic
> authentication in JSP, setting up a restricted area of the site in the
> WEB-INF/web.xml file. I also know that you can ask if the logged in
> user is in a given role. I know more about old Apache authentication
> than JSP specific, but would expect that current user ID is available
> from the system.
>
> I'll be looking at implementing some JSP helper apps to help me
> be secretary of my local panto group, keeping track of things like
> upcoming events and automailing myself or other members as appropriate.
> Using Swing would be not be as educational as using JSP. I'll be logging
> the user ID with records that the user creates, also using role based
> authentication.
>
> - Richard


I haven't heard of JSP providing authentication. How is that supposed to
work?


 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      03-06-2004
Ryan Stewart wrote:
<snip>
> I haven't heard of JSP providing authentication. How is that supposed to
> work?


You might want to check this out:
<http://java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/>

 
Reply With Quote
 
Ryan Stewart
Guest
Posts: n/a
 
      03-07-2004
"Sudsy" <> wrote in message
news:...
> Ryan Stewart wrote:
> <snip>
> > I haven't heard of JSP providing authentication. How is that supposed to
> > work?

>
> You might want to check this out:
>

<http://java.sun.com/developer/techni...es/servlets_js
p/>
>

Okay, I've skimmed over it. Where is there something about JSP providing
user authentication?


 
Reply With Quote
 
Christophe Vanfleteren
Guest
Posts: n/a
 
      03-07-2004
Ryan Stewart wrote:

> "Sudsy" <> wrote in message
> news:...
>> Ryan Stewart wrote:
>> <snip>
>> > I haven't heard of JSP providing authentication. How is that supposed
>> > to work?

>>
>> You might want to check this out:
>>

>

<http://java.sun.com/developer/techni...es/servlets_js
> p/>
>>

> Okay, I've skimmed over it. Where is there something about JSP providing
> user authentication?


Not JSP per se, but a servlet container is required to provide container
managed authentication.
Look at the J2EE tutorial to see the different ways this can be done.

--
Kind regards,
Christophe Vanfleteren
 
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
Looking for solution of security between sites such as VPN site-to-site, MPLS whatev cutetplt Cisco 2 06-04-2009 02:19 AM
IT Security news and information site for Security Professionals netleets Cisco 3 08-08-2008 07:35 PM
List of free web site design, web site backgrounds, web site layoutsweb sites cyber HTML 1 12-19-2007 09:07 AM
newbie: using multiple site maps or site-map providers Jeff ASP .Net 0 07-17-2006 10:13 AM
IT-Security, Security, e-security COMSOLIT Messmer Computer Support 0 09-05-2003 08:34 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57