Restricting IP addresses for Jetty and Solr

Solr 4.2.1 uses Jetty 8.1.8. Jetty 8 (as noted by jonas789) doesn’t support .htaccess. Instead, it uses IPAccessHandler, which doesn’t have great documentation available. I had to play with it quite a bit to get it work, so I’m posting an updated solution here. IPAccessHandler manages a blacklist and a whitelist, accepts arbitrary ranges of … Read more

Is the per-host connection limit raised with HTTP/2?

Browsers impose a per-domain limit of 6-8 connections when using HTTP/1.1, depending on the browser implementation. This allows at most 6-8 concurrent requests per domain. With HTTP/2, browsers open only 1 connection per domain. However, thanks to the multiplexing feature of the HTTP/2 protocol, the number of concurrent requests per domain is not limited to … Read more

Angular 2 restrict input field

you need use a directive. In the directive add a hotListener about input and check if match with the regExpr indicated. I make a directive mask some time ago. The directive in the stackblitz, with the edvertisment that the code is provide “as is” without warranty of any kind. @Directive({ selector: ‘[mask]’ }) export class … Read more

How to allow introducing only digits in jTextField?

Here check this code snippet, that’s how you allow only digits in JTextField, by using DocumentFilter, as the most effeciive way : import java.awt.*; import javax.swing.*; import javax.swing.text.AbstractDocument; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.DocumentFilter; import javax.swing.text.DocumentFilter.FilterBypass; public class InputInteger { private JTextField tField; private MyDocumentFilter documentFilter; private void displayGUI() { JFrame frame = new JFrame(“Input … Read more