jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sivaprasad_Kanche...@i2.com
Subject Problem with sending multiple parameters with POST method
Date Thu, 08 Aug 2002 14:21:19 GMT
Hi,

When I set few parameters with method as POST (in beginXXX method), only 
one of them retains the value (in testXXX method). However it does not 
occur if I sending the params as GET. I am using Weblogic 6.1sp2. I could 
not find an example in the samples where more than one param are sent with 
method as POST. I tried setting the content type too. The following is my 
code and the output on the container:
CODE:
    public void beginPostMethod(WebRequest theRequest)
    {
      theRequest.addParameter("page", "LoginPage");
      theRequest.addParameter("EVENT", "login");
      theRequest.addParameter("firstpage", "HomePage", 
WebRequest.POST_METHOD);
      theRequest.addParameter("CheckEntry", "valid", 
WebRequest.POST_METHOD);
      theRequest.addParameter("USER", "dba22", WebRequest.POST_METHOD);
      theRequest.addParameter("dblabel", "oradb01", 
WebRequest.POST_METHOD);
      theRequest.addParameter("SEQNO", "1", WebRequest.POST_METHOD);
    }

    public void testPostMethod() throws ServletException, IOException
    {

      PageServlet servlet = new PageServlet();
      try {
        servlet.init(config);
      System.out.println(request.getParameter("page"));
      System.out.println(request.getParameter("EVENT"));
      System.out.println(request.getParameter("firstpage"));
      System.out.println(request.getParameter("CheckEntry"));
      System.out.println(request.getParameter("USER"));
      System.out.println(request.getParameter("dblabel"));
      System.out.println(request.getParameter("SEQNO"));

      servlet.doPost(request,response);
     }

OUTPUT:
LoginPage
login
null
null
null
oradb01
null

Thanks,
Siva

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message