Hi,
I am trying to connect to SQL server Express DB installed on localbox from my java program. I am using jtds driver and the sample code is below.
When I try to run the program, I get an error saying "java.sql.SQLException: Network error IOException: Connection refused: connect"
If I use
I get an error "java.sql.SQLException: Server localhost has no instance named SQLEXPRESS."
I have the driver jar in class path and my VM args are "-Djava.library.path=C:\jtds-1.2.5-dist\x64\SSO" pointing to the NTLM dll.
I am able to connect to the DB from the MS SQL Server Management Studio.
I have a multithreaded spring stand alone app running on 2 boxes. I have a service method which checks for a record in DB and if its not there, it tries to insert in the DB. I want to handle a situation where if one thread on box A is querying to find a record, another thread on Box B should not have queried and tried to inserted the record if it didn't existed. I have constraints in DB which would throw an exception, but is there a way in Spring to prevent this race condition
Hi,
I have an application which uses both struts and JSF. On the JSF list page, I have a button and on click of the button , I need to forward the request to a struts form. I tried it with
and nothing happens. If I try redirect, the page gets forwarded but all the request scope attributes are lost. ANy ideas will be appreciated
I am trying to write a custom tree component by extending the primefaces Tree component.I have implemented all the methods and my facesConfig and facelet.taglib.xml looks like this
When I access the page, I get the error
Are my entries correct in the faces and taglib.xml?
Hi,
I want to validate a company name field and it can accept only alpha numeric values at the beginning and at the end and can have space or comma or a single quote anywhere else. So I need a regex expression to validate it.Any help is appreciated
Thanks in advance
Rahul, thanks for your reply. The \s doesn't seem to work. Also it should allow single quote anywhere in hte string except at the start and end of the string.
The regex gives error if I enter "Aabc,12312-4555"
Hi,
I want to validate a String so that it can start and end with alphanumeric characters, but can contain only space, comma or dash anywhere else. Can I get the regex for this validation please?