tag:blogger.com,1999:blog-7355044240007364151.post701894978116516344..comments2015-03-06T14:59:30.922+05:30Comments on KUSHAN'S TECH BLOG: Getting started with Spring Security 3 with JBoss and MySQLKushan Jayathilakehttp://www.blogger.com/profile/14972462055058843725noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-7355044240007364151.post-65320528859925597642011-12-21T18:47:10.272+05:302011-12-21T18:47:10.272+05:30Modify the context.xml file in conf directory in t...Modify the context.xml file in conf directory in tomcat as below.<br /><br />Resource name="jdbc/mysqlds"<br />auth="Container"<br />type="javax.sql.DataSource"<br />driverClassName="com.mysql.jdbc.Driver"<br />url="jdbc:mysql://localhost:3306/test"<br />username="root"<br />password="root"<br />maxActive="20"<br />maxIdle="30"<br />maxWait="-1" <br /><br /><br /><br />You need following Java snippet to get the connection from JNDI.<br /><br />Context initCtx = new InitialContext();<br />Context envCtx = (Context) initCtx.lookup("java:comp/env");<br /><br />DataSource ds = (DataSource)<br />envCtx.lookup("jdbc/mysqlds");<br /><br />Connection conn = ds.getConnection();<br />conn.close();Kushan Jayathilakehttps://www.blogger.com/profile/14972462055058843725noreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-25643669016606064912011-12-21T16:00:21.655+05:302011-12-21T16:00:21.655+05:30I want to run this example on Tomcat 6.0. What cha...I want to run this example on Tomcat 6.0. What changes should be done?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-50644390863376692082011-09-28T14:59:54.684+05:302011-09-28T14:59:54.684+05:30Hi , is there any way to inject custom authorities...Hi , is there any way to inject custom authorities if you use ActiveDirectoryLdapAuthenticationProvider for LDAP authentication ?displaytag in jsphttp://javarevisited.blogspot.com/2011/09/displaytag-examples-tutorial-jsp-struts.htmlnoreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-12663149898936451822011-07-19T12:48:57.336+05:302011-07-19T12:48:57.336+05:30Its Good to hear you got it working :) Yes you can...Its Good to hear you got it working :) Yes you can make it HTTPS. For that you need to enable HTTPS for JBoss with a security certificateKushan Jayathilakehttps://www.blogger.com/profile/14972462055058843725noreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-73320752120221837132011-07-19T11:40:57.570+05:302011-07-19T11:40:57.570+05:30After following the tutorial and getting the proje...After following the tutorial and getting the project running, I found the authentication page is using HTTP. Is there a way to change it to HTTPS?<br /><br />Thanks and regards.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-16901467415665075172011-07-18T11:16:20.032+05:302011-07-18T11:16:20.032+05:30You sure you added all the library(JAR) files from...You sure you added all the library(JAR) files from the spring-security-samples-tutorial-3.0.5.RELEASE.war.<br /><br />Do not include any library file except from the WAR file that I have mentioned above.Kushan Jayathilakehttps://www.blogger.com/profile/14972462055058843725noreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-32066831362991129102011-07-14T15:10:16.809+05:302011-07-14T15:10:16.809+05:30I tried to follow the setup. But when I deploy the...I tried to follow the setup. But when I deploy the project on JBoss version 5.0.1, it shows the following error message.<br /><br />org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]<br />Offending resource: ServletContext resource [/WEB-INF/applicationContext-security.xml]<br /><br />Can you please help. Thanks in advanceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-51967876767676200972011-07-12T17:21:38.626+05:302011-07-12T17:21:38.626+05:30Hi Bhaskara, sorry for the late reply. Yes certain...Hi Bhaskara, sorry for the late reply. Yes certainly. You can get it configured in a DB. I'm hoping to write a post on that soon. There might be some tips on the google also.Kushan Jayathilakehttps://www.blogger.com/profile/14972462055058843725noreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-77839593055200453602011-07-06T14:49:02.809+05:302011-07-06T14:49:02.809+05:30Hi Kushan, i need to store the intercept-urls in a...Hi Kushan, i need to store the intercept-urls in a database rather than configuring in the xmls. Is that possible, please help me.Anonymoushttps://www.blogger.com/profile/13732217739959086942noreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-33564697407392431982011-06-28T12:47:30.575+05:302011-06-28T12:47:30.575+05:30It seems the problem is with your environment. Wha...It seems the problem is with your environment. What is the JBoss version you are using? and you sure you included the JAR files only from the sample WAR files which came from the Spring security module?Kushan Jayathilakehttps://www.blogger.com/profile/14972462055058843725noreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-3810259408146870392011-06-27T19:14:21.745+05:302011-06-27T19:14:21.745+05:30When i deploy in jboss, i'm getting the below ...When i deploy in jboss, i'm getting the below error <br /><br />19:08:18,818 INFO [TomcatDeployment] deploy, ctxPath=/XYZ<br />19:08:19,056 ERROR [StandardContext] Context [/XYZ] startup failed due to previous errors<br />java.lang.RuntimeException: mapped-name is required for sessionRegistry of deployment XYZ.war<br /><br />can you please helpAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-47080943544228279792011-06-10T15:28:38.657+05:302011-06-10T15:28:38.657+05:30Well... I have done this few months back. Im not s...Well... I have done this few months back. Im not sure where I have it now. Why dont you follow the tutorial. Message me if somewhere is not clear.Kushan Jayathilakehttps://www.blogger.com/profile/14972462055058843725noreply@blogger.comtag:blogger.com,1999:blog-7355044240007364151.post-34627501213230200682011-06-10T14:54:48.929+05:302011-06-10T14:54:48.929+05:30I am kelly software developer please sent me this ...I am kelly software developer please sent me this example to my email kelvinomwaka@yahoo.comAnonymousnoreply@blogger.com