This is the custom validator, has getters/setters for countryCode How to pass the country code back to the custom validator. This is my ActionClass-validation.xml Address object has zip and countryCode. I want to validate the zip based on the country. When I debug the above code, countryCode has the value ${a…
What format is java’s cacerts format expected to be?
I’m slightly confused about cacerts formats. An application I use recently had to upgrade it’s cacerts file. The original cacerts file was pk12 format (I assume, it’s binary), while the new format is clearly pem. I can use either cacert, but when I suggested someone having trouble with authe…
How should I handle “java.net.SocketException: Connection reset” in multithread AWS S3 file upload?
I have a ThreadPoolExecutorService to which I’m submitting runnable jobs that are uploading large (1-2 GB) files to Amazon’s S3 file system, using the AWS Java SDK. Occasionally one of my worker threads will report a java.net.SocketException with “Connection reset” as the cause and the…
Get a BigInteger attribute from Cassandra ResultSet
I’m trying to get the number of key value pairs in a Cassandra column family. Following is the code I used. But when I ran this code, I’m getting following exception. According to datastax documentation (http://www.datastax.com/drivers/java/2.0/com/datastax/driver/core/Row.html) getVarint should r…
Change log level in jboss 7.1 without restarting the server using web consle interface
I want to change log level in standalone.xml using web console interface in jboss 7.1.1 without stopping the server.Same thing,I am able to do using CLI commonds as follows: My logging subsystem in standalone.xml is as follows: Please suggest ! Answer Try with following steps: Enter to web console (http://<…
Running code after Spring Boot starts
I want to run code after my spring-boot app starts to monitor a directory for changes. I have tried running a new thread but the @Autowired services have not been set at that point. I have been able to find ApplicationPreparedEvent, which fires before the @Autowired annotations are set. Ideally I would like t…
Format number with thousands separator in Excel using Apache POI
I want to format some number cells, with a comma as thousands separator. For example: I have the following code. What should I use as formatStr? Is there an easy way? Or do I have to detect the number of zeros in order to produce something like this #,###,###? Keep in mind that I’m dealing with numbers.…
How to use JavaScript paste event to allow numbers in Struts 2 [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 8 years ago. Improve this question I hav…
Which wait is more preferred in selenium Webdriver using Java? (Implicit or Explicit) [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 1 year ago. Improve this question I am aware of the differences between them and how they actually behav…
Camel : integration tests of asynchronous routes
I have an application using apache camel which has a full coverage of unit tests using the great camel testing support. These tests cover each parts of camel routes and work perfectly. I now want to …