Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to test my proxy application on localhost?

 
Adriano Bellavita
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a request and response?
 
Adriano Bellavita
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to invoke the method I've writed. So i must create an HttpServletRequest.

In which way?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally, I'd use HttpUnit or similar, or using a mocking framework like Mockito. Depends on your needs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic