toby88
toby88

Reputation: 115

Password protecting url / folder with Jetty

I'd like to password protect a limited portion of a JSP based website running on Jetty 8.1.

So for the url www.mywebsite.com/protected I want the browser to pop up a user/password entry window, whereas www.mywebsite.com is accessible to everyone.

I know that with Apache this is done with the .htaccess file. Since Jetty runs without Apache I'd like to know what's the best way to implement this?

Upvotes: 2

Views: 4652

Answers (1)

jesse mcconnell
jesse mcconnell

Reputation: 7182

The jsp is just a servlet so you want to configure a security realm protecting that url space in your web.xml file.

Jetty 7, 8

Jetty 9

Upvotes: 1

Related Questions