(Tomcat) How to set username and password for SSL to avoid 401

Posted on 2005-04-29
Last Modified: 2010-04-01

I try to access a webservices with SSL. Everything seems to be OK but I get a (401)Unauthorized response. My investigation has led to I suspect that the problem must be that I need to apply the correct username and password.

But what is the correct username and password????

I use Tomcat 5.5.9 and axis.

I have tried with:


keystorePass and the name set in the keystore

But no luck at all.

My code looks like:

SSLSoapWsdlServerServiceLocator sslSoapWsdlServerServiceLocator = new SSLSoapWsdlServerServiceLocator();
SSLSoapWsdlServerSoapBindingStub sslSoapWsdlServerSoapBindingStub = (SSLSoapWsdlServerSoapBindingStub) sslSoapWsdlServerServiceLocator.getSSLSoapWsdlServer(new URL("https://localhost:8443/axis/services/SSLSoapWsdlServer"));
String returned = (String)sslSoapWsdlServerSoapBindingStub.getPrime("someString");
System.out.println( "Soap returned: " + returned );

I do not know where I find the username and password to use. I have not set anything like that in my Tomcat.

So if you know where to find or config this please let me know!!

Best regards

Question by:fredand44
    1 Comment
    LVL 16

    Accepted Solution


    Maybe you can try Tomcat admin username and password. If you do not have 'admin' role, you need to add it :).


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    When Does RestAdapter establishes HttpConnection 5 177
    xjc and jaxb 2 85
    JSP Popup page 2 83
    struts hibernate integration example 28 85
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now