mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
42 lines
1.4 KiB
Java
42 lines
1.4 KiB
Java
import javax.servlet.ServletException;
|
|
import javax.servlet.http.HttpServlet;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.IOException;
|
|
import groovy.util.Eval;
|
|
|
|
public class GroovyEvalTest extends HttpServlet {
|
|
|
|
protected void doGet(HttpServletRequest request, HttpServletResponse response)
|
|
throws ServletException, IOException {
|
|
String script = request.getParameter("script");
|
|
Eval.me(script);
|
|
}
|
|
|
|
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
|
throws ServletException, IOException {
|
|
String script = request.getParameter("script");
|
|
Eval.me("test", "result", script);
|
|
}
|
|
|
|
protected void doPut(HttpServletRequest request, HttpServletResponse response)
|
|
throws ServletException, IOException {
|
|
String script = request.getParameter("script");
|
|
Eval.x("result2", script);
|
|
|
|
}
|
|
|
|
protected void doDelete(HttpServletRequest request, HttpServletResponse response)
|
|
throws ServletException, IOException {
|
|
String script = request.getParameter("script");
|
|
Eval.xy("result3", "result4", script);
|
|
}
|
|
|
|
protected void doPatch(HttpServletRequest request, HttpServletResponse response)
|
|
throws ServletException, IOException {
|
|
String script = request.getParameter("script");
|
|
Eval.xyz("result3", "result4", "aaa", script);
|
|
}
|
|
}
|
|
|