I am refactoring a servlet we have used successfully for several years
now to accommodate input that does not amen itself to
HttpServletRequest.getParameter()... The only way it seems to be to
handle our particular input (the nature/format of the input is covered
by an NDA so I can not discuss it in any detail) read the raw
request.... in the old servlet HttpServletRequest.getParameter() had a
nice side effect that we where able to do something like this:
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws IOException
{
handleRequest(request,response);
}
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws IOException
{
handleRequest(request,response);
}
private void handleRequest(HttpServletRequest
request,HttpServletResponse response)
{
String input=Request.getParameter("foo"); // we are only interested
in this one param
process input
}
I want to preserve the single handler design but since getParameter
barfs on our new input format and there is no unified raw input reader
the only thing I can think of is make it so doGet and doPost use
request.getQueryString() and request.getReader() respectivally... is
there an easier way? (namely I want to keep doXXX as pure wrappers with
nothing but a dispatch to handleRequest()).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org