public class SwitchingQueryServlet
extends javax.servlet.http.HttpServlet
reslcass parameter.
At initialization time, the servlet reads each initialization parameter and treats it
as a resclass-to-web resource (by path) mapping. It saves each mapping.
Then, for any GET or POST request, it looks for the resclass parameter and
finds the corresponding web resource path. It then fowards the request to that
resource, but without the resclass parameter.
If the resclass parameter is missing or is empty, the result is a 400
(bad request). If the web resource is missing from the web server, the result is a 404
(not found).
| Constructor and Description |
|---|
SwitchingQueryServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
doIt(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Examine the resclass parameter and forward to the mapped web context resource.
|
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
init(javax.servlet.ServletConfig config)
Initialize the resource mappings.
|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletconfig - a ServletConfig value.javax.servlet.ServletException - if an error occurs.public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic void doIt(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
IOException
req - a HttpServletRequest value.res - a HttpServletResponse value.javax.servlet.ServletException - if an error occurs.IOException - if an error occurs.Copyright © 2010–2017 Planetary Data System. All rights reserved.