• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to implement j_security_check

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there nobody to help me?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want detail behavior of this you can get it from HFSJ's security chapter....
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic