Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to connect to a servlet from usinghttp url connection,i.e http://localhost:9481/test/NewServlet. It worked fine for me. Now I want to connect using https://localhost:9481/test/NewServlet. I got the error like :

Error code: ssl_error_rx_record_too_long,Connection refused...

Do I need to edit anything in server.xml :

Presently it looks like:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" 
       maxThreads="150" scheme="https" secure="true"
       clientAuth="false" sslProtocol="TLS" />
share|improve this question

migrated from Feb 25 '12 at 17:11

This question came from our site for information security professionals.

Hi user10101, welcome to Information Security! Please take a moment to read the FAQ, and also How to Ask. I think there is some missing information, context etc. As @Karrax noted, this may be better on Stack Overflow, unless it is specifically about security. How to develop and configure your application would be offtopic. – AviD Feb 24 '12 at 10:57

I will still answer this, even if it is offtopic.

The problem seems to be that even if you are changing to HTTPS you are not changing the port number to 8443. The probable reason your browser is complaining is that you are servered normal HTTP content over what the browser would think would be HTTP protocol.

Change to port 8443 and try again.

share|improve this answer
I have tried it,it did not worked.I forgot to post it. – user10101 Feb 24 '12 at 11:14
What web or application-server are you using? – Chris Dale Feb 24 '12 at 11:16
I am using Apache.. – user10101 Feb 24 '12 at 11:24
Apache Tomcat I presume? – Chris Dale Feb 24 '12 at 11:30
Yes Apache Tomcat – user10101 Feb 24 '12 at 11:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.