Skip to content

Instantly share code, notes, and snippets.

View sachin-handiekar's full-sized avatar

Sachin Handiekar sachin-handiekar

  • United Kingdom
View GitHub Profile
interviewing.io - Discount code ($100 off)- https://interviewing.io/?urc=jVrE
Get $100 off at interviewing.io - https://iio.sh/r/jVrE
#APPLE
#FAANG
#META
#GOOGLE
#NETFLIX
#MICROSOFT
Get $100 free credit - DigitalOcean
https://m.do.co/c/7f9140b7e9e1
@sachin-handiekar
sachin-handiekar / gist:ee015968ed2ae1f5f609
Last active October 9, 2018 01:27
Changing log level in jBoss EAP 6 without restarting the server
  1. Go to $JBOSS_HOME/bin

  2. Run the following command -

     ./jboss-cli.sh --connect controller=localhost:9999
    

Note : If you're using a port offset, the management console port can be calculated as,

port = managementNativeSocket (9999) + port offSet
<resource-root path="portal-request-handler.jar">
<component-plugin>
<name>PortalRequestHandler</name>
<set-method>register</set-method>
<!-- Disable the default handler
<type>org.exoplatform.portal.application.PortalRequestHandler</type>
-->
<type>org.exoplatform.portal.application.CustomPortalRequestHandler</type>
</component-plugin>
@sachin-handiekar
sachin-handiekar / controller.xml
Created June 29, 2015 17:10
controller.xml - Gatein
<route path="/error/404.html">
<route-param qname="gtn:handler">
<value>staticResource</value>
</route-param>
</route>
@sachin-handiekar
sachin-handiekar / t1.xml
Created June 29, 2015 17:09
Error Page - web.xml
<error-page>
<error-code>404</error-code>
<location>/error/404.html</location>
</error-page>
package com.javaee.insight;
import java.net.URL;
import java.net.URLClassLoader;
public class ClasspathPrinter {
public static void main(String[] args) {
ClassLoader cl = ClassLoader.getSystemClassLoader();
@sachin-handiekar
sachin-handiekar / CreateTempFileTest.java
Created June 21, 2015 09:58
Create temporary file in Java
package com.javaee.insight;
import java.io.File;
import java.io.IOException;
public class CreateTempFileTest {
public static void main(String[] args) {
try {
// create a temp file
File temp = File.createTempFile("sample", ".tmp");
@sachin-handiekar
sachin-handiekar / CreateFileTest.java
Created June 21, 2015 09:57
Create File in Java
package com.javaee.insight;
import java.io.File;
import java.io.IOException;
public class CreateFileTest {
public static void main(String[] args) {
try {
File file = new File("c:\\sample.txt");