Skip to content

Instantly share code, notes, and snippets.

package org.apache.jsp;
import jakarta.servlet.*;
import jakarta.servlet.http.*;
import jakarta.servlet.jsp.*;
public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent,
org.apache.jasper.runtime.JspSourceImports,
org.apache.jasper.runtime.JspSourceDirectives {
@andresetevejob
andresetevejob / introrx.md
Created January 3, 2022 13:11 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@andresetevejob
andresetevejob / sam_streams.scala
Created April 28, 2020 15:27 — forked from adriaanm/sam_streams.scala
Playing with Java 8 Stream from Scala 2.11.5
// $ scala-2.11.5 -Xexperimental
// Original Java 8 version: http://winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples/
scala> import java.util.{Arrays, List, ArrayList}
scala> import java.util.stream.{Stream, IntStream}
// List<String> myList = Arrays.asList("a1", "a2", "b1", "c2", "c1");
scala> val myList = Arrays.asList("a1", "a2", "b1", "c2", "c1")
@andresetevejob
andresetevejob / gist:0cd7681cdded1373f4c3c83b8f09ac20
Created February 4, 2019 01:16 — forked from naaman/gist:1053217
Hot Swapping With Maven, Jetty and IntelliJ

Hot Swapping With Maven, Jetty and IntelliJ

Based on Configuring Jetty, Maven, and Eclipse together with Hot Swap

I've always been a bit jealous when it comes to the Play! framework and the great dev mode they have for hot swapping classes at runtime. Jetty has a configuration setting, scanIntervalSeconds, that mimics this when working with a more traditional WAR, but does so by looking for changes to a file and restarting the server.

Fortunately, Jetty also provides the ability to rapidly test code with hot swapping. No more server restarts. The trick to getting hot swapping to work is to attach a remote debugger to your Jetty process. The following instructions outline how to do this in IntelliJ (tested with IDEA 10.5 CE).

Modify your jetty-maven-plugin to ignore the scan interval

  1. Open your pom and locate the plugins section
@andresetevejob
andresetevejob / struts2: persistence.xml
Created February 4, 2019 01:04 — forked from hoandang/struts2: persistence.xml
Struts 2 Persistence.xml OpenJPA
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="shop">
<provider>
org.apache.openjpa.persistence.PersistenceProviderImpl
@andresetevejob
andresetevejob / struts2: pom.xml
Created February 4, 2019 01:04 — forked from hoandang/struts2: pom.xml
pom.xml Struts2 REST + OpenJPA + Jetty Server
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.hoan</groupId>
<artifactId>Shop</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>Shop Maven Webapp</name>
<url>http://maven.apache.org</url>