All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cat.inspiracio.servlet.http.SetServlet Maven / Gradle / Ivy

Go to download

Dummy Servlet provides some implementations for the interfaces and classes of the Java Servlet spec that are useful for testing and simulation. Version 5.0.0 is for Servlet 5.0.0.

The newest version!
package cat.inspiracio.servlet.http;

import cat.inspiracio.servlet.SetServletConfig;
import jakarta.servlet.ServletConfig;
import jakarta.servlet.http.HttpServlet;

/** A servlet with settable fields. */
public class SetServlet extends HttpServlet {

    /** servlet config */
    private ServletConfig config = new SetServletConfig();

    /** servlet info */
    private String info;

    /** Make one. */
    public SetServlet(){}

    /** Sets the servlet config
     * @param c to this.
     * @return this */
    public SetServlet setServletConfig(ServletConfig c){config=c;return this;}
    @Override public ServletConfig getServletConfig(){return config;}

    /** Sets the servlet info
     * @param i to this.
     * @return this */
    public SetServlet setServletInfo(String i){info=i;return this;}
    @Override public String getServletInfo() {return info;}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy