subodh
subodh

Reputation: 347

Jetty returning 403 Forbidden

Hi I am porting my web app from tomcat to Jetty. I am using the Jetty runner to launch it. I am using the following command to launch Jetty:

java -jar jetty-runner.jar --port --path url-path path-to-war

However when I try to browse to the from the browser I get the following error:

HTTP ERROR 403

Problem accessing . Reason:

Forbidden

In the logs i see the following Warning:

WARN:oejs.SecurityHandler:No authenticator for: {RoleInfo,C[*, all_auth_users]}

I am trying to use Jetty out of the box and haven't customized any config anywhere. Is there any additional configuration required to make this work?

Upvotes: 4

Views: 19422

Answers (2)

user2280949
user2280949

Reputation: 77

In my case I forget that paste the index.html example page. Its all.

Upvotes: 0

Joakim Erdfelt
Joakim Erdfelt

Reputation: 49462

Likely cause: your war/webapp has security constraints defined, but you haven't specified what authentication type to use on the server side.

Either:

  • Remove your <security-constraint> in your war/webapp WEB-INF/web.xml file. or..
  • Add an Authentication scheme on the server side. Look at etc/jetty-testrealm.xml for an example using the HashLoginService authenticator.

Upvotes: 8

Related Questions