• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Testing servlet using httpUnit

 
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting an error when i invoke a request for a servlet...

om.meterware.httpunit.HttpInternalErrorException: Error on HTTP request: 500 Internal Error [http://localhost:8080/webcomp/testservlet]
at com.meterware.httpunit.WebClient.validateHeaders(WebClient.java:573)
at com.meterware.httpunit.WebClient.updateClient(WebClient.java:464)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:139)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:130)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)


@ the code lines..



but it works fine with getResource() method..

What should i change here.....
[ April 03, 2007: Message edited by: A Kumar ]
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The "500 Internal Error" implies that you should look for the root cause of the problem in your server's or application's logs.
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it working with a getResponse(WebRequest arg)

constructed using the URL object.....

URL url=new URL("http://localhost:8080/webcomp");
WebRequest req=new GetMethodWebRequest(url,"/webcomp/testservlet");
 
reply
    Bookmark Topic Watch Topic
  • New Topic