public abstract class PathServlet extends javax.servlet.http.HttpServlet
If the request has a non-null non-empty path, then that path
is sent to the doPathInfo
method, which
a subclass should implement. A request with an empty or null
path info results in sending a 404 error back to the client.
Constructor and Description |
---|
PathServlet() |
Modifier and Type | Method and Description |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
abstract void |
doPathInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String pathinfo)
The pathinfo parameter is not intern()'ed but can be
if/as needed in this method.
|
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
error(javax.servlet.http.HttpServletResponse res,
String msg)
Sends a 404 (page not found) error to the client.
|
void |
init(javax.servlet.ServletConfig conf) |
public PathServlet()
public void init(javax.servlet.ServletConfig conf) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public void error(javax.servlet.http.HttpServletResponse res, String msg) throws IOException
IOException
public abstract void doPathInfo(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String pathinfo) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException