Amit Singhall

Greenhorn
+ Follow
since Oct 18, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Amit Singhall

It seems like the SecurityConstraints are not getting picked for the context.

I am getting this message in the log
" No applicable constraints defined"
11 years ago
Hi,

I am facing the similar issue , Custom Form Authenticator is not getting executed with tomcat 7.
I am using the embeded tomcat in my java application.

I am setting the custom realm on engine level
engine.setRealm(realm);
Then I am adding the my custome form authenticator on the context level
StandardContext root = (StandardContext) tomcat.addWebapp(host,"/myApp","/myApp", catalinaHome + "/webapps/myApp");
CustomFormAuthenticator formAuth = new CustomFormAuthenticator ();
formAuth.setDisableProxyCaching( false );
root.addValve(formAuth);

The CustomFormAuthenticator was running in tomcat 5 , but when I upgraded to tomcat 7 , it stopped executing. I have recompiled all the classes with new tomcat libabries. And also I am using Tomcat class instead of Embedded(deprecated in tomcat 7).
Tomcat is getting started but the CustomFormAuthenticator is not getting executed.

Here is the snippet from web.xml


<security-constraint>
<display-name>Custom Framework Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Custom Framework Authentication Required Area</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Custom Role</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login</form-login-page>
<form-error-page>/loginError</form-error-page>
</form-login-config>
</login-config>

<!-- Define the security roles referenced by this web application. -->
<security-role>
<role-name>Custom Role</role-name>
</security-role>
11 years ago
Hi,

Custom Form Authenticatior is not getting executed with tomcat 7.

I am using the embeded tomcat in my java application.

I am setting the custom realm on engine level
engine.setRealm(realm);
Then I am adding the my custome form authenticator on the context level
StandardContext root = (StandardContext) tomcat.addWebapp(host,"/myApp","/myApp", catalinaHome + "/webapps/myApp");
CustomFormAuthenticator formAuth = new CustomFormAuthenticator ();
formAuth.setDisableProxyCaching( false );
root.addValve(formAuth);

The CustomFormAuthenticator was running in tomcat 5 , but when I upgraded to tomcat 7 , it stopped executing. I have recompiled all the classes with new tomcat libabries. And also I am using Tomcat class instead of Embedded(deprecated in tomcat 7).
Tomcat Server is getting started but the CustomFormAuthenticator is not getting executed.

Here is the snippet from web.xml


<security-constraint>
<display-name>Custom Framework Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Custom Framework Authentication Required Area</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Custom Role</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login</form-login-page>
<form-error-page>/loginError</form-error-page>
</form-login-config>
</login-config>

<!-- Define the security roles referenced by this web application. -->
<security-role>
<role-name>Custom Role</role-name>
</security-role>

11 years ago
Hi Everyone,

I have a problem related to JList. I want the List selection model to be SingleSelection but when ever i am traversing through the list i want the previous selection to be shown as the same selection color or different one (that's not a issue).So that i can track my selections later on...........



I tried to put the JLabels in the List and on mouse click event in the list i am storing the selection indexes in a temp array.so on each click i have previous selected indexes , then i tried to set the background color of the JLabels for those indexes ....but it's not showing ...i think after click event passes it goes to the list cell render and does as per specified in the render for the whole list...

Is there any way to do so....................

Waiting for your suggestions......

Thanks in advance
18 years ago