Return-Path: Delivered-To: apmail-jakarta-cactus-user-archive@apache.org Received: (qmail 23524 invoked from network); 16 Apr 2002 19:18:55 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 16 Apr 2002 19:18:55 -0000 Received: (qmail 18037 invoked by uid 97); 16 Apr 2002 19:18:43 -0000 Delivered-To: qmlist-jakarta-archive-cactus-user@jakarta.apache.org Received: (qmail 17852 invoked by uid 97); 16 Apr 2002 19:18:41 -0000 Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Cactus Users List" Reply-To: "Cactus Users List" Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 17595 invoked from network); 16 Apr 2002 19:18:39 -0000 From: "Vincent Massol" To: "'Cactus Users List'" Subject: RE: Servlet Testing with Attributes Date: Sun, 14 Apr 2002 20:14:06 +0100 Organization: OCTO Technology Message-ID: <010301c1e3e8$a849c810$a5c8c8c8@octovma> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Yes, that looks fine to me. What error do you get ? -Vincent > -----Original Message----- > From: Arathi.Bhaskar@itsindia.com [mailto:Arathi.Bhaskar@itsindia.com] > Sent: 16 April 2002 12:44 > To: Cactus Users List > Subject: Re: Servlet Testing with Attributes > > > Hi > > This is the code I have: > > public void beginGetMethod(ServletTestRequest theRequest) { > theRequest.addParameter("strScreenId", "5"); > theRequest.addParameter("strMinRoleId", "1"); > } > > public void testGetMethod() throws IOException > { > > System.out.println("Inside testGetMethod........"); > > try { > servlet.doGet(request, response); > } catch (Exception e) { > System.out.println(e.toString()); > } > > System.out.println("Completed testGetMethod....."); > } > > My actual Servlet being tested uses request.getParameter() method to > retrieve the values of strScreenId, strMinRoleId. > > Will this not work??? > > Thanks & Regards > Arathi > > > > > > laurent.duperv > al@masq.ca To: cactus- > user@jakarta.apache.org > cc: > 04/16/02 05:15 Subject: Re: Servlet Testing > with Attributes > PM > Please respond > to "Cactus > Users List" > > > > > > > On 16 Apr, Arathi.Bhaskar@itsindia.com wrote: > > Hi > > > > I have a test servlet , which does the following: > > > > 1. In the setup method, i am instantiating the actual servlet to be > tested. > > 2. In the test method, i am calling the servlet's doGet method, which is > to > > be tested. doGet method in the actual servlet accepts two parameters as > > part of the Query String. (thru getAttribute). > > > > My question is, how can I set this in my test method before calling the > > doGet method. > > > > I think this is the correct way: > > public void beginDoGet(WebRequest theRequest) { > theRequest.setURL("localhost:8080", "/servletcontext", > "/YourTestServlet", null, "param1=foo,param2=bar"); > } > > L > > -- > Laurent Duperval > > People have one thing in common--they are all different. > > > > -- > To unsubscribe, e-mail: < > mailto:cactus-user-unsubscribe@jakarta.apache.org> > For additional commands, e-mail: < > mailto:cactus-user-help@jakarta.apache.org> > > > > > > -----------------------Disclaimer------------------------ > > The views of the author may not necessarily reflect those > of the Company. All liability is excluded to the extent > permitted by law for any claims arising as a result of the > use of this medium to transmit information by or to > IT Solutions (India) Pvt. Ltd. > > We have taken precautions to minimize the risk of > transmitting software viruses, but we advise you to > carry out your own virus checks on any attachment to > this message. We cannot accept liability for any loss or > damage caused by software viruses. > > ------------------------Disclaimer------------------------ > > > -- > To unsubscribe, e-mail: unsubscribe@jakarta.apache.org> > For additional commands, e-mail: help@jakarta.apache.org> > -- To unsubscribe, e-mail: For additional commands, e-mail: