File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes HttpUnit seems to be caching responses...grrr Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HttpUnit seems to be caching responses...grrr" Watch "HttpUnit seems to be caching responses...grrr" New topic
Author

HttpUnit seems to be caching responses...grrr

Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

I'm using JDeveloper 9.0.3 and the embedded OC4J to run a Struts-based application.
HttpUnit 1.5 doesn't seem to be getting the changes that I make to my JSP. View source in IE reflects any changes in the JSP but in my HttpUnit test class, resp.getText() still shows the old JSP!
I've tried combinations of the following but nothing seems to help:
1. Terminate and restart OC4J
2. Run Struts app on one instance of JDeveloper and the HttpUnit test on another.
3. Delete generated jsps classes to make sure that they are recompiled next time they are requested.
4. Exit and restart JDeveloper
The only thing that helps is if I reboot my machine but I can't be rebooting every 5 minutes! That defeats the whole purpose of using the testing framework
Seems to me that somehow the original WebResponse object is not going away since IE can see the changes.
I would really appreciate any help or suggestions. Thanks!


Junilu - [How to Ask Questions] [How to Answer Questions]
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

Some of the best ideas come to you on the can... :roll:
It finally dawned on me that the problem was proxy server-related. Sure enough, when I changed the URL from using the dot notation IP address supplied by JDeveloper and used "localhost" instead, thus bypassing the proxy server, things work as expected.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpUnit seems to be caching responses...grrr