FileDocCategorySizeDatePackage
QueryModifier.javaAPI DocExample932Sun Apr 13 10:16:56 BST 2003com.jspservletcookbook

QueryModifier

public class QueryModifier extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

    
    String requestUrl = request.getRequestURL().toString();
    String querystr = request.getQueryString();
    if (querystr != null){
        querystr = querystr +
         "&inspector-name=Jen&inspector-email=Jenniferq@yahoo.com";
    } else {
        querystr = "inspector-name=Jen&inspector-email=Jenniferq@yahoo.com";}
        
    RequestDispatcher dispatcher =
      request.getRequestDispatcher("/viewPost.jsp?"+querystr);
     dispatcher.forward(request,response);
public voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        
  doGet(request,response);