Ah, your not actually mapping security to anything with that setup.. http://wiki.eclipse.org/Jetty/Tutorial/Realms
look at the second example in the Details section, I suspect you want to create a context.xml file that maps to the url that you want to protect in that fashion you either need to establish a webapp context mapping to that url and configure security for that, or you need to setup a handler chain where the configured security handler sits before the resource handler that is passing out the files... if you look at that example in the Details section you should see that you don't need to mess with the symbolic link, just serve out that directory under the context you want. cheers, jesse -- jesse mcconnell [email protected] On Thu, Dec 16, 2010 at 08:55, Fabrizio Pastore <[email protected]> wrote: > I think the issue depends on the fact that I did not deploy a real webapp. > I just want to access a folder through the web browser and thus I add a > symbolic link from webapps/myfolder to /path/to/myfolder > > <Configure id="Server" class="org.eclipse.jetty.server.Server"> > > <!-- =========================================================== --> > <!-- Server Thread Pool --> > <!-- =========================================================== --> > <Set name="ThreadPool"> > <!-- Default queued blocking threadpool --> > <New class="org.eclipse.jetty.util.thread.QueuedThreadPool"> > <Set name="minThreads">10</Set> > <Set name="maxThreads">200</Set> > </New> > </Set> > > <Call name="addBean"> > <Arg> > <New class="org.eclipse.jetty.security.HashLoginService"> > <Set name="name">Test Realm</Set> > <Set name="config"><SystemProperty name="jetty.home" > default="."/>/etc/realm.properties</Set> > <Set name="refreshInterval">5</Set> > </New> > </Arg> > </Call> > > > > Thank you in advance > > F. > > On 12/16/10 3:51 PM, Jesse McConnell wrote: > > that is likely a configuration issue in your web.xml then if your > setup for security and just not getting prompted > > if you like paste your web.xml configuration bits for it and we can > take a quick look > > also make sure you are loading that realm you configuring in the > web.xml in the jetty.xml as well, the names have to be exact. > > cheers, > jesse > > -- > jesse mcconnell > [email protected] > > > > On Thu, Dec 16, 2010 at 08:44, Fabrizio Pastore > <[email protected]> wrote: > > Thanks. I wrongly read the help on the jetty web site, > http://docs.codehaus.org/display/JETTY/Realms > > Now I followed the instructions on > http://wiki.eclipse.org/Jetty/Tutorial/Realms but seem that it does not help > for the authentication (no passwords asked when accessing the resources). > > > F. > > > > On 12/16/10 2:52 PM, Jesse McConnell wrote: > > where did you pull that xml from? those are the settings for jetty6 > judging from the classpaths.. > > everything in the jetty 7 distro (non hightide) is org.eclipse.jetty > package. > > see http://wiki.eclipse.org/Jetty/Howto/Upgrade_from_Jetty_6_to_Jetty_7 > > cheers, > jesse > > > -- > jesse mcconnell > [email protected] > > > > On Thu, Dec 16, 2010 at 07:39, Fabrizio Pastore > <[email protected]> wrote: > > Hi, > > I am using Jetty (jetty-distribution-7.2.1.v20101111) to remotely access > files stored in the server. > > To this end I simply added a symbolic link in the jetty webapps folder. > The > link points to the folder I want to share. > > > I want to control the access to the server but I did not find a working > solution. I just need to prompt a request for username/password. > > I tried to add the following lines to the jetty.xml > <Set name="UserRealms"> > <Array type="org.mortbay.jetty.security.UserRealm"> > <Item> > <New class="org.mortbay.jetty.security.HashUserRealm"> > <Set name="name">Test Realm</Set> > <Set name="config"><SystemProperty name="jetty.home" > default="."/>/etc/realm.properties</Set> > <Set name="refreshInterval">5</Set> > <Call name="start"></Call> > </New> > </Item> > </Array> > </Set> > > > > but I have a class not found exception messag ein teh logs (for > org.mortbay.jetty.security.UserRealm). > > > Is there any way to control the access to the whole jetty server? > > Thank you > > F. > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > > > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > > _______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
