I'm using ActiveMQ's file server in this location http://localhost:8161/fileserver/. While authenticate this file server. I made small change in jetty.xml file and added a new line. (used same credential as admin portal).
<bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping"> <property name="constraint" ref="securityConstraint" /> <property name="pathSpec" value="/api/*,/admin/*,*.jsp,/fileserver/*" /> </bean> Then While using activemq blob messaging i used jms.blobTransferPolicy.UploadUrl=http://admin:admin@localhost :8161/fileserver/ But i could able to authenticate using correct username and password. Stack Trace below:- javax.jms.JMSException: PUT was not successful: 401 Unauthorized at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72) at org.apache.activemq.command.ActiveMQBlobMessage.onSend(ActiveMQBlobMessage.java:177) at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1882) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:288) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:223) at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241) at com.burusoth.test.ActiveMQProducer.Producer.sendLargeFiles(Producer.java:105) at com.burusoth.test.ActiveMQProducer.Main.main(Main.java:11) Caused by: java.io.IOException: PUT was not successful: 401 Unauthorized at org.apache.activemq.blob.DefaultBlobUploadStrategy.uploadStream(DefaultBlobUploadStrategy.java:69) at org.apache.activemq.blob.DefaultBlobUploadStrategy.uploadFile(DefaultBlobUploadStrategy.java:43) at org.apache.activemq.blob.BlobUploader.upload(BlobUploader.java:53) at org.apache.activemq.command.ActiveMQBlobMessage.onSend(ActiveMQBlobMessage.java:174) -- *A.Burusothman* Undergraduate, Department of Computer Science and Engineering, University of Moratuwa. _________ <https://www.facebook.com/bruz.dazz1>