File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to test my proxy application on localhost?
 
Similar Threads
pass session in other application
return statement after response.sendRedirect() method?
modify the HTTP Header with a Filter
HtmlUnit problem: Change the Request
Througing HTTP 1.1 500 when my servlet was not syncronized