• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Cactus authentication

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hereyago:
Passing credentials in beginXXX()
 
craig a chapman
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
My, my, aren't you a big fella. Here, have a tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic