You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anubhav Kale <an...@persistent.co.in> on 2003/07/31 07:55:16 UTC
Need help for design
Hello
I want to create a simple JSP page with login and password fields. If i/p is correct (verified against a database) I should give user access to some JSP pages. If user tries to go to these JSP pages directly without entering correct username and password then he should be redirected back to login page.
How do I do all this? (I think i need to create some session id and things like that)
Thanks
Anubhav
Re: Need help for design
Posted by Erik Price <ep...@ptc.com>.
Anubhav Kale wrote:
> Hello
>
> I want to create a simple JSP page with login and password fields. If i/p is correct (verified against a database) I should give user access to some JSP pages. If user tries to go to these JSP pages directly without entering correct username and password then he should be redirected back to login page.
>
> How do I do all this? (I think i need to create some session id and things like that)
Read this:
<http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html>
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Need help for design
Posted by manglu <ma...@eutama.com>.
Anubhav
This should be simple
Use Container managed Security as specified in (J2EE)
Use Form based Login - login.jsp
and secure the JSPs which you want to by specifiying hte constraints in
Web.xml
If the user accesses these secured JSPs then he would be automatically
routed to login.jsp (if he/she has not been authenticated before)
The standard samples with TOmcat should show how this is done.
HTH
Manglu
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Need help for design
Posted by "Prashanth.S" <su...@yahoo.com>.
hi,
Try looking through the following url...since i havent used tomcat..I use resin and done authentication using resin....
http://www.jguru.com/faq/subtopic.jsp?topicID=221898
Thanks
Prashanth
Anubhav Kale <an...@persistent.co.in> wrote:
I am using Tomcat server. Can you please tell me how exactly to do that
(what code I have to write etc)
Thanks
Anubhav
----- Original Message -----
From: "Prashanth.S"
To: "Struts Users Mailing List"
Sent: Thursday, July 31, 2003 11:33 AM
Subject: Re: Need help for design
> Hi,
> U can use authenticator classes of whatever server u use...Example is to
use cauchoauthenticator [if u r using resin web server]...etc
> Thnks
> Prashanth
>
> Anubhav Kale wrote:
> Hello
>
> I want to create a simple JSP page with login and password fields. If i/p
is correct (verified against a database) I should give user access to some
JSP pages. If user tries to go to these JSP pages directly without entering
correct username and password then he should be redirected back to login
page.
>
> How do I do all this? (I think i need to create some session id and things
like that)
>
> Thanks
>
> Anubhav
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Need help for design
Posted by Anubhav Kale <an...@persistent.co.in>.
I am using Tomcat server. Can you please tell me how exactly to do that
(what code I have to write etc)
Thanks
Anubhav
----- Original Message -----
From: "Prashanth.S" <su...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, July 31, 2003 11:33 AM
Subject: Re: Need help for design
> Hi,
> U can use authenticator classes of whatever server u use...Example is to
use cauchoauthenticator [if u r using resin web server]...etc
> Thnks
> Prashanth
>
> Anubhav Kale <an...@persistent.co.in> wrote:
> Hello
>
> I want to create a simple JSP page with login and password fields. If i/p
is correct (verified against a database) I should give user access to some
JSP pages. If user tries to go to these JSP pages directly without entering
correct username and password then he should be redirected back to login
page.
>
> How do I do all this? (I think i need to create some session id and things
like that)
>
> Thanks
>
> Anubhav
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Need help for design
Posted by "Prashanth.S" <su...@yahoo.com>.
Hi,
U can use authenticator classes of whatever server u use...Example is to use cauchoauthenticator [if u r using resin web server]...etc
Thnks
Prashanth
Anubhav Kale <an...@persistent.co.in> wrote:
Hello
I want to create a simple JSP page with login and password fields. If i/p is correct (verified against a database) I should give user access to some JSP pages. If user tries to go to these JSP pages directly without entering correct username and password then he should be redirected back to login page.
How do I do all this? (I think i need to create some session id and things like that)
Thanks
Anubhav
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software