Posts

Showing posts from January, 2018

How to get IP address and MAC address of client in java | #CodeFactory

- Java access to the client IP address and MAC address -  In JSP, method to obtain the client's IP address is: request.getRemoteAddr (), this method is effective in most cases. -  After the agent, because between the client and the service increased intermediate layer, so the server can not be directly to the IP client, server application is not directly by forwarding the requested address is returned to the client. -  But in the HTTP header information request, increase the XFORWARDEDFOR information. To track the original client IP address and the original client requests the server address. -  When we visit index.jsp/, In fact, we are not true to the browser to access the index.jsp file on the server, But the proxy server to access the index.jsp , The proxy server will access to the results returned to the browser, Because it is a proxy server to access the index.jsp, So the index.jsp through the request.getRemoteAddr () method to obtain the IP is actually the address of pro

Create Custom Javascript Validation Popup | #CodeFactory

Image
Download js and css :  Download  |  Demo Preview : Description : An easy to use yet fully customizable form field validator built using native JavaScript with no 3rd JavaScript libraries. Predefined validation rules : - required -  notzero - integer - float - min - max - between - name - lastname - phone - email - length - maxlength - minlength - maxfilesize - fileextension How to use it : Import the main JavaScript file js-form-validator.min.js  and css file forms.css  into your html file. <link href="css/forms.css" rel="stylesheet"> <script src="js/js-form-validator.min.js"></script> Apply the validation rules to the target form fields using data-rule  attributes. You can apply multiple rules to the same field by seperate the rules with "|". <form action="#" id="form"> <br> Emp code : <br> <input type="text" n