I hereby claim:
- I am martinlau on github.
- I am msl (https://keybase.io/msl) on keybase.
- I have a public key whose fingerprint is 7682 47A7 93C4 0F6C 3BCC 7816 E4D1 D636 209A D697
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet_2_0" %> | |
<portlet:actionURL var="submitURL" /> | |
<form action="${submitURL}" method="post"> | |
<input type="text" name="query" /> | |
<input type="submit" /> | |
</form> |
<form action="http://www.example.com/web/guest/home?p_auth=Ex7KuhQN&p_p_id=samplegetformportlet_WAR_samplegetformportlet&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1" method="post" id="aui_3_4_0_1_2502"> | |
<input type="text" name="query" id="aui_3_4_0_1_2501" class=""> | |
<input type="submit"> | |
</form> |
<form action="http://www.example.com/web/guest/home?p_auth=Ex7KuhQN&p_p_id=samplegetformportlet_WAR_samplegetformportlet&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=2" method="get" id="aui_3_4_0_1_563"> | |
<input name="p_auth" type="hidden" value="Ex7KuhQN"> | |
<input name="p_p_id" type="hidden" value="samplegetformportlet_WAR_samplegetformportlet"> | |
<input name="p_p_lifecycle" type="hidden" value="1"> | |
<input name="p_p_state" type="hidden" value="normal"> | |
<input name="p_p_mode" type="hidden" value="view"> | |
<input name="p_p_col_id" type="hidden" value="column-1"> | |
<input name="p_p_col_count" type="hidden" value="2"> | |
<input type="text" name="query" class="" id="aui_3_4_0_1_562"> | |
<input type="submit"> |
package au.com.permeance.clojure; | |
import javax.portlet.ActionRequest; | |
import javax.portlet.ActionResponse; | |
import javax.portlet.Portlet; | |
import javax.portlet.PortletConfig; | |
import javax.portlet.PortletContext; | |
import javax.portlet.PortletException; | |
import javax.portlet.PortletMode; | |
import javax.portlet.PortletRequestDispatcher; |
<?xml version="1.0" encoding="UTF-8"?> | |
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd | |
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" | |
version="2.0"> | |
<portlet> | |
<portlet-name>clojure-portlet</portlet-name> |
<p> | |
/help.jsp | |
</p> |
(ns au.com.permeance.clojure.ClojurePortlet | |
(:gen-class :implements [javax.portlet.Portlet] | |
:init construct | |
:main false | |
:state state) | |
(:import (javax.portlet ActionRequest PortletMode))) | |
(defn- include-path [this path request response] | |
(let [state @(.state this) | |
config (:config state) |
(defmacro do-with-classloader | |
[classloader & body] | |
`(let [old-classloader# (.getContextClassLoader (Thread/currentThread))] | |
(.setContextClassLoader (Thread/currentThread) ~classloader) | |
(try ~@body | |
(finally (.setContextClassLoader (Thread/currentThread) old-classloader#))))) |
public abstract class ClassLoaderSwapper { | |
public void doWithClassLoader(ClassLoader classLoader) { | |
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); | |
Thread.currentThread().setContextClassLoader(classLoader); | |
try { | |
doInternal(); | |
} | |
finally { | |
Thread.currentThread().setContextClassLoader(oldClassLoader); |