File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
How to test my proxy application on localhost?
Adriano Bellavita
Ranch Hand
Joined: Mar 11, 2010
Posts: 30
posted
Mar 11, 2010 03:19:10
0
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?
public void processImage(HttpServletRequest request, HttpServletResponse response) { //process request //write response }
Thank you
Adriano.
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
I like...
posted
Mar 11, 2010 06:48:25
0
Create a request and response?
Adriano Bellavita
Ranch Hand
Joined: Mar 11, 2010
Posts: 30
posted
Mar 11, 2010 06:56:05
0
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
I like...
posted
Mar 11, 2010 07:01:15
0
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
modify the HTTP Header with a Filter
Througing HTTP 1.1 500 when my servlet was not syncronized
return statement after response.sendRedirect() method?
HtmlUnit problem: Change the Request
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter