When I use a browser (IE or Netscape) I do not experience any problem. Al
-----Original Message----- From: Kirk Wylie [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 7:55 PM To: Struts Users Mailing List Subject: Re: Help with using HttpUnit with Struts Does this happen when you hit the page directly (i.e. not go through HttpUnit)? Kirk Wylie M7 Corporation Moyer, Alan L wrote: > I recently downloaded HttpUnit and have been trying to use it to test a > working Struts application. If anyone is using HttpUnit, please help me get > by this problem. Following is a HttpUnit test method adopted from the > documentation: > > public void testGoodLogin() throws Exception { > WebConversation conversation = new WebConversation(); > WebRequest request = new GetMethodWebRequest( > "http://localhost/Opal_Struts/jsp/index.jsp" ); > WebResponse response = conversation.getResponse( request ); > WebForm loginForm = response.getForms()[0]; > request = loginForm.getRequest(); > System.out.println(request.toString()); > request.setParameter( "username", "foo" ); // Setting login > info into form > request.setParameter( "password", "bar" ); > response = conversation.getResponse( request ); // Exception is > thrown in this call > // ... > } > > When this executes, an exception is thrown where indicated with text "Error > on HTTP request: 500 Internal Error" > > My server, running locally, shows the following exception in the console: > > <Oct 21, 2003 6:03:11 PM EDT> <Error> <HTTP> <101017> > <[ServletContext(id=351156 > 2,name=Opal_Struts,context-path=/Opal_Struts)] Root cause of > ServletException > java.lang.NullPointerException > at > org.apache.struts.action.RequestProcessor.processForwardConfig(Reques > tProcessor.java:441) > at > org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja > va:279) > at > org.apache.struts.action.ActionServlet.process(ActionServlet.java:148 > 2) > at > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > (snip) > > I get the same 500 error when contacting the same application running on > another server. > > Any idea what's going on and how to get past this? > > Thanks, > > Al > > -- > This transmission is intended only for use by the addressee(s) named > herein and may contain information that is proprietary, confidential > and/or legally privileged. If you are not the intended recipient, you > are hereby notified that any disclosure, copying, distribution, or use > of the information contained herein (including any reliance thereon) is > STRICTLY PROHIBITED. If you received this transmission in error, please > immediately contact the sender and destroy the material in its entirety, > whether in electronic or hard copy format. Thank you. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- This transmission is intended only for use by the addressee(s) named herein and may contain information that is proprietary, confidential and/or legally privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]