GET
and POST
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String script= request.getParameter("script");
if ( script==null ) {
response.sendRedirect( "ScriptGUIServletPick" );
return;
}
if ( !ServletUtil.isWhitelisted(script) ) {
throw new IllegalArgumentException("script must come from whitelisted host, contact " +ServletUtil.getServletContact()
+ " to see if script could be run: "+script );
}
Map params= request.getParameterMap();
Map"+sd.getDescription() +"
"); } } else { out.println(""+sd.getDescription() +"
"); } } out.println(""); out.println("\n"); out.println( " | \n"); out.println( "\n"); out.println( "\n"); out.println("\n" ); out.println( " | \n"); out.println( "
GET
method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP POST
method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}//