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

Cactus authentication

 
craig a chapman
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to run some server side tests using cactus. I am deploying the app to tomcat 5.5 and am using the Ant cactifywar and cactus tasks to do this. My web app uses basic authentication. When I run my tests, the URL

"http://localhost:8080/myapp/ServletRedirector?Cactus_service=RUN_TEST"

returns a 401 (unauthorized) response. If I open that URL in a browser, I am prompted for the username and password. Where do I set the username and password properties in order to run the tests?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hereyago:
Passing credentials in beginXXX()
 
craig a chapman
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for that, however I have read that previously and still haven't conquered the problem.

When I run the ant script, the cactus task deploys the war file and doesn't even begin executing any of my tests, it repeatedly tries the URL in my first post and fails due to "connection refused". I've been at this for some time now and it's starting to frustrate me.

Any clues?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Connection refused" would seem to imply that there's something wrong on a much lower level than authentication. What kind of a network infrastructure you have between the client machine and the web server?
 
craig a chapman
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The web server is running on the client machine. I.e I'm developing on one machine.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering more along the lines of whether you have a web server fronting a backend application server, whether you have a proxy somewhere in between, etc.?
 
craig a chapman
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No proxy. The same error occurs even when I take out the lan cable. I have just a simple tomcat 5.5 installation on my laptop. I'm going to try the runserverttests task instead to see if that makes any difference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic