aspose file tools*
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 Spring in Action this week in the Spring 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to test my proxy application on localhost?