Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagegroovy
linenumberstrue
package com.belladati;
import com.belladati.extension.BaseExtensionEndpoint;
import org.apache.tapestry5.StreamResponse;
public class MyEndpoint extends BaseExtensionEndpoint {
	@Override
	public StreamResponse doGet() {
		String text = "GET method called with parameter: " + getParameter("say")
		return createStreamResponse(text, "text/plain", 200)
	}
	@Override
	public StreamResponse doPost() {
		String text = "POST method called with parameter: " + getParameter("say")
		return createStreamResponse(text, "text/plain", 200)
	}
}

Types whitelist

 Beside types and packages below, all types and packages from provided JAR library are on white list too.

Code Block
languagejava
DecimalFormat.class, NumberFormat.class, LocalDate.class, LocalTime.class, DateTime.class, Arrays.class, ArrayUtils.class, SystemOutputInterceptor.class, Integer.class, Long.class, Double.class, Float.class, BigDecimal.class, String.class, StringUtils.class, JSON.class, JSONObject.class, JSONArray.class, Filter.class, OperationType.class, Map.class

Beside this types, all types and packages from provided JAR library are on white list too.

...

Package name
java.util
java.util.regex
org.apache.commons.logging
com.belladati.json