Reputation: 927
I am creating a war file using Maven build and tried to deploy on the localhost Tomcat 8 server.
When I try to run the war, got this
Authentication required. http://localhost:8080 requires a username and password
and message prompts for a username and password.
I am building the project using mvn clean install
and copy the war file to the tomcat/webapps
.
And I start the tomcat using ./catalina.sh jpda run
What could have I done wrong? Please give some assistance.
Upvotes: 0
Views: 6246
Reputation: 1
Check for
<add type="HttpAuthModule.HttpAuthModule" name="HttpAuthModule" />
In your web config
Upvotes: 0
Reputation: 5122
If you got the message, Tomcat probably controls user access by web.xml
that includes <security-constraint>
and <login-config>
elements or servlets that includes @SevletSecurity
annotation defining how users are required to authenticate. So, you should check your application's web.xml
and servlets and remove them if not needed.
Upvotes: 0
Reputation: 2590
Add this to your application.properties file
# turn off authentication
security.basic.enabled=false
Upvotes: 1