aspose file tools*
The moose likes JSP and the fly likes How to implement j_security_check Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to implement j_security_check" Watch "How to implement j_security_check" New topic
Author

How to implement j_security_check

chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Hi everybody, I am learning how to implement j_security_check. For this I visited two web sites namely
http://onjava.com/onjava/2002/06/12/form.html
http://directory.apache.org/apacheds/1.0/42-apache-tomcat.html
I am using tomcat6.0 web server
I did not get how to implement this in total. I understood some part of only. Can anybody help me where can I learn it in detail.

This is what I have understood from reading those:

WEB-INF/web.xml



META-INF/context.xml



WebContent/login.jsp


WebContent/error.jsp


WebContent/admin/index.jsp


Please help me.
Thank you all in advance.


Love all, trust a few, do wrong to none.
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Is there nobody to help me?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
PatienceIsAVirtue

At first glance I don't see a security-role element in the web.xml file where you define the ADMINISTRATOR role.

You'll also need to configure a Tomcat Realm for LDAP: http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm


Ping & DNS - my free Android networking tools app
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Dittmer: Sir can you please suggest me one web site where I can learn it in detail.

Thank you in advance
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
Hi,


In web.xml


<url-pattern> pattern is *.jsp, now all jsp is restricted access to authorized user only.
I think your index.jsp is at root of web application...


and you have given <http-method>POST</http-method> in <web-resource-collection> tag,
this means POST request only authenticate the user & I think you are calling by typing URL in browser that is GET request.
so you should add GET request support as added above.



Thanks,
Shailesh
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
If you want detail behavior of this you can get it from HFSJ's security chapter....
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Shailesh Narkhede wrote:If you want detail behavior of this you can get it from HFSJ's security chapter....


Hi Shailesh, thanks for your reply, from where can I get that chapter.

Thank you in advance
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
from where can I get that chapter.

You can buy it right here: http://www.amazon.com/exec/obidos/ASIN/0596516681/jr_bunk-20. It's also available as part of Safari Books Online.
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Ulf Dittmer wrote:
from where can I get that chapter.

You can buy it right here: http://www.amazon.com/exec/obidos/ASIN/0596516681/jr_bunk-20. It's also available as part of Safari Books Online.


Thank you Dittmer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to implement j_security_check