This content has been marked as final.
Show 6 replies
-
1. Re: saving j_username as session/request parameter
tremalnaik Aug 24, 2005 5:30 AM (in response to madalvi)If the Jboss FormAuthValve does really what you need, why don't you use it instead of creating your own copying the former?
Just add in your context.xml file the configuration for this valve.... -
2. Re: saving j_username as session/request parameter
madalvi Aug 24, 2005 1:07 PM (in response to madalvi)Few questions:
1. Where do I put cotext.xml file?
2. Where do I put the FormAuthValve class? -
3. Re: saving j_username as session/request parameter
niwhsa Aug 25, 2005 12:49 AM (in response to madalvi)Why dont you put a servlet filter for the j_security_check servlet in your web.xml. In the filter code, you will have access to the request object from where you can read j_username and store it in the session. This would be the easiest way of doing this without tampering with the app server code.
-
4. Re: saving j_username as session/request parameter
tremalnaik Aug 26, 2005 3:39 AM (in response to madalvi)"madalvi" wrote:
Few questions:
1. Where do I put cotext.xml file?
2. Where do I put the FormAuthValve class?
1. I put it in the application WEB-INF folder
2. If you're using jboss 4.0.2 you just link your project to the library <root_of_jboss>\server\default\deploy\jbossweb-tomcat55.sar\tomcat55-service.jar which contains the class you need, then you configure it as in the wiki example. -
5. Re: saving j_username as session/request parameter
tremalnaik Aug 26, 2005 3:42 AM (in response to madalvi)"niwhsa" wrote:
Why dont you put a servlet filter for the j_security_check servlet in your web.xml. In the filter code, you will have access to the request object from where you can read j_username and store it in the session. This would be the easiest way of doing this without tampering with the app server code.
read this
http://wiki.jboss.org/wiki/Wiki.jsp?page=CustomizingSecurityUsingValves
and you'll have the answers you are looking for. If you don't like having jboss classes configured in your project, you may define your own valve extendig the tomcat native one
Cheers -
6. Re: saving j_username as session/request parameter
ricardoarguello May 18, 2006 6:13 PM (in response to madalvi)You should check the ExtendedFormAuthenticator, available in JBoss 4.0.3+
http://wiki.jboss.org/wiki/Wiki.jsp?page=ExtendedFormAuthenticator