my dog learned polymorphism*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 4446
    
    5

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: 4446
    
    5

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.
 
Consider Paul's rocket mass heater.
 
subject: HttpUnit seems to be caching responses...grrr
 
Similar Threads
How to test validation errors in Struts
Oracle9iAS and Java IDE
Button click in HttpUnit
compatability between oc4j and other application server
very urgent...oracle 9i AppServer