This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to test my proxy application on localhost? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to test my proxy application on localhost? " Watch "How to test my proxy application on localhost? " New topic
Author

How to test my proxy application on localhost?

Adriano Bellavita
Ranch Hand

Joined: Mar 11, 2010
Posts: 37
Hi,

I have created a java method that take as arguments 2 object: httpServletRequest and httpServletRespose.

This class must simply analyze remote http requests and return http responses.

How can I test my application on localhost?



Thank you

Adriano.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Create a request and response?
Adriano Bellavita
Ranch Hand

Joined: Mar 11, 2010
Posts: 37
I want to invoke the method I've writed. So i must create an HttpServletRequest.

In which way?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Personally, I'd use HttpUnit or similar, or using a mocking framework like Mockito. Depends on your needs.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to test my proxy application on localhost?